/* NudgeUp — Global styles
   Dark-mode first, mobile-first, CSS custom properties throughout. */

/* ── Reset & base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --color-bg:         #0F0E17;
  --color-surface:    #1C1B29;
  --color-surface-2:  #252438;
  --color-border:     #2E2D42;
  --color-primary:    #7C3AED;
  --color-primary-lt: #9B67F5;
  --color-accent:     #06B6D4;
  --color-success:    #10B981;
  --color-danger:     #EF4444;
  --color-warning:    #F59E0B;
  --color-text:       #E8E8F0;
  --color-text-muted: #8E8EA0;
  --color-overlay:    rgba(0,0,0,0.65);
  --radius-sm:        8px;
  --radius-md:        14px;
  --radius-lg:        20px;
  --shadow-card:      0 2px 12px rgba(0,0,0,0.35);
  --nav-height:       64px;
  --header-height:    56px;
  --font:             'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --content-max:      640px;
  --shadow-elevated:  0 8px 40px rgba(0,0,0,0.5), 0 2px 8px rgba(0,0,0,0.3);
  --color-data-orange: #f97316;
  --color-data-cyan:   #06B6D4;
  --color-text-inverse: #fff;
  --color-amber-dark:  #b45309;
}

/* ── Light mode overrides ─────────────────────────────────────────────────── */
html.light-mode {
  --color-bg:         #F5F5F7;
  --color-surface:    #FFFFFF;
  --color-surface-2:  #EEEEF5;
  --color-border:     #DDDDE8;
  --color-text:       #1A1A2E;
  --color-text-muted: #6E6E85;
  --color-overlay:    rgba(0,0,0,0.5);
  --shadow-card:      0 2px 12px rgba(0,0,0,0.1);
  --shadow-elevated:  0 8px 40px rgba(0,0,0,0.15), 0 2px 8px rgba(0,0,0,0.08);
}

/* ── Named themes ─────────────────────────────────────────────────────────── */

/* Cosmos — deep-space, glassmorphism */
html.theme-cosmos {
  --color-bg:         #050818;
  --color-surface:    rgba(18,10,40,0.75);
  --color-surface-2:  rgba(30,16,64,0.75);
  --color-border:     rgba(155,103,245,0.25);
  --color-primary:    #7C3AED;
  --color-primary-lt: #B07FFF;
  --color-accent:     #22D3EE;
  --color-text:       #E8E8FF;
  --color-text-muted: #9090C0;
  --shadow-card:      0 2px 24px rgba(124,58,237,0.18);
  --shadow-elevated:  0 8px 48px rgba(124,58,237,0.25), 0 2px 8px rgba(0,0,0,0.4);
}

/* Terminal — green-on-black retro CRT */
html.theme-terminal {
  --color-bg:         #000000;
  --color-surface:    #0A0F0A;
  --color-surface-2:  #0F180F;
  --color-border:     #00FF41;
  --color-primary:    #00FF41;
  --color-primary-lt: #39FF6A;
  --color-accent:     #00CCFF;
  --color-success:    #00FF41;
  --color-text:       #00FF41;
  --color-text-muted: #00A02A;
  --color-overlay:    rgba(0,0,0,0.85);
  --radius-sm:        2px;
  --radius-md:        2px;
  --radius-lg:        4px;
  --font:             'Courier New', Courier, monospace;
  --shadow-card:      0 0 12px rgba(0,255,65,0.2);
  --shadow-elevated:  0 0 24px rgba(0,255,65,0.3);
}

/* Aurora — soft violet-pink gradient vibes */
html.theme-aurora {
  --color-bg:         #080B14;
  --color-surface:    #100D1E;
  --color-surface-2:  #180F28;
  --color-border:     #2E2050;
  --color-primary:    #A78BFA;
  --color-primary-lt: #C4B5FD;
  --color-accent:     #F472B6;
  --color-text:       #ECF0FF;
  --color-text-muted: #8080AA;
  --shadow-card:      0 2px 16px rgba(167,139,250,0.15);
  --shadow-elevated:  0 8px 40px rgba(167,139,250,0.2), 0 2px 8px rgba(0,0,0,0.4);
}

/* White Bold — high-contrast light mode */
html.theme-white {
  --color-bg:         #EEE9FF;
  --color-surface:    #FFFFFF;
  --color-surface-2:  #F3F0FF;
  --color-border:     #C4B5FD;
  --color-primary:    #5B21B6;
  --color-primary-lt: #7C3AED;
  --color-accent:     #0891B2;
  --color-text:       #0D0D1A;
  --color-text-muted: #5B5B8A;
  --color-overlay:    rgba(0,0,0,0.5);
  --shadow-card:      0 2px 12px rgba(91,33,182,0.12);
  --shadow-elevated:  0 8px 32px rgba(91,33,182,0.15), 0 2px 8px rgba(0,0,0,0.08);
}

/* Warm Hug — cream + persimmon (matches the marketing landing) — light theme (NudgeUP-flbt) */
html.theme-warm {
  --color-bg:         #FBF1DE;
  --color-surface:    #FFFCF5;
  --color-surface-2:  #F5E2C3;
  --color-border:     rgba(40,20,8,0.14);
  --color-primary:    #D4604A;
  --color-primary-lt: #E07A60;
  --color-accent:     #E5A535;
  --color-text:       #281408;
  --color-text-muted: #8F6E52;
  --color-overlay:    rgba(40,20,8,0.5);
  --shadow-card:      0 2px 12px rgba(212,96,74,0.12);
  --shadow-elevated:  0 8px 30px rgba(212,96,74,0.15), 0 2px 8px rgba(40,20,8,0.08);
}

/* ── Theme background effects ─────────────────────────────────────────────── */

/* ── Smooth theme transition ──────────────────────────────────────────────── */
html {
  transition: background-color 0.4s ease;
}
/* These elements get cross-fade when theme switches */
.app-header,
.bottom-nav,
.task-card,
.bento-tile,
.profile-card,
.pro-upgrade-card {
  transition:
    background-color 0.35s ease,
    border-color 0.35s ease,
    box-shadow 0.35s ease;
}

/* ── Cosmos theme ─────────────────────────────────────────────────────────── */

/* Nebula glow orbs */
html.theme-cosmos body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 55% at 15% 20%, rgba(124,58,237,0.35) 0%, transparent 65%),
    radial-gradient(ellipse 55% 45% at 85% 75%, rgba(6,182,212,0.25) 0%, transparent 65%),
    radial-gradient(ellipse 40% 35% at 60% 10%, rgba(244,114,182,0.12) 0%, transparent 60%);
  z-index: 0;
}

/* Star field (JS-generated) */
.cosmos-star-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.cosmos-star {
  position: absolute;
  background: #fff;
  border-radius: 50%;
  animation: star-twinkle var(--tw-dur, 3s) ease-in-out infinite var(--tw-delay, 0s);
}
@keyframes star-twinkle {
  0%, 100% { opacity: var(--tw-hi, 0.7); transform: scale(1); }
  50%       { opacity: var(--tw-lo, 0.2); transform: scale(0.6); }
}

/* Glassmorphism on main surfaces */
html.theme-cosmos .task-card,
html.theme-cosmos .profile-card,
html.theme-cosmos .auth-container,
html.theme-cosmos .modal-sheet,
html.theme-cosmos .pro-upgrade-card,
html.theme-cosmos .app-header,
html.theme-cosmos .bottom-nav {
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: var(--color-surface);
}
html.theme-cosmos .app-header {
  border-bottom-color: rgba(155,103,245,0.2);
}
html.theme-cosmos .bottom-nav {
  border-top-color: rgba(155,103,245,0.2);
}

/* Priority dot glow on cosmos task cards */
html.theme-cosmos .task-priority-dot {
  box-shadow: 0 0 6px currentColor;
  filter: brightness(1.3);
}

/* ── Terminal theme ───────────────────────────────────────────────────────── */

/* CRT scanlines */
html.theme-terminal body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 2px,
    rgba(0,255,65,0.04) 2px,
    rgba(0,255,65,0.04) 4px
  );
  z-index: 0;
}

/* Phosphor glow on text elements */
html.theme-terminal .app-title,
html.theme-terminal .view-header h2,
html.theme-terminal .nav-label {
  text-shadow: 0 0 14px rgba(0,255,65,0.7);
  -webkit-text-fill-color: #00FF41;
  background: none;
  -webkit-background-clip: unset;
  background-clip: unset;
}
html.theme-terminal .task-title {
  text-shadow: 0 0 8px rgba(0,255,65,0.5);
}
html.theme-terminal .header-streak {
  text-shadow: 0 0 8px rgba(0,255,65,0.6);
}

/* Task row terminal style: left border + cursor marker */
html.theme-terminal .task-card {
  border-left: 3px solid #00FF41;
  border-radius: 2px;
}
html.theme-terminal .task-card:hover {
  background: rgba(0,255,65,0.06);
  box-shadow: 0 0 12px rgba(0,255,65,0.15), inset 0 0 0 1px rgba(0,255,65,0.2);
}
/* ▶ cursor shows on hover inside the left section */
html.theme-terminal .task-card-left::after {
  content: '▶';
  display: inline-block;
  color: #00FF41;
  font-size: 0.55rem;
  opacity: 0;
  transition: opacity 0.12s;
  margin-left: 2px;
}
html.theme-terminal .task-card:hover .task-card-left::after { opacity: 1; }

/* ── Aurora theme ─────────────────────────────────────────────────────────── */

/* Spinning conic blob — more intense */
@keyframes aurora-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

html.theme-aurora body::before {
  content: '';
  position: fixed;
  width: 160vmax;
  height: 160vmax;
  top: 50%;
  left: 50%;
  margin: -80vmax 0 0 -80vmax;
  pointer-events: none;
  background: conic-gradient(
    from 0deg at 50% 50%,
    rgba(167,139,250,0.22) 0deg,
    rgba(244,114,182,0.18) 80deg,
    rgba(34,211,238,0.14) 160deg,
    rgba(167,139,250,0.08) 240deg,
    rgba(244,114,182,0.20) 310deg,
    rgba(167,139,250,0.22) 360deg
  );
  animation: aurora-spin 9s linear infinite;
  z-index: 0;
}

/* Secondary slower counter-spin blob */
html.theme-aurora body::after {
  content: '';
  position: fixed;
  width: 100vmax;
  height: 100vmax;
  top: 50%;
  left: 50%;
  margin: -50vmax 0 0 -50vmax;
  pointer-events: none;
  background: conic-gradient(
    from 180deg at 50% 50%,
    rgba(34,211,238,0.10) 0deg,
    rgba(167,139,250,0.14) 120deg,
    rgba(244,114,182,0.08) 240deg,
    rgba(34,211,238,0.10) 360deg
  );
  animation: aurora-spin 15s linear infinite reverse;
  z-index: 0;
}

/* Glassmorphism on aurora surfaces */
html.theme-aurora .task-card,
html.theme-aurora .modal-sheet,
html.theme-aurora .pro-upgrade-card,
html.theme-aurora .app-header,
html.theme-aurora .bottom-nav {
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  background: rgba(14,6,30,0.78);
}
html.theme-aurora .app-header { background: rgba(8,11,20,0.85); border-bottom-color: rgba(167,139,250,0.2); }
html.theme-aurora .bottom-nav { border-top-color: rgba(167,139,250,0.2); }

/* ── White Bold theme ─────────────────────────────────────────────────────── */

/* 2-column bento task grid */
html.theme-white .task-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
html.theme-white .task-list .empty-state,
html.theme-white .task-list .task-section-label {
  grid-column: 1 / -1;
}
html.theme-white .task-card {
  border-radius: var(--radius-md);
  box-shadow: 0 2px 20px rgba(91,33,182,0.1), 0 1px 4px rgba(0,0,0,0.06);
}
html.theme-white .task-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
html.theme-white .task-card:hover {
  box-shadow: 0 4px 28px rgba(91,33,182,0.18);
  transform: translateY(-1px);
}
html.theme-white .app-header {
  background: #fff;
  box-shadow: 0 2px 16px rgba(91,33,182,0.08);
  border-bottom: none;
}
html.theme-white .bottom-nav {
  background: #fff;
  box-shadow: 0 -2px 16px rgba(91,33,182,0.08);
  border-top: none;
}

/* ── Theme swatch picker ──────────────────────────────────────────────────── */
.theme-picker {
  padding: 16px 0 4px;
}
.theme-picker-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin-bottom: 10px;
}
.theme-swatches {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.theme-swatch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  border: none;
  background: none;
  cursor: pointer;
  padding: 0;
}
.theme-swatch-dot {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid transparent;
  transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
}
.theme-swatch:hover .theme-swatch-dot {
  transform: scale(1.1);
}
.theme-swatch.active .theme-swatch-dot {
  border-color: var(--color-primary-lt);
  box-shadow: 0 0 0 2px var(--color-primary-lt);
}
.theme-swatch-name {
  font-size: 0.65rem;
  color: var(--color-text-muted);
  font-weight: 500;
}
.theme-swatch.active .theme-swatch-name {
  color: var(--color-primary-lt);
  font-weight: 700;
}
/* Swatch dot gradients — half background / half accent colour */
.theme-swatch[data-theme="dark"]     .theme-swatch-dot { background: linear-gradient(135deg, #0F0E17 50%, #7C3AED 50%); }
.theme-swatch[data-theme="light"]    .theme-swatch-dot { background: linear-gradient(135deg, #F5F5F7 50%, #7C3AED 50%); }
.theme-swatch[data-theme="cosmos"]   .theme-swatch-dot { background: linear-gradient(135deg, #050818 50%, #B07FFF 50%); }
.theme-swatch[data-theme="terminal"] .theme-swatch-dot { background: linear-gradient(135deg, #000000 50%, #00FF41 50%); }
.theme-swatch[data-theme="aurora"]   .theme-swatch-dot { background: linear-gradient(135deg, #080B14 50%, #F472B6 50%); }
.theme-swatch[data-theme="white"]    .theme-swatch-dot { background: linear-gradient(135deg, #EEE9FF 50%, #5B21B6 50%); }
.theme-swatch[data-theme="warm"]     .theme-swatch-dot { background: linear-gradient(135deg, #FBF1DE 50%, #D4604A 50%); }

/* ── Bento stat tiles (Cosmos, Aurora & White themes) ───────────────────────── */
.bento-stats {
  display: none;
  gap: 12px;
  margin-bottom: 16px;
}
html.theme-cosmos .bento-stats,
html.theme-aurora .bento-stats,
html.theme-white  .bento-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.bento-tile {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: var(--shadow-card);
}
/* Cosmos: glassmorphism on bento tiles */
html.theme-cosmos .bento-tile {
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
/* White Bold: gradient bento tiles */
html.theme-white .bento-tile-primary {
  background: linear-gradient(135deg, #FF2D95 0%, #FF6B00 100%);
  border-color: transparent;
  color: #fff;
}
html.theme-white .bento-tile-accent {
  background: linear-gradient(135deg, #2D9CFF 0%, #7C3AED 100%);
  border-color: transparent;
  color: #fff;
}
html.theme-white .bento-tile-primary .bento-tile-value,
html.theme-white .bento-tile-accent  .bento-tile-value { color: #fff; }
html.theme-white .bento-tile-primary .bento-tile-label,
html.theme-white .bento-tile-accent  .bento-tile-label { color: rgba(255,255,255,0.8); }
/* Aurora: gradient accent on tiles */
html.theme-aurora .bento-tile-primary {
  background: linear-gradient(135deg, rgba(167,139,250,0.2) 0%, rgba(244,114,182,0.15) 100%);
  border-color: rgba(167,139,250,0.3);
}
html.theme-aurora .bento-tile-accent {
  background: linear-gradient(135deg, rgba(244,114,182,0.15) 0%, rgba(34,211,238,0.12) 100%);
  border-color: rgba(244,114,182,0.25);
}
.bento-tile-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-primary-lt);
  line-height: 1;
}
.bento-tile-label {
  font-size: 0.68rem;
  color: var(--color-text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ── Theme toggle button ──────────────────────────────────────────────────── */
.theme-toggle {
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  transition: background 0.15s;
  line-height: 1;
}
.theme-toggle:hover { background: var(--color-surface-2); }

html, body {
  height: 100%;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  background: var(--color-bg);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--color-primary-lt); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Thin scrollbar for dark UX */
::-webkit-scrollbar        { width: 4px; }
::-webkit-scrollbar-track  { background: transparent; }
::-webkit-scrollbar-thumb  { background: var(--color-border); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: var(--color-text-muted); }

button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }

.hidden { display: none !important; }
.muted  { color: var(--color-text-muted); font-size: 0.875rem; }

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn-primary {
  display: block;
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-lt) 100%);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: opacity 0.15s, box-shadow 0.15s;
  box-shadow: 0 2px 12px rgba(124,58,237,0.3);
  box-shadow: 0 2px 12px color-mix(in srgb, var(--color-primary) 30%, transparent);
}
.btn-primary:hover:not(:disabled)    { opacity: 0.9; box-shadow: 0 4px 20px rgba(124,58,237,0.4); box-shadow: 0 4px 20px color-mix(in srgb, var(--color-primary) 40%, transparent); }
.btn-primary:disabled                { opacity: 0.5; cursor: not-allowed; box-shadow: none; }

/* ── Loading button utility (NudgeUP-juir) ──────────────────────────────────── */
@keyframes btn-spin { to { transform: translateY(-50%) rotate(360deg); } }
.btn-loading {
  position: relative;
  pointer-events: none;
  padding-right: 36px !important; /* make room for spinner */
}
.btn-loading::after {
  content: '';
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 13px;
  height: 13px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: rgba(255,255,255,0.9);
  border-radius: 50%;
  animation: btn-spin 0.65s linear infinite;
}
/* Secondary/outline buttons use a dark spinner */
.btn-secondary.btn-loading::after,
.btn-sm.btn-loading::after,
.vibe-mode-btn.btn-loading::after {
  border-color: rgba(0,0,0,0.15);
  border-top-color: var(--color-primary);
}

.btn-secondary {
  display: block;
  width: 100%;
  padding: 12px;
  background: var(--color-surface-2);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 500;
}
.btn-secondary:hover { background: var(--color-surface); }

.btn-danger {
  display: block;
  width: 100%;
  padding: 12px;
  background: transparent;
  color: var(--color-danger);
  border: 1px solid var(--color-danger);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 500;
}
.btn-danger:hover { background: rgba(239,68,68,0.1); }

.btn-link {
  background: none;
  border: none;
  color: var(--color-primary-lt);
  font-size: 0.875rem;
  padding: 8px 0;
  width: 100%;
  text-align: center;
}
.btn-link:hover { text-decoration: underline; }

.btn-apple {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 11px 16px;
  margin-bottom: 10px;
  background: #fff;
  color: #000;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-apple:hover { background: #f0f0f0; }
.btn-apple:active { background: #e0e0e0; }
html.light-mode .btn-apple,
html.theme-white .btn-apple { background: #000; color: #fff; border-color: #000; }
html.light-mode .btn-apple:hover,
html.theme-white .btn-apple:hover { background: #1a1a1a; }
html.light-mode .btn-apple:active,
html.theme-white .btn-apple:active { background: #333; }

.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 11px 16px;
  background: #fff;
  color: #3c4043;
  border: 1px solid #dadce0;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
}
.btn-google:hover { background: #f8f8f8; box-shadow: 0 1px 6px rgba(0,0,0,0.12); }
.btn-google:active { background: #f1f1f1; }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0 4px;
  color: var(--color-text-muted);
  font-size: 0.82rem;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-border);
}

.btn-link-sm {
  background: none;
  border: none;
  color: var(--color-accent);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0;
}

.btn-add {
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 6px 14px;
  font-size: 0.875rem;
  font-weight: 600;
}
.btn-add:hover { background: var(--color-primary-lt); }

.icon-btn {
  background: none;
  border: none;
  font-size: 1.25rem;
  padding: 8px;
  border-radius: var(--radius-sm);
  transition: background 0.1s;
}
.icon-btn:hover { background: var(--color-surface-2); }

/* ── Forms ────────────────────────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-size: 0.875rem; font-weight: 500; color: var(--color-text); }

.field input,
.field select,
.field textarea {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  padding: 12px 14px;
  font-size: 1rem;
  width: 100%;
  transition: border-color 0.15s;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.15);
}
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}
.field input::placeholder,
.field textarea::placeholder { color: var(--color-text-muted); }
.field select option { background: var(--color-surface-2); }

.field-row { display: flex; gap: 12px; }
.field-row .field { flex: 1; }

.field-check {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}
.field-check input[type="checkbox"] {
  width: 18px; height: 18px;
  accent-color: var(--color-primary);
  cursor: pointer;
}
.field-check label { font-size: 0.9rem; cursor: pointer; }

/* ── Task bud picker (T-1) ────────────────────────────────────────────────── */
.task-bud-picker {
  margin: -12px 0 16px;
  padding: 10px 12px;
  background: var(--color-surface-2);
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
}
.task-bud-picker-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.task-bud-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 20px;
  border: 1.5px solid var(--color-border);
  background: var(--color-surface);
  font-size: 0.82rem;
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s;
  color: var(--color-text);
}
.task-bud-chip.selected {
  border-color: var(--color-primary);
  background: rgba(124,58,237,0.12);
  color: var(--color-primary);
}
.task-bud-chip-check { font-size: 0.7rem; opacity: 0; transition: opacity 0.1s; }
.task-bud-chip.selected .task-bud-chip-check { opacity: 1; }
.task-bud-empty {
  font-size: 0.82rem;
  color: var(--color-text-muted);
}
.task-bud-empty a { color: var(--color-accent); text-decoration: underline; cursor: pointer; }

/* ── Alert ────────────────────────────────────────────────────────────────── */
.alert {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  margin-bottom: 16px;
}
.alert-error   { background: rgba(239,68,68,0.15);  color: #FCA5A5; border: 1px solid rgba(239,68,68,0.3); }
.alert-info    { background: rgba(6,182,212,0.15);  color: #67E8F9; border: 1px solid rgba(6,182,212,0.3); }
.alert-success { background: rgba(34,197,94,0.15);  color: #86EFAC; border: 1px solid rgba(34,197,94,0.3); }
.alert-warning { background: rgba(234,179,8,0.15);  color: #FDE047; border: 1px solid rgba(234,179,8,0.3); }
/* Light-mode alert text is dark-enough to read on tinted backgrounds */
html.light-mode .alert-error,
html.theme-white .alert-error,
html.theme-warm  .alert-error   { color: #b91c1c; }
html.light-mode .alert-info,
html.theme-white .alert-info,
html.theme-warm  .alert-info    { color: #0369a1; }
html.light-mode .alert-success,
html.theme-white .alert-success,
html.theme-warm  .alert-success { color: #15803d; }
html.light-mode .alert-warning,
html.theme-white .alert-warning,
html.theme-warm  .alert-warning { color: #92400e; }

/* ── AUTH PAGE ────────────────────────────────────────────────────────────── */
.auth-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px 12px;
  position: relative;
  overflow: hidden;
}
@keyframes glow-pulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50%       { opacity: 0.8; transform: scale(1.08); }
}
.auth-body::before {
  content: '';
  position: fixed;
  top: -30vh; left: -20vw;
  width: 70vw; height: 70vw;
  max-width: 600px; max-height: 600px;
  background: radial-gradient(circle, rgba(124,58,237,0.22) 0%, transparent 70%);
  animation: glow-pulse 6s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}
.auth-body::after {
  content: '';
  position: fixed;
  bottom: -20vh; right: -15vw;
  width: 60vw; height: 60vw;
  max-width: 500px; max-height: 500px;
  background: radial-gradient(circle, rgba(6,182,212,0.16) 0%, transparent 70%);
  animation: glow-pulse 8s ease-in-out infinite reverse;
  pointer-events: none;
  z-index: 0;
}
.auth-container { position: relative; z-index: 1; }

.auth-container {
  width: 100%;
  max-width: 420px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  box-shadow: var(--shadow-elevated), 0 0 0 1px rgba(124,58,237,0.06);
}

.auth-logo {
  text-align: center;
  margin-bottom: 28px;
}
.logo-icon {
  font-size: 3rem;
  display: block;
  filter: drop-shadow(0 0 10px rgba(124,58,237,0.5));
}
.logo-text {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--color-primary-lt), var(--color-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-top: 4px;
}
.logo-tagline { color: var(--color-text-muted); font-size: 0.95rem; margin-top: 6px; }

.auth-tabs {
  display: flex;
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: 4px;
  margin-bottom: 24px;
}
.tab-btn {
  flex: 1;
  padding: 10px;
  background: none;
  border: none;
  color: var(--color-text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: all 0.15s;
}
.tab-btn.active {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-lt));
  color: #fff;
  box-shadow: 0 2px 8px rgba(124,58,237,0.3);
}

.auth-form { display: flex; flex-direction: column; }

/* Already-signed-in banner (NudgeUP-j9g0) */
.auth-signed-in-banner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 24px 16px;
  background: var(--color-surface-2, #1e1e2e);
  border-radius: 16px;
  border: 1px solid var(--color-border, rgba(255,255,255,0.08));
  text-align: center;
  margin-bottom: 16px;
}
.auth-signed-in-icon { font-size: 2rem; }
.auth-signed-in-msg  { font-size: 0.95rem; margin: 0; }
.auth-signed-in-sub  { font-size: 0.8rem; color: var(--color-text-muted, #888); margin: 0; }
.auth-signed-in-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  margin-top: 8px;
}
.auth-signed-in-open { text-align: center; text-decoration: none; }

/* Password visibility toggle */
.pw-field {
  position: relative;
  display: flex;
  align-items: center;
}
.pw-field input {
  flex: 1;
  padding-right: 58px; /* make room for toggle button */
}
.pw-toggle {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0 14px;
  height: 100%;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--color-primary);
  transition: color 0.15s;
  user-select: none;
}
.pw-toggle:hover { color: var(--color-primary-lt); }
.pw-toggle:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: -2px;
  border-radius: var(--radius-sm);
}

/* Confirm / reset notices */
.confirm-notice {
  text-align: center;
  padding: 32px 16px;
}
.confirm-icon { font-size: 3rem; margin-bottom: 12px; }
.confirm-notice h3 { font-size: 1.25rem; margin-bottom: 8px; }
.confirm-notice p  { color: var(--color-text-muted); font-size: 0.9rem; margin-bottom: 4px; }

/* ── APP LAYOUT ───────────────────────────────────────────────────────────── */
.app-body {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  padding: 0 16px;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  flex-shrink: 0;
  position: relative;
}
/* Gradient accent line under header */
.app-header::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-accent) 60%, transparent 100%);
  opacity: 0.6;
}
.header-left { display: flex; align-items: center; gap: 8px; }
.logo-icon-sm { display: flex; align-items: center; }
.app-title { font-size: 1.1rem; font-weight: 700;
  background: linear-gradient(135deg, var(--color-primary-lt), var(--color-accent));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.header-right { display: flex; gap: 4px; align-items: center; }

/* ── Header user name ────────────────────────────────────────────────────── */
.header-user-name {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 80px;
}

/* ── Header streak badge ──────────────────────────────────────────────────── */
.header-streak {
  display: flex;
  align-items: center;
  gap: 3px;
  background: rgba(239,68,68,0.12);
  border: 1px solid rgba(239,68,68,0.25);
  border-radius: 20px;
  padding: 2px 8px 2px 6px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #F97316;
  line-height: 1;
  transition: opacity 0.3s;
}
html.theme-terminal .header-streak {
  color: #00FF41;
  background: rgba(0,255,65,0.08);
  border-color: rgba(0,255,65,0.3);
}
.header-streak-flame { font-size: 0.9rem; line-height: 1; }
.header-streak-count { font-size: 0.8rem; font-weight: 800; }

/* ── Theme palette quick-access button ───────────────────────────────────── */
.theme-palette-btn { font-size: 1rem; }

/* ── Theme quick panel (floating) ────────────────────────────────────────── */
.theme-quick-panel {
  position: absolute;
  top: calc(var(--header-height) + 6px);
  right: 56px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 12px;
  box-shadow: var(--shadow-elevated);
  z-index: 200;
  opacity: 0;
  transform: translateY(-8px) scale(0.96);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.theme-quick-panel.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
html.theme-cosmos .theme-quick-panel,
html.theme-aurora .theme-quick-panel {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.theme-quick-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.theme-quick-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  background: none;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 6px 4px;
  color: var(--color-text-muted);
  font-size: 0.64rem;
  font-weight: 600;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.theme-quick-btn:hover { background: var(--color-surface-2); color: var(--color-text); }
.theme-quick-btn.active {
  border-color: var(--color-primary-lt);
  color: var(--color-primary-lt);
  background: rgba(124,58,237,0.08);
}
.tq-dot {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid transparent;
  display: block;
  transition: transform 0.15s, box-shadow 0.15s;
}
.theme-quick-btn.active .tq-dot {
  border-color: var(--color-primary-lt);
  box-shadow: 0 0 0 2px rgba(124,58,237,0.3);
  transform: scale(1.1);
}

.app-main {
  flex: 1;
  overflow-y: auto;
  padding: 0 0 calc(var(--nav-height) + 8px);
}

/* ── Views ────────────────────────────────────────────────────────────────── */
.view { padding: 16px; }
.view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.view-header h2 { font-size: 1.25rem; font-weight: 700; }

/* view-header-actions: groups theme toggle + sign-out icon */
.view-header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Header sign-out icon button (NudgeUP-j9g0) */
.header-signout-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: transparent;
  border: none;
  color: var(--color-danger, #ef4444);
  opacity: 0.55;
  cursor: pointer;
  transition: opacity 0.15s, background 0.15s;
}
.header-signout-btn:hover { opacity: 1; background: rgba(239,68,68,0.1); }

/* Sign-out confirmation sheet (NudgeUP-j9g0) */
.modal-sheet-sm { max-width: 380px; padding-bottom: 24px; }
.modal-sheet-sm .modal-title { font-size: 1.1rem; margin-bottom: 6px; }

/* ── Bottom nav ───────────────────────────────────────────────────────────── */
.bottom-nav {
  display: flex;
  height: var(--nav-height);
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  flex-shrink: 0;
  position: fixed;
  bottom: 0;
  left: 0; right: 0;
}
.nav-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: none;
  border: none;
  color: var(--color-text-muted);
  font-size: 0.7rem;
  font-weight: 500;
  transition: color 0.15s;
  position: relative;
}
.nav-btn.active { color: var(--color-primary-lt); }
/* Active pip indicator — animated version in aehc section at end of file */
.nav-icon { display: flex; align-items: center; justify-content: center; line-height: 1; }
.nav-icon svg { transition: transform 0.15s; }
.nav-btn.active .nav-icon svg { transform: scale(1.1); }

/* ── Day plan banner ──────────────────────────────────────────────────────── */
.day-plan-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, rgba(124,58,237,0.2), rgba(6,182,212,0.15));
  border: 1px solid rgba(124,58,237,0.35);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-bottom: 12px;
  font-size: 0.875rem;
}
.day-plan-banner > span { flex: 1; }
.day-plan-dismiss {
  background: none;
  border: none;
  color: var(--color-text-muted);
  font-size: 0.85rem;
  padding: 2px 4px;
  line-height: 1;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: color 0.1s;
}
.day-plan-dismiss:hover { color: var(--color-text); }

/* ── Task time estimation (NudgeUP-vjbi) ──────────────────────────────────── */
.task-estimate-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  min-height: 24px;
}
.task-estimate-row.hidden { display: none; }
.task-estimate-chip {
  font-size: 0.8rem;
  color: var(--accent, #9b67f5);
  font-weight: 600;
  background: rgba(155,103,245,0.1);
  border-radius: 99px;
  padding: 3px 10px;
  white-space: nowrap;
}
.task-estimate-accept {
  font-size: 0.75rem;
  background: none;
  border: 1px solid var(--accent, #9b67f5);
  color: var(--accent, #9b67f5);
  border-radius: 99px;
  padding: 3px 10px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.task-estimate-accept:hover { background: var(--accent, #9b67f5); color: #fff; }
.task-estimate-accept.hidden { display: none; }
.task-estimate-accept:disabled { opacity: 0.6; cursor: default; }

.task-daily-total {
  font-size: 0.78rem;
  color: var(--accent, #9b67f5);
  font-weight: 600;
  padding: 6px 0 2px;
  opacity: 0.85;
}
.task-daily-total.hidden { display: none; }

/* Estimate insight badge in Profile (NudgeUP-0o49) */
.estimate-insight {
  font-size: 0.8125rem;
  color: var(--color-text-muted, #9ca3af);
  padding: 8px 0 4px;
}
.estimate-insight.hidden { display: none; }

/* ── For You section (NudgeUP-x84) ───────────────────────────────────────── */
.for-you-section { margin-bottom: 16px; }
.for-you-section.hidden { display: none; }
.for-you-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.for-you-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted, #888);
}
.for-you-refresh {
  background: none;
  border: none;
  color: var(--text-muted, #888);
  font-size: 16px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
  transition: color 0.15s, transform 0.3s;
}
.for-you-refresh:hover { color: var(--accent, #9B67F5); }
.for-you-refresh.spinning { animation: spin 0.6s linear; }
@keyframes spin { to { transform: rotate(360deg); } }

.for-you-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.for-you-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--card-bg, rgba(255,255,255,0.05));
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  border-radius: var(--radius-sm, 12px);
  padding: 12px 14px;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  text-align: left;
  width: 100%;
}
.for-you-card:hover { background: var(--card-hover, rgba(155,103,245,0.08)); transform: translateY(-1px); }
.for-you-card:active { transform: translateY(0); }
.for-you-card-icon { font-size: 22px; flex-shrink: 0; line-height: 1; }
.for-you-card-body { flex: 1; min-width: 0; }
.for-you-card-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text, #fff);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.for-you-card-text {
  font-size: 0.78rem;
  color: var(--text-muted, #999);
  line-height: 1.4;
  margin-bottom: 6px;
}
.for-you-card-cta {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent, #9B67F5);
}
.for-you-skeleton {
  height: 72px;
  border-radius: var(--radius-sm, 12px);
  background: linear-gradient(90deg, var(--card-bg, rgba(255,255,255,0.05)) 25%, var(--border, rgba(255,255,255,0.1)) 50%, var(--card-bg, rgba(255,255,255,0.05)) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer { 0% { background-position: 200% 0 } 100% { background-position: -200% 0 } }

/* NudgeUP-p0rd: For You empty + error states */
.for-you-empty,
.for-you-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 16px;
  border-radius: var(--radius-sm, 12px);
  background: var(--card-bg, rgba(255,255,255,0.05));
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  text-align: center;
}
.for-you-empty-icon { font-size: 26px; line-height: 1; }
.for-you-empty-text,
.for-you-error-text {
  font-size: 0.82rem;
  color: var(--text-muted, #888);
  margin: 0;
  line-height: 1.4;
}
.for-you-retry-btn {
  margin-top: 4px;
  padding: 6px 18px;
  font-size: 0.8rem;
  font-weight: 600;
  background: var(--accent, #9B67F5);
  color: #fff;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  transition: opacity 0.15s;
}
.for-you-retry-btn:hover { opacity: 0.85; }
.for-you-retry-btn:active { opacity: 0.7; }

/* ── Filters ──────────────────────────────────────────────────────────────── */
.filter-row {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  overflow-x: auto;
  padding-bottom: 2px;
}
.filter-btn {
  padding: 6px 14px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  color: var(--color-text-muted);
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
  transition: all 0.15s;
}
.filter-btn.active {
  background: rgba(124,58,237,0.2);
  border-color: var(--color-primary);
  color: var(--color-primary-lt);
}

/* ── Task search bar (improvement I) ─────────────────────────────────────── */
.task-search-bar {
  position: relative;
  margin-bottom: 12px;
}
.task-search-input {
  width: 100%;
  padding: 8px 36px 8px 12px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  color: var(--color-text);
  font-size: 0.875rem;
  box-sizing: border-box;
  transition: border-color 0.15s;
}
.task-search-input:focus {
  outline: none;
  border-color: var(--color-primary);
}
.task-search-input::placeholder { color: var(--color-text-muted); }
.task-search-clear {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--color-text-muted);
  font-size: 0.75rem;
  cursor: pointer;
  padding: 2px 4px;
  line-height: 1;
}
.task-search-clear:hover { color: var(--color-text); }
.task-search-empty {
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.875rem;
  padding: 32px 0;
}
.task-search-empty em { font-style: italic; }
.task-search-empty .btn-link { display: block; margin-top: 10px; font-size: 0.875rem; }

/* ── Task cards ───────────────────────────────────────────────────────────── */
.task-list { display: flex; flex-direction: column; gap: 10px; }

/* Task section labels ("📌 Today · 3 remaining") */
.task-section-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--color-text-muted);
  padding: 8px 2px 2px;
}
.task-section-label .section-count {
  background: var(--color-surface-2);
  border-radius: 20px;
  padding: 1px 7px;
  font-size: 0.67rem;
  color: var(--color-text-muted);
}
html.theme-cosmos .task-section-label { color: rgba(176,127,255,0.7); }
html.theme-terminal .task-section-label { color: rgba(0,255,65,0.6); letter-spacing: 0.1em; }
html.theme-aurora .task-section-label { color: rgba(167,139,250,0.65); }

.task-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left-width: 3px;
  border-radius: var(--radius-md);
  padding: 14px 12px;
  box-shadow: var(--shadow-card);
  transition: transform 0.1s, box-shadow 0.15s, border-color 0.15s;
}
/* Priority left-border accent colors */
.task-card[data-priority="high"]   { border-left-color: var(--color-danger); }
.task-card[data-priority="medium"] { border-left-color: var(--color-warning); }
.task-card[data-priority="low"]    { border-left-color: #4B5563; }
.task-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.45); }
.task-card:active { transform: scale(0.99); }

.task-check {
  width: 40px; height: 40px;
  border: 2px solid var(--color-border);
  border-radius: 50%;
  background: none;
  color: var(--color-success);
  font-size: 0.75rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  margin-top: -8px;
  transition: all 0.15s;
}
.task-check.checked {
  background: var(--color-success);
  border-color: var(--color-success);
  color: #fff;
}

.task-card-body { flex: 1; min-width: 0; }
.task-title { font-size: 0.95rem; font-weight: 500; word-break: break-word; }
.task-title.done { text-decoration: line-through; color: var(--color-text-muted); }

.task-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.task-category, .task-due {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  background: var(--color-surface-2);
  border-radius: 4px;
  padding: 2px 7px;
}
.task-badge-acct {
  font-size: 0.75rem;
  color: var(--color-accent);
  background: rgba(6,182,212,0.12);
  border-radius: 4px;
  padding: 2px 7px;
}

/* Category chip colour variants */
.task-category[data-cat="think"]      { background: rgba(139,92,246,0.15); color: #A78BFA; }
.task-category[data-cat="move"]       { background: rgba(16,185,129,0.15); color: #34D399; }
.task-category[data-cat="connect"]    { background: rgba(6,182,212,0.15);  color: #22D3EE; }
.task-category[data-cat="quick_win"]  { background: rgba(245,158,11,0.15); color: #FBB040; }
.task-category[data-cat="deep_focus"] { background: rgba(124,58,237,0.15); color: #9B67F5; }
.task-category[data-cat="low_gear"]   { background: rgba(107,114,128,0.15); color: #9CA3AF; }

/* Overdue date — red tint + pill badge + card left border (H) */
.task-due.overdue { background: rgba(239,68,68,0.15); color: #FCA5A5; }
.task-card-overdue { border-left: 3px solid rgba(239,68,68,0.6); }
.overdue-label {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 1px 5px;
  background: rgba(239,68,68,0.18);
  color: #F87171;
  border-radius: 3px;
  vertical-align: middle;
  margin-left: 4px;
}

/* Task completion animation */
@keyframes task-complete {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.18); }
  70%  { transform: scale(0.95); }
  100% { transform: scale(1); }
}
.task-check.just-completed { animation: task-complete 0.35s ease; }

/* Task card done fade */
.task-card.fading-done {
  opacity: 0.55;
  transition: opacity 0.4s ease;
}

.task-card-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.drag-handle {
  font-size: 1rem;
  color: var(--color-border);
  cursor: grab;
  user-select: none;
  line-height: 1;
  padding: 2px 4px;
}
.drag-handle:active { cursor: grabbing; }

.task-card-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.task-priority-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  display: block;
}

.task-action-btn {
  background: none;
  border: none;
  font-size: 0.8rem;
  padding: 8px 10px;
  min-height: 36px;
  border-radius: var(--radius-sm);
  line-height: 1;
  color: var(--color-text-muted);
  transition: background 0.1s;
}
.task-action-btn:hover { background: var(--color-surface-2); }

/* ── Drag states ──────────────────────────────────────────────────────────── */
.task-card.dragging {
  opacity: 0.4;
  box-shadow: none;
}
.task-card.drag-over {
  border-color: var(--color-primary);
  background: rgba(124,58,237,0.1);
}

/* ── Empty state ──────────────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 48px 16px;
  color: var(--color-text-muted);
}
.empty-icon { font-size: 3rem; margin-bottom: 12px; display: flex; justify-content: center; }
.empty-state p { margin-bottom: 6px; }
.empty-state p:not(.muted) { font-size: 1rem; }

/* ── Coming soon ──────────────────────────────────────────────────────────── */
.coming-soon {
  text-align: center;
  padding: 48px 16px;
}
.coming-soon-icon { font-size: 3rem; margin-bottom: 16px; }
.coming-soon h3   { font-size: 1.25rem; font-weight: 600; margin-bottom: 8px; }
.coming-soon p    { color: var(--color-text-muted); font-size: 0.9rem; margin-bottom: 8px; }
.badge-pill {
  display: inline-block;
  background: rgba(124,58,237,0.2);
  border: 1px solid rgba(124,58,237,0.4);
  color: var(--color-primary-lt);
  border-radius: 20px;
  padding: 4px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-top: 8px;
}

/* ── Profile ──────────────────────────────────────────────────────────────── */
.profile-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}
.profile-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-md);
  padding: 1.5px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent), var(--color-primary));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.6;
  pointer-events: none;
}
.profile-avatar {
  width: 60px; height: 60px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.75rem;
  flex-shrink: 0;
}
.profile-name      { font-size: 1.1rem; font-weight: 700; }
.profile-nudge-id {
  display: inline-flex;
  align-items: center;
  margin-top: 5px;
  font-size: 0.78rem;
  color: var(--color-primary-lt);
  background: rgba(124,58,237,0.12);
  border: 1px solid rgba(124,58,237,0.25);
  border-radius: 6px;
  padding: 2px 8px;
  font-family: monospace;
  letter-spacing: 0.03em;
  cursor: pointer;
}
.profile-nudge-id:hover { background: rgba(124,58,237,0.2); }
.profile-avatar-initials {
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  line-height: 1;
}
.profile-tier      {
  display: inline-block;
  margin-top: 6px;
  font-size: 0.75rem;
  background: rgba(124,58,237,0.2);
  color: var(--color-primary-lt);
  border-radius: 4px;
  padding: 2px 8px;
  font-weight: 600;
}
.profile-actions { display: flex; flex-direction: column; gap: 12px; }

/* ── Upgrade / pricing ────────────────────────────────────────────────────── */
.upgrade-success {
  margin-top: 16px;
  padding: 12px 16px;
  background: rgba(16,185,129,0.15);
  border: 1px solid var(--color-success);
  border-radius: var(--radius-md);
  color: var(--color-success);
  font-size: 0.9rem;
  text-align: center;
}

.upgrade-section  { margin-top: 24px; }
.upgrade-heading  {
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 16px;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.8rem;
}

.pricing-cards {
  display: flex;
  gap: 12px;
}

.pricing-card {
  flex: 1;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  box-shadow: var(--shadow-card);
}

.pricing-card-featured {
  border-color: var(--color-primary);
  background: rgba(124,58,237,0.08);
}

.pricing-card-badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-primary);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.pricing-card-name {
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
}

.pricing-card-price {
  font-size: 1.6rem;
  font-weight: 800;
  text-align: center;
  color: var(--color-primary-lt);
  line-height: 1;
}
.pricing-card-price span {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-text-muted);
}

.pricing-features {
  list-style: none;
  padding: 0;
  margin: 8px 0;
  flex: 1;
}
.pricing-features li {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  padding: 3px 0;
}
.pricing-features li::before {
  content: '✓ ';
  color: var(--color-success);
  font-weight: 700;
}

.btn-upgrade {
  display: block;
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-lt) 50%, var(--color-accent) 100%);
  background-size: 200% 100%;
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 700;
  margin-top: auto;
  transition: background-position 0.4s ease, box-shadow 0.2s, transform 0.1s;
  box-shadow: 0 4px 20px rgba(124,58,237,0.4);
  box-shadow: 0 4px 20px color-mix(in srgb, var(--color-primary) 40%, transparent);
  letter-spacing: 0.01em;
}
/* Terminal: solid accent border button instead of gradient */
html.theme-terminal .btn-upgrade {
  background: transparent;
  border: 2px solid var(--color-primary);
  color: var(--color-primary);
  box-shadow: 0 0 12px rgba(0,255,65,0.25);
}
html.theme-terminal .btn-upgrade:hover:not(:disabled) {
  background: rgba(0,255,65,0.1);
  box-shadow: 0 0 20px rgba(0,255,65,0.4);
}
.btn-upgrade:hover:not(:disabled) {
  background-position: 100% 0;
  box-shadow: 0 6px 28px rgba(124,58,237,0.55);
  transform: translateY(-1px);
}
.btn-upgrade:active:not(:disabled) { transform: translateY(0); }
.btn-upgrade:disabled { opacity: 0.6; cursor: not-allowed; }

.manage-section { margin-top: 24px; }

/* ── Manage card (NudgeUP-urx) ───────────────────────────────────────────── */
.manage-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  overflow: hidden;
}
.manage-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--color-border);
}
.manage-card-label {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-text);
}
.manage-card-status {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 9999px;
  background: rgba(16,185,129,0.15);
  color: var(--color-success);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.manage-card-status.paused {
  background: rgba(245,158,11,0.15);
  color: var(--color-warning);
}
.manage-card-actions {
  display: flex;
}
.manage-action-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 14px 8px;
  background: none;
  border: none;
  border-right: 1px solid var(--color-border);
  color: var(--color-text);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
  min-height: 60px;
}
.manage-action-btn:last-child { border-right: none; }
.manage-action-btn:hover { background: var(--color-surface-2); }
.manage-action-btn:active { background: var(--color-border); }
.manage-action-icon { font-size: 1.1rem; }
.manage-action-danger { color: var(--color-danger, #ef4444); }
.manage-action-danger:hover { background: rgba(239,68,68,0.08); }

/* ── Paused banner ───────────────────────────────────────────────────────── */
.paused-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(234,179,8,0.1);
  border: 1px solid rgba(234,179,8,0.3);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 12px;
}
.paused-banner-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.paused-banner-icon { font-size: 1.3rem; flex-shrink: 0; }
.paused-banner-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-text);
  margin: 0;
}
.paused-banner-sub {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin: 2px 0 0;
}
.btn-text-primary {
  background: none;
  border: none;
  color: var(--color-primary, #7c3aed);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  transition: background 0.15s;
}
.btn-text-primary:hover { background: rgba(124,58,237,0.08); }
.btn-sm { font-size: 0.8rem; padding: 5px 10px; }

/* ── Pause duration picker cards ─────────────────────────────────────────── */
.pause-duration-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 20px 0;
}
.pause-duration-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 16px 8px 14px;
  background: var(--color-surface);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
}
.pause-duration-card:hover {
  border-color: var(--color-primary, #7c3aed);
  background: rgba(124,58,237,0.05);
}
.pause-duration-card:active { transform: scale(0.97); }
.pause-duration-card.selected {
  border-color: var(--color-primary, #7c3aed);
  background: rgba(124,58,237,0.1);
}
.pause-duration-num {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--color-primary, #7c3aed);
  line-height: 1;
}
.pause-duration-unit {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  font-weight: 500;
}
.pause-duration-date {
  font-size: 0.7rem;
  color: var(--color-text-muted);
  margin-top: 4px;
  text-align: center;
  line-height: 1.3;
}
.pause-step-cancel {
  display: block;
  margin: 8px auto 0;
  background: none;
  border: none;
  color: var(--color-text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 8px 16px;
}

/* ── Pause reason chips ──────────────────────────────────────────────────── */
.pause-reason-chips {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 20px 0;
}
.pause-reason-chip {
  padding: 14px 10px;
  background: var(--color-surface);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
  text-align: center;
}
.pause-reason-chip:hover {
  border-color: var(--color-primary, #7c3aed);
  background: rgba(124,58,237,0.05);
}
.pause-reason-chip:active { transform: scale(0.97); }
.pause-reason-chip.selected {
  border-color: var(--color-primary, #7c3aed);
  background: rgba(124,58,237,0.1);
}

/* ── Pause confirm step ──────────────────────────────────────────────────── */
.pause-confirm-body {
  text-align: center;
  padding: 20px 0 10px;
}
.pause-confirm-icon { font-size: 2.5rem; margin-bottom: 12px; }
.pause-step { display: flex; flex-direction: column; }

/* ── Spinner (reusable) ──────────────────────────────────────────────────── */
.spinner {
  width: 28px; height: 28px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-primary, #7c3aed);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 16px auto 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Pro upgrade card ────────────────────────────────────────────────────── */
.pro-upgrade-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 24px 18px 18px;
  box-shadow: 0 4px 32px rgba(124,58,237,0.2), 0 2px 16px rgba(0,0,0,0.15);
  border: 1px solid rgba(124,58,237,0.3);
  position: relative;
  overflow: hidden;
}
.pro-upgrade-card::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 180px; height: 180px;
  background: radial-gradient(circle, rgba(155,103,245,0.18) 0%, transparent 70%);
  pointer-events: none;
}
.pro-upgrade-header { text-align: center; margin-bottom: 20px; }
.pro-sparkle { font-size: 2rem; display: block; margin-bottom: 4px; }
.pro-upgrade-title  { font-size: 1.3rem; font-weight: 700; color: var(--color-text); margin-bottom: 3px; }
.pro-upgrade-tagline { font-size: 0.82rem; color: var(--color-text-muted); }

.pro-features-list {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
  display: flex;
  flex-direction: column;
}
.pro-features-list li {
  font-size: 0.875rem;
  color: var(--color-text);
  padding: 7px 0;
  border-bottom: 1px solid var(--color-border);
}
.pro-features-list li:last-child { border-bottom: none; }

.plan-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}
.plan-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border: 1.5px solid var(--color-border);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.plan-option.plan-selected {
  border-color: var(--color-primary);
  background: rgba(124, 58, 237, 0.06);
}
.plan-radio { display: none; }

.plan-option-info { flex: 1; display: flex; justify-content: space-between; align-items: center; }
.plan-option-name  { font-size: 0.9rem; font-weight: 500; color: var(--color-text); }
.plan-option-price { font-size: 0.95rem; font-weight: 700; color: var(--color-text); }
.plan-option-unit  { font-size: 0.75rem; font-weight: 400; color: var(--color-text-muted); }

.plan-option-badge { min-width: 74px; text-align: right; font-size: 0.72rem; font-weight: 600; }
.plan-save-badge   { color: var(--color-success); }
.plan-best-badge {
  background: linear-gradient(135deg, #9B67F5, #06B6D4);
  color: #fff;
  padding: 2px 9px;
  border-radius: 50px;
  font-size: 0.68rem;
}

.plan-billing-note { text-align: center; font-size: 0.8rem; color: var(--color-text-muted); margin-bottom: 14px; }
.plan-trial-note   { text-align: center; font-size: 0.76rem; color: var(--color-text-muted); margin-top: 8px; }

.legal-links {
  margin-top: 20px;
  text-align: center;
  font-size: 0.78rem;
  color: var(--color-text-muted);
}
.legal-links a { color: var(--color-text-muted); text-decoration: underline; }
.legal-links a:hover { color: var(--color-primary-lt); }

/* ── Modal / bottom sheet ─────────────────────────────────────────────────── */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.modal-overlay {
  position: absolute;
  inset: 0;
  background: var(--color-overlay);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
@keyframes sheet-spring {
  0%   { transform: translateY(100%); }
  60%  { transform: translateY(-4px); }
  80%  { transform: translateY(2px); }
  100% { transform: translateY(0); }
}
.modal-sheet {
  position: relative;
  background: var(--color-surface);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 20px 20px calc(20px + env(safe-area-inset-bottom));
  max-height: 92vh;
  overflow-y: auto;
  animation: sheet-spring 0.32s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.modal-handle {
  width: 48px; height: 5px;
  background: var(--color-border);
  border-radius: 3px;
  margin: 0 auto 20px;
  opacity: 0.7;
}
.modal-sheet h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 20px; }
.modal-actions  { display: flex; gap: 12px; margin-top: 8px; }
.modal-actions .btn-secondary { flex: 1; }
.modal-actions .btn-primary   { flex: 2; }
.modal-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 28px 24px 24px;
  position: relative;
  box-shadow: var(--shadow-elevated);
}

/* ── NudgeBuds ────────────────────────────────────────────────────────────── */
.bud-count {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  text-align: right;
  margin-bottom: 12px;
}
.bud-count-cap { color: var(--color-warning, #f59e0b); font-weight: 600; }

.bud-list { display: flex; flex-direction: column; gap: 10px; }

.bud-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 14px 12px;
  box-shadow: var(--shadow-card);
}

.bud-avatar {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
  position: relative;
}

/* Initial-letter avatar (NudgeUP-9byu item 2) */
.bud-avatar-initial {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
  letter-spacing: 0;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
  user-select: none;
}

.bud-active-dot {
  position: absolute;
  bottom: 0; right: 0;
  width: 10px; height: 10px;
  background: var(--color-success, #10b981);
  border-radius: 50%;
  border: 2px solid var(--color-surface, #fff);
  box-shadow: 0 0 0 1px rgba(16,185,129,0.4);
}

.bud-info { flex: 1; min-width: 0; }
.bud-name { font-size: 0.95rem; font-weight: 600; }
.bud-nudge-id {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  font-family: monospace;
  margin-top: 2px;
}

.bud-status {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: 4px;
  padding: 2px 7px;
  margin-top: 6px;
}
.bud-status.active      { background: rgba(16,185,129,0.15); color: var(--color-success); }
.bud-status.pending-in  { background: rgba(245,158,11,0.15);  color: var(--color-warning); }
.bud-status.pending-out { background: var(--color-surface-2); color: var(--color-text-muted); }

.bud-card-actions { display: flex; gap: 8px; margin-top: 10px; }

.bud-combined-streak {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--color-warning);
  background: rgba(245,158,11,0.12);
  border-radius: 20px;
  padding: 2px 8px;
  margin-top: 6px;
  letter-spacing: 0.01em;
}

/* Elevated streak badge (NudgeUP-9byu item 3 + 50hh) */
.streak-badge-combined {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 1rem;
  font-weight: 800;
  color: #f59e0b;
  background: rgba(245,158,11,0.15);
  border: 1px solid rgba(245,158,11,0.35);
  border-radius: 24px;
  padding: 4px 12px;
  margin-top: 8px;
  letter-spacing: 0.01em;
  box-shadow: 0 0 8px rgba(245,158,11,0.25);
  line-height: 1.2;
}

/* Nav badge (NudgeUP-9byu item 5) */
.nav-badge {
  position: absolute;
  top: -4px; right: -6px;
  min-width: 16px; height: 16px;
  background: #ef4444;
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
  line-height: 1;
  pointer-events: none;
}
.nav-badge.hidden { display: none; }

/* Buds/Activity segmented toggle (NudgeUP-9byu item 8) */
.buds-tab-toggle {
  display: flex;
  background: var(--color-surface-2);
  border-radius: 20px;
  padding: 3px;
  gap: 2px;
}
.buds-tab-btn {
  flex: 1;
  padding: 5px 14px;
  border: none;
  border-radius: 16px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-text-muted);
  background: transparent;
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
  white-space: nowrap;
}
.buds-tab-btn.active {
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: 0 1px 4px rgba(0,0,0,0.12);
}

/* Broadcast prompt chips (NudgeUP-9byu item 9) */
.prompt-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.prompt-chip {
  padding: 5px 12px;
  border: 1px solid var(--color-border);
  border-radius: 20px;
  background: var(--color-surface-2);
  color: var(--color-text-muted);
  font-size: 0.8rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.prompt-chip:hover {
  background: var(--color-primary-faint, rgba(99,102,241,0.1));
  color: var(--color-primary);
  border-color: var(--color-primary);
}

/* Quick-nudge button on bud card (NudgeUP-9byu item 4) */
.btn-quick-nudge {
  padding: 5px 12px;
  background: var(--color-primary-faint, rgba(99,102,241,0.1));
  color: var(--color-primary);
  border: 1px solid var(--color-primary);
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}
.btn-quick-nudge:hover { background: rgba(99,102,241,0.18); }
.btn-quick-nudge:active { transform: scale(0.97); }

/* ── Activity Feed ────────────────────────────────────────────────────────── */
.activity-section { margin-top: 24px; }

/* Broadcast keyword filter (NudgeUP-tj7u) */
.broadcast-search-bar {
  position: relative;
  margin-bottom: 10px;
}
.broadcast-search-input {
  width: 100%;
  padding: 8px 36px 8px 12px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  color: var(--color-text);
  font-size: 0.875rem;
  box-sizing: border-box;
  transition: border-color 0.15s;
}
.broadcast-search-input:focus {
  outline: none;
  border-color: var(--color-primary);
}
.broadcast-search-input::placeholder { color: var(--color-text-muted); }
.broadcast-search-clear {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--color-text-muted);
  font-size: 1rem;
  cursor: pointer;
  padding: 2px 4px;
  line-height: 1;
}
.broadcast-search-clear:hover { color: var(--color-text); }
.broadcast-search-empty {
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.875rem;
  padding: 32px 0;
}

.activity-header {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin-bottom: 10px;
}
.activity-feed { display: flex; flex-direction: column; gap: 6px; }

/* Sent nudge reaction counts (NudgeUP-8rrx) */
.sent-nudges-feed { display: flex; flex-direction: column; gap: 8px; }
.sent-nudge-card {
  background: var(--color-surface);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sent-nudge-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.sent-nudge-meta {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}
.sent-nudge-reactions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.reaction-count-pill {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 9999px;
  padding: 2px 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-text);
}
.reaction-count-n { color: var(--color-text-muted); font-weight: 500; }
.reaction-count-none { font-size: 0.78rem; color: var(--color-text-muted); font-style: italic; }
.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  background: var(--color-surface-2);
  border-radius: 10px;
  font-size: 0.88rem;
  line-height: 1.4;
  animation: fadeInUp 0.25s ease;
}
.activity-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: 1px; }
.activity-body { flex: 1; min-width: 0; }
.activity-text { color: var(--color-text); }
.activity-time { font-size: 0.75rem; color: var(--color-text-muted); margin-top: 2px; }
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.btn-sm {
  padding: 5px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: inherit;
}
.btn-sm-primary { background: var(--color-primary); color: #fff; }
.btn-sm-primary:hover { background: var(--color-primary-lt); }
.btn-sm-danger  { background: transparent; color: var(--color-danger); border: 1px solid var(--color-danger); }
.btn-sm-danger:hover { background: rgba(239,68,68,0.1); }

/* Search row inside modal */
.search-row { display: flex; gap: 8px; }
.search-row input { flex: 1; min-width: 0; width: auto; }

.btn-search {
  padding: 12px 16px;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  font-family: inherit;
  white-space: nowrap;
}
.btn-search:hover { background: var(--color-primary-lt); }

/* Bud search result preview */
.bud-search-result {
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-bottom: 16px;
  font-size: 0.875rem;
}
.bud-search-result.loading {
  background: var(--color-surface-2);
  color: var(--color-text-muted);
}
.bud-search-result.error {
  background: rgba(239,68,68,0.12);
  color: #FCA5A5;
  border: 1px solid rgba(239,68,68,0.25);
}
.bud-search-result.found {
  background: rgba(16,185,129,0.1);
  border: 1px solid rgba(16,185,129,0.25);
  display: flex;
  align-items: center;
  gap: 12px;
}
.bud-result-avatar {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.bud-result-name    { font-weight: 600; font-size: 0.9rem; }
.bud-result-nudgeid { font-size: 0.75rem; color: var(--color-text-muted); font-family: monospace; }

/* ── Bud paywall modal ───────────────────────────────────────────────────── */
.bud-paywall-content { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 8px 0 12px; gap: 10px; }
.paywall-icon  { font-size: 2.8rem; line-height: 1; }
.paywall-title { font-size: 1.2rem; font-weight: 700; color: var(--color-text); margin: 0; }
.paywall-body  { font-size: 0.9rem; color: var(--color-text-muted); margin: 0; line-height: 1.5; }
.paywall-used  { font-size: 0.82rem; font-weight: 600; color: var(--color-primary); background: rgba(124,58,237,0.1); padding: 3px 12px; border-radius: 9999px; }
.paywall-upgrade-btn { width: 100%; margin-top: 4px; }
.paywall-close-btn   { width: 100%; background: none; border: none; color: var(--color-text-muted); font-size: 0.875rem; cursor: pointer; padding: 8px; }
.paywall-close-btn:hover { color: var(--color-text); }

/* ── Broadcasts ──────────────────────────────────────────────────────────── */
.broadcast-tabs {
  display: flex;
  background: var(--color-surface-2);
  border-radius: var(--radius-sm);
  padding: 3px;
  margin-bottom: 16px;
  gap: 2px;
}
.broadcast-tab {
  flex: 1;
  padding: 8px 6px;
  background: none;
  border: none;
  color: var(--color-text-muted);
  font-size: 0.8rem;
  font-weight: 500;
  font-family: inherit;
  border-radius: var(--radius-sm);
  transition: all 0.15s;
}
.broadcast-tab.active { background: var(--color-primary); color: #fff; }

.broadcast-content { margin-bottom: 4px; }

.emoji-presets { display: flex; gap: 8px; flex-wrap: wrap; }
.emoji-preset {
  width: 44px; height: 44px;
  background: var(--color-surface-2);
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 1.4rem;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.emoji-preset:hover  { border-color: var(--color-primary); }
.emoji-preset.selected { border-color: var(--color-primary); background: rgba(124,58,237,0.15); }

.victory-notice {
  text-align: center;
  padding: 24px 16px;
  background: rgba(16,185,129,0.08);
  border: 1px solid rgba(16,185,129,0.2);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
}
.victory-icon { font-size: 2.5rem; margin-bottom: 8px; }
.victory-notice p { color: var(--color-text-muted); font-size: 0.9rem; }

.broadcast-bud-list { margin-bottom: 12px; }
.broadcast-buds-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}
.broadcast-bud-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; }
.bud-avatar-sm {
  width: 28px; height: 28px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}
.broadcast-bud-name { font-size: 0.875rem; font-weight: 500; }
.broadcast-cap-warning {
  background: rgba(245,158,11,0.12);
  color: var(--color-warning);
  border: 1px solid rgba(245,158,11,0.25);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 0.8rem;
  margin-bottom: 12px;
}

/* ── Voice Broadcast ─────────────────────────────────────────────────────── */
.voice-recorder {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 8px 8px;
  gap: 12px;
}
.voice-state { display: flex; flex-direction: column; align-items: center; gap: 12px; width: 100%; }

/* Record button */
.btn-voice-record {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--color-primary);
  border: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem;
  box-shadow: 0 4px 16px rgba(124,58,237,0.35);
  transition: transform 0.15s, box-shadow 0.15s;
  cursor: pointer;
}
.btn-voice-record:active { transform: scale(0.95); box-shadow: 0 2px 8px rgba(124,58,237,0.2); }
.voice-hint { color: var(--color-text-muted); font-size: 0.8rem; margin: 0; }

/* Waveform canvas + timer */
.voice-waveform {
  border-radius: var(--radius-sm);
  background: var(--color-surface-2);
  width: 100%; max-width: 260px; height: 48px;
}
.voice-timer {
  font-size: 1.1rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--color-error, #ef4444);
  letter-spacing: 0.05em;
}
.btn-voice-stop {
  padding: 10px 28px;
  background: var(--color-error, #ef4444);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: opacity 0.15s;
}
.btn-voice-stop:hover { opacity: 0.88; }

/* Preview player */
.voice-preview-player {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--color-surface-2);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  width: 100%;
  max-width: 280px;
}
.btn-voice-play {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  border: none;
  font-size: 0.9rem;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: opacity 0.15s;
}
.btn-voice-play:hover { opacity: 0.85; }
.voice-preview-bars {
  display: flex; align-items: center; gap: 2px; flex: 1;
}
.voice-preview-bars span {
  display: block; width: 3px; border-radius: 2px;
  background: var(--color-primary);
  opacity: 0.7;
  animation: none;
}
/* staggered static waveform heights */
.voice-preview-bars span:nth-child(1)  { height: 12px; }
.voice-preview-bars span:nth-child(2)  { height: 22px; }
.voice-preview-bars span:nth-child(3)  { height: 32px; }
.voice-preview-bars span:nth-child(4)  { height: 20px; }
.voice-preview-bars span:nth-child(5)  { height: 38px; }
.voice-preview-bars span:nth-child(6)  { height: 28px; }
.voice-preview-bars span:nth-child(7)  { height: 16px; }
.voice-preview-bars span:nth-child(8)  { height: 36px; }
.voice-preview-bars span:nth-child(9)  { height: 24px; }
.voice-preview-bars span:nth-child(10) { height: 14px; }
/* animate when playing */
.voice-preview-bars.playing span { animation: wave-bar 0.8s ease-in-out infinite alternate; }
.voice-preview-bars.playing span:nth-child(odd)  { animation-delay: 0s; }
.voice-preview-bars.playing span:nth-child(even) { animation-delay: 0.15s; }
@keyframes wave-bar { from { opacity: 0.4; transform: scaleY(0.6); } to { opacity: 1; transform: scaleY(1); } }
.voice-preview-duration { font-size: 0.75rem; font-variant-numeric: tabular-nums; color: var(--color-text-muted); flex-shrink: 0; }
.voice-retake-btn {
  background: none; border: none;
  color: var(--color-primary); font-size: 0.8rem; font-weight: 600; font-family: inherit;
  cursor: pointer; padding: 4px 0;
  text-decoration: underline; text-underline-offset: 2px;
}

/* Received voice broadcast card in activity feed */
.voice-broadcast-card {
  display: flex; align-items: center; gap: 10px;
  background: var(--color-surface-2);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  margin-top: 4px;
  max-width: 220px;
}
.btn-voice-broadcast-play {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff; border: none;
  font-size: 0.8rem;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0;
}
.voice-broadcast-bars {
  display: flex; align-items: center; gap: 2px; flex: 1;
}
.voice-broadcast-bars span {
  display: block; width: 3px; border-radius: 2px;
  background: var(--color-primary); opacity: 0.65;
}
.voice-broadcast-bars span:nth-child(1) { height: 10px; }
.voice-broadcast-bars span:nth-child(2) { height: 18px; }
.voice-broadcast-bars span:nth-child(3) { height: 28px; }
.voice-broadcast-bars span:nth-child(4) { height: 16px; }
.voice-broadcast-bars span:nth-child(5) { height: 34px; }
.voice-broadcast-bars span:nth-child(6) { height: 22px; }
.voice-broadcast-bars span:nth-child(7) { height: 12px; }
.voice-broadcast-bars.playing span { animation: wave-bar 0.9s ease-in-out infinite alternate; }
.voice-broadcast-duration { font-size: 0.7rem; color: var(--color-text-muted); flex-shrink: 0; font-variant-numeric: tabular-nums; }

/* ── Vibe Check view ─────────────────────────────────────────────────────── */
.vibe-section { margin-bottom: 20px; }
.vibe-rate-nudge { font-size: 0.82rem; color: var(--color-primary); margin-top: 4px; animation: vibe-blink 1s ease-in-out 2; }
.vibe-prompt {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  margin-bottom: 14px;
  text-align: center;
}
.vibe-emojis {
  display: flex;
  justify-content: center;
  gap: 10px;
}
.vibe-emoji {
  font-size: 2rem;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  background: none;
  line-height: 1;
  transition: transform 0.12s, border-color 0.15s, background 0.15s;
}
.vibe-emoji:hover { transform: scale(1.18); }
.vibe-emoji.selected {
  border-color: var(--color-primary);
  background: rgba(124,58,237,0.12);
  transform: scale(1.28);
  box-shadow: 0 0 0 4px rgba(124,58,237,0.2), 0 0 16px rgba(124,58,237,0.25);
}
/* Dim non-selected when one is selected */
.vibe-emojis.has-selection .vibe-emoji:not(.selected) {
  opacity: 0.45;
  transform: scale(0.92);
}
.vibe-note-field { margin-bottom: 14px; }
.vibe-note-hint {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin: 6px 0 0;
  opacity: 0.8;
}
/* Voice input row */
.vibe-note-input-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.vibe-note-input-row textarea { flex: 1; }
.vibe-mic-btn {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--color-border);
  background: var(--color-surface);
  font-size: 1.1rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s, background 0.15s;
  cursor: pointer;
}
.vibe-mic-btn:hover { border-color: var(--color-primary); }
.vibe-mic-btn.recording {
  border-color: #ef4444;
  background: rgba(239,68,68,0.1);
  animation: mic-pulse 1.2s ease-in-out infinite;
}
@keyframes mic-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0.35); }
  50%       { box-shadow: 0 0 0 6px rgba(239,68,68,0); }
}
/* TTS controls */
.vibe-tts-controls {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}
.vibe-tts-btn {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-muted);
  font-size: 0.8125rem;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.vibe-tts-btn:hover { border-color: var(--color-primary); }
.vibe-tts-btn.active {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: rgba(124,58,237,0.08);
}
.vibe-modes-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}
.vibe-mode-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 20px;
}
.vibe-mode-btn {
  padding: 13px 14px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: 0.875rem;
  font-weight: 500;
  text-align: left;
  transition: border-color 0.15s, background 0.15s, transform 0.1s, box-shadow 0.15s;
  box-shadow: var(--shadow-card);
}
.vibe-mode-btn:hover:not(:disabled) {
  border-color: var(--color-primary);
  background: rgba(124,58,237,0.06);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}
.vibe-mode-btn:active:not(:disabled) { transform: translateY(0); }
.vibe-mode-btn.loading {
  opacity: 0.7;
  cursor: wait;
}
.vibe-mode-btn:disabled { opacity: 0.5; cursor: default; }
.vibe-mode-dayplan {
  grid-column: 1 / -1;
  text-align: center;
  background: linear-gradient(135deg, rgba(124,58,237,0.1), rgba(6,182,212,0.06));
  border-color: rgba(124,58,237,0.45);
}
/* I'm Stuck button (NudgeUP-qgbo) */
.vibe-mode-stuck {
  grid-column: 1 / -1;
  text-align: center;
  background: rgba(239,68,68,0.07);
  border-color: rgba(239,68,68,0.35);
  color: #ef4444;
}
.vibe-mode-stuck:hover:not(:disabled) {
  background: rgba(239,68,68,0.15);
  border-color: rgba(239,68,68,0.6);
}
.vibe-mode-stuck:disabled { opacity: 0.5; cursor: default; }

/* Drill Sergeant mode button (NudgeUP-d32g) — olive/army green */
.vibe-mode-drill {
  background: rgba(85,107,47,0.12);
  border-color: rgba(85,107,47,0.45);
  color: #6b7c3a;
}
.vibe-mode-drill:hover:not(:disabled) {
  background: rgba(85,107,47,0.22);
  border-color: rgba(85,107,47,0.7);
  color: #5a6832;
}
.vibe-mode-drill:disabled { opacity: 0.5; cursor: default; }

/* Stuck reaction row */
.stuck-reaction-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.stuck-reaction-row.hidden { display: none; }
.stuck-reaction-label {
  font-size: 0.78rem;
  color: var(--muted, #888);
  margin-right: 2px;
}
.stuck-reaction-btn {
  font-size: 0.78rem;
  border: 1px solid;
  border-radius: 99px;
  padding: 4px 12px;
  cursor: pointer;
  background: none;
  font-weight: 600;
  transition: background 0.15s, color 0.15s;
}
.stuck-reaction-yes { border-color: #22c55e; color: #22c55e; }
.stuck-reaction-yes:hover { background: #22c55e; color: #fff; }
.stuck-reaction-no  { border-color: var(--muted, #888); color: var(--muted, #888); }
.stuck-reaction-no:hover  { background: var(--muted, #888); color: #fff; }
.stuck-reaction-btn:disabled { opacity: 0.5; cursor: default; }

/* Coach response rating row (NudgeUP-visf) */
.coach-feedback-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}
.coach-feedback-row.hidden { display: none; }
.coach-feedback-label {
  font-size: 0.8125rem;
  color: var(--color-text-muted, #9ca3af);
  flex: 1;
}
.coach-feedback-btn {
  background: transparent;
  border: 1px solid var(--color-border, rgba(255,255,255,0.12));
  border-radius: 9999px;
  padding: 4px 12px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
  line-height: 1;
}
.coach-feedback-btn:hover { background: rgba(255,255,255,0.07); }
.coach-feedback-btn:active { transform: scale(0.92); }
.coach-feedback-btn.selected { border-color: transparent; background: rgba(255,255,255,0.12); }
.coach-feedback-btn:disabled { opacity: 0.5; cursor: default; }

/* Stuck response card — red accent border */
.vibe-response.vibe-response--stuck {
  border-left: 3px solid #ef4444;
  background: rgba(239,68,68,0.04);
}

.vibe-response {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 16px;
}
.vibe-response.loading { opacity: 0.75; }
.vibe-response.loading::after {
  content: '';
  display: block;
  width: 18px;
  height: 18px;
  margin: 8px auto 0;
  border: 2px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: vibe-spin 0.7s linear infinite;
}
.vibe-response-mode {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-primary-lt);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}
.vibe-response-text {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--color-text);
  white-space: pre-wrap;
}
.vibe-response-text.typing::after {
  content: '▋';
  display: inline-block;
  margin-left: 1px;
  opacity: 0.7;
  animation: vibe-blink 0.7s step-end infinite;
}
@keyframes vibe-blink {
  0%, 100% { opacity: 0.7; }
  50%       { opacity: 0; }
}
@keyframes vibe-spin {
  to { transform: rotate(360deg); }
}

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (min-width: 480px) {
  .auth-body { padding: 32px 24px; }
  .auth-container { padding: 36px 32px; }
}

@media (min-width: 768px) {
  /* Frame the mobile PWA in a centered column on wide screens */
  .app-body {
    max-width: var(--content-max);
    margin: 0 auto;
    border-left: 1px solid var(--color-border);
    border-right: 1px solid var(--color-border);
    box-shadow: 0 0 80px rgba(0,0,0,0.6);
  }

  /* Bottom nav constrained to match app frame */
  .bottom-nav {
    max-width: var(--content-max);
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    border-left: 1px solid var(--color-border);
    border-right: 1px solid var(--color-border);
  }

  /* Center modals as dialogs instead of bottom sheets */
  .modal {
    justify-content: center;
    align-items: center;
  }
  .modal-sheet {
    border-radius: var(--radius-lg);
    max-width: 480px;
    width: calc(100% - 32px);
    margin: 0 auto;
    max-height: 85vh;
  }
  .modal-handle { display: none; }

  /* More breathing room in views */
  .view { padding: 24px; }
  .app-header { padding: 0 24px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ── Onboarding overlay ───────────────────────────────────────────────────── */
/* ── Coachmark Tour (NudgeUP-7dkj) ────────────────────────────────────────── */
.tour-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(0, 0, 0, 0.55);
  pointer-events: all;
}
.tour-overlay.hidden { display: none !important; }

.tour-skip-btn {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 9002;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.tour-skip-btn:hover { background: rgba(255,255,255,0.22); }

.tour-tooltip {
  position: fixed;
  z-index: 9002;
  background: var(--color-surface, #1e1b2e);
  border: 1px solid var(--color-border, rgba(255,255,255,0.1));
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
  max-width: 300px;
  width: calc(100vw - 32px);
  pointer-events: all;
  animation: tour-fade-in 0.2s ease;
}
@keyframes tour-fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.tour-step-icon {
  font-size: 2rem;
  margin-bottom: 8px;
  display: block;
}
.tour-step-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text, #e5e7eb);
  margin: 0 0 6px;
}
.tour-step-desc {
  font-size: 0.875rem;
  color: var(--color-text-muted, #9ca3af);
  margin: 0 0 16px;
  line-height: 1.5;
}
.tour-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.tour-step-counter {
  font-size: 0.8125rem;
  color: var(--color-text-muted, #9ca3af);
  white-space: nowrap;  /* NudgeUP-zt2f: prevent "2 / 4" from wrapping */
  flex-shrink: 0;
}
.tour-next-cta {
  padding: 8px 18px;
  font-size: 0.875rem;
  border-radius: 9999px;
  font-weight: 600;
}

/* Arrow pointing down to nav element */
.tour-arrow {
  position: absolute;
  width: 0;
  height: 0;
  bottom: -10px;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 10px solid var(--color-surface, #1e1b2e);
}
.tour-arrow-up {
  top: -10px;
  bottom: auto;
  border-top: none;
  border-bottom: 10px solid var(--color-surface, #1e1b2e);
}
.tour-arrow-down {
  bottom: -10px;
  top: auto;
  border-bottom: none;
  border-top: 10px solid var(--color-surface, #1e1b2e);
}
.tour-arrow-hidden { display: none; }

/* Spotlight: make the target element pop above the overlay */
.tour-spotlight {
  position: relative;
  z-index: 9001 !important;
  border-radius: 8px;
  box-shadow: 0 0 0 4px var(--color-primary, #7c3aed);
  pointer-events: none;
}

.onboarding-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--color-bg);
  transition: opacity 0.3s ease;
}
.onboarding-overlay.hidden { display: none !important; }
.onboarding-overlay.fading-out {
  opacity: 0;
  pointer-events: none;
}

.onboarding-swiper {
  width: 100%;
  height: 100%;
}

.onboarding-slide {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 32px 80px;
  text-align: center;
  position: relative;
  width: 100%;
  height: 100%;
}

/* Per-slide gradient accent */
.slide-welcome { background: linear-gradient(160deg, #1c0f42 0%, var(--color-bg) 65%); }
.slide-tasks   { background: linear-gradient(160deg, #0e1a30 0%, var(--color-bg) 65%); }
.slide-buds    { background: linear-gradient(160deg, #0c2220 0%, var(--color-bg) 65%); }
.slide-nudge   { background: linear-gradient(160deg, #1f1408 0%, var(--color-bg) 65%); }

.onboarding-skip {
  position: absolute;
  top: 20px; right: 20px;
  background: none;
  border: none;
  color: var(--color-text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: color 0.15s;
}
.onboarding-skip:hover { color: var(--color-text); }

.ob-content {
  max-width: 400px;
  width: 100%;
  margin: 0 auto;
}

.ob-icon {
  font-size: 4rem;
  display: block;
  margin-bottom: 24px;
  filter: drop-shadow(0 0 16px rgba(124,58,237,0.5));
  line-height: 1;
}

.ob-title {
  font-size: 1.75rem;
  font-weight: 800;
  background: linear-gradient(135deg, #ffffff 0%, var(--color-primary-lt) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 10px;
  line-height: 1.2;
}

.ob-subtitle {
  font-size: 1rem;
  color: var(--color-accent);
  font-weight: 500;
  margin-bottom: 16px;
}

.ob-desc {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  line-height: 1.65;
  margin-bottom: 28px;
}
.ob-desc strong { color: var(--color-text); }

/* "Let's go" next button (slide 1) */
.ob-next-btn {
  display: block;
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-lt));
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 4px 20px rgba(124,58,237,0.35);
  transition: opacity 0.15s;
}
.ob-next-btn:hover { opacity: 0.9; }

/* Demo task card (slide 2) */
.ob-demo-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-warning);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: var(--shadow-card);
}
.ob-demo-title { font-size: 0.95rem; font-weight: 500; color: var(--color-text); }
.ob-demo-meta  { font-size: 0.75rem; color: var(--color-text-muted); }

/* Nudge ID badge (slide 3) */
.ob-nudge-id {
  display: inline-block;
  font-size: 2rem;
  font-weight: 800;
  font-family: monospace;
  letter-spacing: 0.12em;
  background: linear-gradient(135deg, var(--color-primary-lt), var(--color-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 6px;
}
.ob-id-caption {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  margin-bottom: 0;
}

/* Done / CTA button (slide 4) */
.onboarding-done {
  display: block;
  width: calc(100% - 64px);
  max-width: 340px;
  margin: 0 auto;
  padding: 16px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-lt));
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 4px 24px rgba(124,58,237,0.4);
  transition: opacity 0.15s, transform 0.1s;
}
.onboarding-done:hover { opacity: 0.9; }
.onboarding-done:active { transform: scale(0.98); }

/* ── Account deletion ──────────────────────────────────────────────────────── */
/* GDPR / CCPA data rights section */
.data-rights-zone {
  text-align: center;
  padding: 12px 0 4px;
  border-top: 1px solid var(--color-border);
  margin-top: 12px;
}
.data-rights-hint {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin: 4px 0 8px;
}
/* NudgeUP-rodb: vibe CSV export row */
.vibe-export-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.vibe-export-tags-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--color-text-secondary, #a0a0b0);
  cursor: pointer;
  user-select: none;
}
.vibe-export-tags-label input[type="checkbox"] {
  accent-color: var(--color-primary, #6c63ff);
  width: 14px;
  height: 14px;
  cursor: pointer;
}

.btn-text-secondary {
  background: none;
  border: 1px solid var(--color-border);
  color: var(--color-text-secondary, #a0a0b0);
  font-size: 0.82rem;
  cursor: pointer;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  transition: background 0.2s, color 0.2s;
}
.btn-text-secondary:hover { background: var(--color-surface-alt, #1a1a24); color: var(--color-primary-lt); }
.btn-text-secondary:disabled { opacity: 0.5; cursor: default; }

.danger-zone {
  text-align: center;
  padding: 8px 0 4px;
}
.btn-text-danger {
  background: none;
  border: none;
  color: var(--color-danger);
  font-size: 0.82rem;
  cursor: pointer;
  padding: 8px 12px;
  opacity: 0.6;
  transition: opacity 0.2s;
  border-radius: var(--radius-sm);
}
.btn-text-danger:hover { opacity: 1; }

.delete-warning {
  background: rgba(239,68,68,0.10);
  background: color-mix(in srgb, var(--color-danger) 10%, transparent);
  border: 1px solid rgba(239,68,68,0.30);
  border: 1px solid color-mix(in srgb, var(--color-danger) 30%, transparent);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 16px;
  font-size: 0.88rem;
  line-height: 1.55;
}
.delete-warning p { margin: 0 0 8px; }
.delete-warning p:last-child { margin: 0; }

/* ── Trial countdown banner ─────────────────────────────────────────────────── */
.trial-countdown-banner { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: linear-gradient(135deg, #7C3AED, #06B6D4); color: #fff; font-size: 0.875rem; position: sticky; top: 0; z-index: 100; flex-wrap: wrap; }
.trial-countdown-banner.hidden { display: none; }
.trial-banner-text { flex: 1; min-width: 0; }
.trial-banner-cta { background: rgba(255,255,255,0.2); border: 1px solid rgba(255,255,255,0.4); color: #fff; font-size: 0.8rem; padding: 4px 14px; border-radius: 9999px; cursor: pointer; white-space: nowrap; font-weight: 600; }
.trial-banner-cta:hover { background: rgba(255,255,255,0.32); }
.trial-banner-close { background: none; border: none; color: rgba(255,255,255,0.7); cursor: pointer; font-size: 1.1rem; padding: 2px 6px; line-height: 1; margin-left: auto; }
.trial-banner-close:hover { color: #fff; }

/* ── Signup bonus banner (td2) ──────────────────────────────────────────────── */
.signup-bonus-banner { display: flex; align-items: center; gap: 8px; padding: 9px 16px; background: linear-gradient(135deg, #059669, #0891B2); color: #fff; font-size: 0.875rem; position: sticky; top: 0; z-index: 99; flex-wrap: wrap; }
.signup-bonus-banner.hidden { display: none; }
.bonus-banner-icon  { font-size: 1.1rem; flex-shrink: 0; }
.bonus-banner-text  { flex: 1; min-width: 0; }
.bonus-banner-cta   { background: rgba(255,255,255,0.2); border: 1px solid rgba(255,255,255,0.4); color: #fff; font-size: 0.8rem; padding: 4px 14px; border-radius: 9999px; cursor: pointer; white-space: nowrap; font-weight: 600; }
.bonus-banner-cta:hover { background: rgba(255,255,255,0.32); }

/* ── Trial expiry modal ─────────────────────────────────────────────────────── */
.modal-trial {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.modal-trial.hidden { display: none; }

.trial-content {
  width: 100%;
  max-width: 420px;
  background: var(--card);
  border-radius: 20px;
  padding: 32px 24px 24px;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
}
.trial-icon { font-size: 3rem; margin-bottom: 14px; }
.trial-content h2 { font-size: 1.4rem; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.trial-subtitle { color: var(--text-muted); font-size: 0.92rem; margin-bottom: 22px; }

.trial-stats {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 20px;
}
.trial-stat {
  flex: 1;
  background: var(--bg);
  border-radius: 12px;
  padding: 14px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.trial-stat-num   { font-size: 1.9rem; font-weight: 700; color: #7C3AED; line-height: 1; }
.trial-stat-label { font-size: 0.68rem; color: var(--text-muted); font-weight: 500; text-align: center; }

.trial-loss-box {
  background: rgba(239, 68, 68, 0.07);
  border: 1px solid rgba(239, 68, 68, 0.18);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 22px;
  text-align: left;
}
.trial-loss-title { font-size: 0.82rem; font-weight: 600; color: var(--text); margin-bottom: 10px; }
.trial-loss-list  { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 7px; }
.trial-loss-list li { font-size: 0.86rem; color: var(--text-muted); }

.trial-actions { display: flex; flex-direction: column; gap: 10px; }

.btn-trial-upgrade {
  width: 100%;
  padding: 15px;
  background: linear-gradient(135deg, #9B67F5, #06B6D4);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.35);
  transition: opacity 0.15s, transform 0.1s;
}
.btn-trial-upgrade:hover  { opacity: 0.92; }
.btn-trial-upgrade:active { transform: scale(0.98); }

.btn-trial-snooze {
  width: 100%;
  padding: 12px;
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.9rem;
  border-radius: 50px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.btn-trial-snooze:hover { border-color: #7C3AED; color: #7C3AED; }

.btn-trial-downgrade {
  width: 100%;
  padding: 8px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.8rem;
  cursor: pointer;
  text-decoration: underline;
  transition: color 0.15s;
}
.btn-trial-downgrade:hover { color: #EF4444; }

/* ── Block user ────────────────────────────────────────────────────────────── */
.block-warning-text {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  line-height: 1.55;
  margin-bottom: 20px;
}

/* Block button on bud cards */
.btn-block {
  background: none;
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  margin-left: auto;
  flex-shrink: 0;
}
.btn-block:hover { color: var(--color-danger); border-color: var(--color-danger); }

/* Remove-bud × button (NudgeUP-wjc8) */
.btn-bud-remove {
  position: absolute;
  top: 6px; right: 8px;
  background: none;
  border: none;
  color: var(--color-text-muted);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  opacity: 0;
  transition: opacity 0.15s, color 0.15s;
}
.bud-card { position: relative; }
.bud-card:hover .btn-bud-remove,
.bud-card:focus-within .btn-bud-remove { opacity: 1; }
.btn-bud-remove:hover { color: var(--color-danger); }

/* Broadcast text truncation (NudgeUP-wjc8) */
.bc-text { display: -webkit-box; word-break: break-word; }
.bc-text-clamped {
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
.btn-bc-show-more {
  background: none;
  border: none;
  color: var(--color-primary);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  margin-left: 4px;
  font-family: inherit;
}

/* Blocked users section in profile */
/* ── Public profile (NudgeUP-40st) ──────────────────────────────── */
.public-username-row {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--color-surface, #f8f4ee);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 8px 12px;
  margin-bottom: 6px;
}
.public-username-prefix {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  white-space: nowrap;
}
.public-username-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--color-text);
  outline: none;
  min-width: 0;
}
.public-username-hint {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  margin-bottom: 10px;
}
.public-username-hint.valid   { color: var(--color-success); }
.public-username-hint.error   { color: var(--color-danger, #d4604a); }
.public-profile-link-text {
  color: var(--color-accent, #d4604a);
  word-break: break-all;
  font-size: 0.85rem;
}

.blocked-section {
  margin: 20px 0 8px;
  padding-top: 16px;
  border-top: 1px solid var(--color-border);
}
.blocked-section-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-text-muted);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.blocked-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--color-border);
}
.blocked-item:last-child { border-bottom: none; }
.blocked-avatar { font-size: 1rem; opacity: 0.35; }
.blocked-name   { flex: 1; font-size: 0.9rem; }

/* Swiper pagination dots */
.onboarding-pagination {
  bottom: 28px !important;
}
.onboarding-pagination .swiper-pagination-bullet {
  width: 8px; height: 8px;
  background: var(--color-text-muted);
  opacity: 0.4;
  transition: all 0.2s;
}
.onboarding-pagination .swiper-pagination-bullet-active {
  background: var(--color-primary-lt);
  opacity: 1;
  width: 20px;
  border-radius: 4px;
}

/* ── Streak section ────────────────────────────────────────────────────────── */
.streak-section {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 20px 16px 16px;
  margin-bottom: 20px;
  text-align: center;
  border: 1px solid var(--color-border);
}
.streak-current {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 4px;
}
.streak-flame {
  font-size: 2rem;
  line-height: 1;
}
.streak-count {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--color-primary-lt);
  line-height: 1;
  letter-spacing: -1px;
}
.streak-label {
  font-size: 1rem;
  color: var(--color-text-muted);
  align-self: flex-end;
  padding-bottom: 4px;
}
.streak-best {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-bottom: 16px;
}
.streak-chart-wrap {
  width: 100%;
  max-width: 340px;
  margin: 0 auto;
}

/* ── Vibe Trends chart (NudgeUP-qh6) ──────────────────────────────────────── */
.vibe-trend-section {
  margin: 0 0 20px;
}
.vibe-trend-card {
  background: var(--color-surface);
  border: 1px solid rgba(249, 115, 22, 0.25);
  border-radius: var(--radius-lg);
  padding: 16px;
}
.vibe-trend-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}
.vibe-trend-icon {
  font-size: 1.75rem;
  flex-shrink: 0;
  line-height: 1;
}
.vibe-trend-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.vibe-trend-pro-badge {
  font-size: 0.6875rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--color-primary), #a855f7);
  color: #fff;
  padding: 1px 6px;
  border-radius: 9999px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.vibe-trend-desc {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin: 0;
  line-height: 1.45;
}
.vibe-trend-chart-wrap {
  position: relative;
  width: 100%;
  min-height: 140px;
}
.vibe-trend-legend {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  font-size: 0.75rem;
  color: var(--color-text-muted);
}
.vibe-trend-legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ── Streak Freeze (NudgeUP-fkr1) ─────────────────────────────────────────── */
.streak-freeze-section {
  margin: 0 0 20px;
}
.streak-freeze-card {
  background: var(--color-surface);
  border: 1px solid rgba(99, 179, 237, 0.3);
  border-radius: var(--radius-lg);
  padding: 16px;
}
.streak-freeze-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}
.streak-freeze-icon {
  font-size: 1.75rem;
  flex-shrink: 0;
  line-height: 1;
}
.streak-freeze-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.streak-freeze-pro-badge {
  font-size: 0.6875rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--color-primary), #a855f7);
  color: #fff;
  padding: 1px 6px;
  border-radius: 9999px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.streak-freeze-desc {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin: 0;
  line-height: 1.45;
}
.streak-freeze-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.btn-streak-freeze {
  background: linear-gradient(135deg, #4299e1, #63b3ed);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  padding: 10px 18px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
  width: 100%;
}
.btn-streak-freeze:hover:not(:disabled) {
  opacity: 0.9;
  transform: translateY(-1px);
}
.btn-streak-freeze:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}
.streak-freeze-status {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin: 0;
  text-align: center;
}

/* ── Streak milestone toast ────────────────────────────────────────────────── */
.streak-toast {
  position: fixed;
  bottom: calc(var(--nav-height, 64px) + 16px);
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: linear-gradient(135deg, var(--color-primary) 0%, #a855f7 100%);
  color: #fff;
  padding: 14px 24px;
  border-radius: var(--radius-lg);
  font-size: 0.9375rem;
  font-weight: 600;
  text-align: center;
  box-shadow: 0 4px 24px rgba(0,0,0,0.25);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  white-space: nowrap;
}
.streak-toast.toast-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.streak-toast-emoji {
  display: block;
  font-size: 1.75rem;
  margin-bottom: 4px;
}

/* ── Nudge Time / Push Notifications ──────────────────────────────────────── */
/* ── Security / 2FA section ───────────────────────────────────────────────── */
.security-section {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 20px;
  border: 1px solid var(--color-border);
}
.mfa-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}
/* OTP code input — large monospace digits */
.otp-input {
  font-family: 'Courier New', Courier, monospace !important;
  font-size: 1.5rem !important;
  font-weight: 700;
  letter-spacing: 0.35em;
  text-align: center;
  background: var(--color-bg);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  padding: 10px 12px;
  width: 100%;
}
.otp-input:focus {
  border-color: var(--color-primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(124,58,237,0.18);
}
/* MFA QR code container */
.mfa-qr-container {
  display: flex;
  justify-content: center;
  margin: 12px auto;
  max-width: 200px;
}
.mfa-qr-container svg,
.mfa-qr-container img {
  width: 180px !important;
  height: 180px !important;
  border-radius: var(--radius-sm);
  padding: 8px;
  background: #fff;
}
/* Inline TOTP secret */
.mfa-secret-code {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  background: var(--color-surface-2);
  padding: 2px 6px;
  border-radius: 4px;
  user-select: all;
  word-break: break-all;
}
/* Recovery codes grid */
.recovery-codes-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 12px 0;
}
.recovery-code-item {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  text-align: center;
  color: var(--color-primary-lt);
}
/* Danger-outline button (disable MFA) */
.btn-danger-outline {
  background: none;
  border: 1.5px solid var(--color-danger);
  color: var(--color-danger);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-danger-outline:hover { background: rgba(239,68,68,0.08); }

.nudge-time-section {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 20px;
  border: 1px solid var(--color-border);
}
.settings-section-title {
  font-size: 0.9375rem;
  font-weight: 700;
  margin: 0 0 4px;
  color: var(--color-text);
}
.nudge-time-desc {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin: 0 0 12px;
}
.nudge-time-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.nudge-time-input {
  flex: 1;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  font-size: 1rem;
  padding: 8px 10px;
  outline: none;
  transition: border-color 0.2s;
}
.nudge-time-input:focus { border-color: var(--color-primary); }
.btn-sm {
  font-size: 0.8125rem;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 1px solid transparent;
  transition: opacity 0.2s, transform 0.1s;
  white-space: nowrap;
}
.btn-sm:active { transform: scale(0.97); }
.btn-push-subscribe {
  width: 100%;
  background: rgba(124,58,237,0.12);
  background: color-mix(in srgb, var(--color-primary) 12%, transparent);
  border-color: rgba(124,58,237,0.40);
  border-color: color-mix(in srgb, var(--color-primary) 40%, transparent);
  color: var(--color-primary-lt);
  font-size: 0.875rem;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s;
}
.btn-push-subscribe:hover:not(:disabled) {
  background: rgba(124,58,237,0.20);
  background: color-mix(in srgb, var(--color-primary) 20%, transparent);
}
.btn-push-subscribe:disabled {
  opacity: 0.55;
  cursor: default;
}
.push-status {
  font-size: 0.8rem;
  margin: 8px 0 0;
}
.push-status-ok    { color: var(--color-success, #22c55e); }
.push-status-error { color: var(--color-danger); }
.push-status.error { color: var(--color-danger); } /* legacy alias */

.input-char-count {
  font-size: 0.72rem;
  color: var(--color-text-muted);
  white-space: nowrap;
  align-self: center;
  flex-shrink: 0;
}

/* ── Coach name chips (NudgeUP-49ab) ──────────────────────────────────────── */
.coach-name-chips,
.ob-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.coach-chip {
  background: rgba(124,58,237,0.12);
  background: color-mix(in srgb, var(--color-primary) 12%, transparent);
  border: 1px solid rgba(124,58,237,0.30);
  border: 1px solid color-mix(in srgb, var(--color-primary) 30%, transparent);
  color: var(--color-primary-lt);
  border-radius: 20px;
  padding: 3px 12px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.coach-chip:hover,
.coach-chip:focus-visible {
  background: rgba(124,58,237,0.25);
  background: color-mix(in srgb, var(--color-primary) 25%, transparent);
  border-color: var(--color-primary);
  outline: none;
}
/* Coach voice gender toggle (NudgeUP-i77f) */
.coach-voice-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.coach-voice-label {
  font-size: 0.8rem;
  color: var(--text-muted, #888);
  min-width: 36px;
}
.coach-voice-toggle {
  display: flex;
  gap: 4px;
  background: var(--card-bg, rgba(255,255,255,0.05));
  border: 1px solid var(--border, rgba(255,255,255,0.1));
  border-radius: 20px;
  padding: 3px;
}
.coach-voice-btn {
  background: none;
  border: none;
  border-radius: 16px;
  padding: 4px 14px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted, #888);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.coach-voice-btn.active,
.coach-voice-btn[aria-pressed="true"] {
  background: var(--color-primary, #9B67F5);
  color: #fff;
}
.coach-voice-btn:hover:not(.active) { color: var(--text, #fff); }
.coach-voice-status {
  font-size: 0.75rem;
  color: var(--color-success, #22c55e);
  transition: opacity 0.3s;
}
.coach-voice-status.hidden { display: none; }

/* ── Coach memory card (NudgeUP-93ks) ─────────────────────────────────────── */
.coach-memory-card {
  background: var(--card-bg, rgba(255,255,255,0.05));
  border: 1px solid rgba(155,103,245,0.2);
  border-radius: 12px;
  padding: 14px 16px;
  margin-top: 14px;
}
.coach-memory-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-align: left;
}
.coach-memory-header[aria-expanded="true"] { margin-bottom: 10px; }
.coach-memory-chevron { font-size: 1rem; color: var(--muted, #888); transition: transform 0.2s; }
.coach-memory-header[aria-expanded="true"] .coach-memory-chevron { transform: rotate(90deg); }
.coach-memory-body { padding-top: 8px; }
.coach-memory-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent, #9b67f5);
  opacity: 0.85;
}
.coach-memory-badge {
  font-size: 0.7rem;
  color: var(--muted, #888);
}
.coach-memory-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.coach-memory-entry {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(155,103,245,0.06);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--text, #e0e0e0);
}
.coach-memory-text {
  flex: 1;
}
.coach-memory-delete {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  color: var(--muted, #888);
  padding: 0 2px;
  line-height: 1;
  opacity: 0.6;
  transition: opacity 0.2s;
  flex-shrink: 0;
}
.coach-memory-delete:hover { opacity: 1; color: #ef4444; }
.coach-memory-empty {
  font-size: 0.8rem;
  color: var(--muted, #888);
  font-style: italic;
  text-align: center;
  padding: 8px 0;
}
.coach-memory-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}
.coach-memory-tag {
  font-size: 0.65rem;
  background: rgba(155,103,245,0.15);
  color: var(--accent, #9b67f5);
  border-radius: 99px;
  padding: 2px 7px;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.coach-memory-age {
  display: block;
  font-size: 0.65rem;
  color: var(--muted, #888);
  margin-top: 3px;
}
.coach-memory-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

/* Onboarding slide coach input */
.ob-coach-input {
  width: 100%;
  max-width: 240px;
  padding: 10px 14px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg);
  color: var(--color-text);
  font-size: 1rem;
  text-align: center;
  margin: 12px auto 0;
  display: block;
}
.ob-coach-input:focus {
  border-color: var(--color-primary);
  outline: none;
}

/* ── Vibe filter tab ───────────────────────────────────────────────────────── */
.filter-btn-vibe {
  background: rgba(124,58,237,0.10);
  background: color-mix(in srgb, var(--color-primary) 10%, transparent);
  border-color: rgba(124,58,237,0.30) !important;
  border-color: color-mix(in srgb, var(--color-primary) 30%, transparent) !important;
  color: var(--color-primary-lt) !important;
}
.filter-btn-vibe.active {
  background: var(--color-primary) !important;
  color: #fff !important;
  border-color: var(--color-primary) !important;
}

/* ── Vibe share button ─────────────────────────────────────────────────────── */
.vibe-share-row {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--color-border);
}
.btn-vibe-share {
  background: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
  font-size: 0.8125rem;
  padding: 7px 14px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.btn-vibe-share:hover:not(:disabled) {
  color: var(--color-primary-lt);
  border-color: var(--color-primary-lt);
}
.btn-vibe-share:disabled { opacity: 0.5; cursor: default; }

/* ── Vibe mood quick-tags (NudgeUP-qpn8) ────────────────────────────────── */
.vibe-tags-row { margin-top: 10px; }
.vibe-tags-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--color-text-muted);
  display: block;
  margin-bottom: 6px;
}
.vibe-tag-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.vibe-tag-chip {
  padding: 4px 10px;
  border-radius: 16px;
  border: 1px solid var(--color-border);
  background: transparent;
  font-size: 0.76rem;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  white-space: nowrap;
}
.vibe-tag-chip:hover { border-color: var(--color-primary); color: var(--color-primary); }
.vibe-tag-chip.selected {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}
.vibe-tag-chip:disabled { opacity: 0.45; cursor: default; }

/* ── Close-your-day vibe CTA (NudgeUP-mkjy) ────────────────────────────── */
.all-done-vibe-cta {
  margin-top: 8px;
  font-size: 0.82rem;
  color: var(--color-text-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.all-done-vibe-cta:hover { color: var(--color-text); }

/* ── Past coaching panel (NudgeUP-qn31) ─────────────────────────────────── */
.past-coaching-section {
  margin-top: 18px;
  border-top: 1px solid var(--color-border);
  padding-top: 12px;
}
.past-coaching-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-align: left;
}
.past-coaching-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--color-text-muted);
}
.past-coaching-chevron {
  font-size: 1rem;
  color: var(--color-text-muted);
  transition: transform 0.2s;
}
.past-coaching-toggle[aria-expanded="true"] .past-coaching-chevron { transform: rotate(90deg); }
.past-coaching-body { padding-top: 10px; }
.past-coaching-list { display: flex; flex-direction: column; gap: 6px; }
.past-coaching-entry {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  padding: 6px 10px;
  background: rgba(155,103,245,0.05);
  border-radius: 8px;
  line-height: 1.4;
}
.past-coaching-tags { display: flex; gap: 4px; margin-top: 4px; flex-wrap: wrap; }
.past-coaching-tag {
  font-size: 0.65rem;
  padding: 1px 6px;
  border-radius: 10px;
  background: rgba(155,103,245,0.12);
  color: var(--color-primary);
}
.past-coaching-empty { font-size: 0.78rem; color: var(--color-text-muted); font-style: italic; margin: 0; }

/* ── AI category suggestion chip (NudgeUP-zy5j) ─────────────────────────── */
.ai-category-suggestion {
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.ai-cat-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  border: 1.5px dashed var(--color-primary);
  background: transparent;
  color: var(--color-primary);
  font-size: 0.76rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  opacity: 0.85;
}
.ai-cat-chip:hover { background: var(--color-primary); color: #fff; opacity: 1; }
.ai-cat-chip .ai-badge { font-size: 0.65rem; opacity: 0.7; }

/* ── Streak-risk banner (NudgeUP-xit5) ──────────────────────────────────── */
.streak-risk-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, rgba(245,158,11,0.12), rgba(239,68,68,0.08));
  border: 1px solid rgba(245,158,11,0.35);
  border-radius: var(--radius-lg);
  padding: 10px 14px;
  margin-bottom: 12px;
  animation: slideDown 0.25s ease;
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.streak-risk-icon { font-size: 1.2rem; flex-shrink: 0; }
.streak-risk-msg  { flex: 1; font-size: 0.88rem; line-height: 1.4; margin: 0; color: var(--color-text); }
.streak-risk-dismiss {
  flex-shrink: 0;
  background: none;
  border: none;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  color: var(--color-text-muted);
  padding: 2px 4px;
  border-radius: 4px;
  transition: color 0.15s;
}
.streak-risk-dismiss:hover { color: var(--color-text); }

/* ── Clarity suggestion banner (NudgeUP-r7ku) ───────────────────────────── */
.clarity-suggest-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, rgba(124,58,237,0.08), rgba(99,102,241,0.06));
  border: 1px solid rgba(124,58,237,0.3);
  border-radius: var(--radius-lg);
  padding: 9px 12px;
  margin-top: 8px;
  animation: slideDown 0.25s ease;
}
.clarity-suggest-text { flex: 1; font-size: 0.86rem; line-height: 1.4; color: var(--color-text); }
.clarity-suggest-dismiss {
  flex-shrink: 0;
  background: none;
  border: none;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  color: var(--color-text-muted);
  padding: 2px 4px;
  border-radius: 4px;
  transition: color 0.15s;
}
.clarity-suggest-dismiss:hover { color: var(--color-text); }

/* ── Vibe insights card (NudgeUP-jbd8) ──────────────────────────────────── */
/* Today's Day Plan card (NudgeUP-oz24) */
.day-plan-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-primary, #7c3aed);
  border-radius: var(--radius-lg);
  padding: 14px 16px 12px;
  margin-bottom: 16px;
}
.day-plan-card.hidden { display: none; }
.day-plan-card-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.day-plan-card-label {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--color-primary, #7c3aed);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.day-plan-card-time {
  font-size: 0.75rem;
  color: var(--color-text-muted, #9ca3af);
}
.day-plan-card-body {
  font-size: 0.875rem;
  color: var(--color-text, #e5e7eb);
  line-height: 1.5;
  margin: 0 0 12px;
}
.day-plan-card-footer {
  display: flex;
  align-items: center;
  gap: 8px;
}
.day-plan-dismiss-btn {
  font-size: 0.8125rem;
  color: var(--color-text-muted, #9ca3af);
  border-color: transparent;
}
.day-plan-regen-btn {
  font-size: 0.8125rem;
  padding: 5px 14px;
}

.vibe-insights-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 14px 16px 12px;
  margin-bottom: 16px;
}
.vibe-insights-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.vibe-insights-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
}
.vibe-insights-stats { display: flex; align-items: center; gap: 6px; }
.vibe-insights-badge { font-size: 0.78rem; font-weight: 600; color: var(--color-primary); }
.vibe-insights-trend-arrow { font-size: 1rem; font-weight: 700; }
.vibe-insights-trend-arrow.trend-up   { color: #22c55e; }
.vibe-insights-trend-arrow.trend-down { color: #ef4444; }
.vibe-insights-trend-arrow.trend-flat { color: var(--color-text-muted); }
.vibe-insights-sparkline { width: 100%; min-height: 60px; }
.vibe-insights-sparkline svg { overflow: visible; }
.vibe-insights-days { display: flex; gap: 12px; margin-top: 6px; flex-wrap: wrap; }
.vibe-insights-day-label { font-size: 0.72rem; color: var(--color-text-muted); }
.vibe-insights-ai {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  font-style: italic;
  margin: 8px 0 0;
  padding-top: 8px;
  border-top: 1px solid var(--color-border);
}

/* ── Vibe sparkline (NudgeUP-hou) ─────────────────────────────────────────── */
.vibe-sparkline-section {
  margin-top: 20px;
  padding: 14px 16px;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
}
.sparkline-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin-bottom: 10px;
}
.vibe-sparkline { width: 100%; min-height: 60px; }
.vibe-sparkline svg { overflow: visible; }

/* ── Buds header buttons ──────────────────────────────────────────────────── */
.buds-header-btns { display: flex; align-items: center; gap: 8px; }
.btn-icon-sm {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  font-size: 1.1rem;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: border-color 0.15s;
}
.btn-icon-sm:hover { border-color: var(--color-primary); }

/* ── Report modal (NudgeUP-wh8) ──────────────────────────────────────────── */
.report-subtitle {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-bottom: 14px;
}
.report-categories { display: flex; flex-wrap: wrap; gap: 8px; }
.report-cat {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--color-border);
  background: var(--color-surface-2);
  font-size: 0.85rem;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.report-cat.selected {
  border-color: var(--color-danger);
  background: rgba(239, 68, 68, 0.1);
  color: var(--color-danger);
  font-weight: 600;
}
.btn-report-sm {
  margin-left: auto;
  flex-shrink: 0;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 4px;
  opacity: 0.5;
  transition: opacity 0.15s, color 0.15s;
}
.btn-report-sm:hover { opacity: 1; color: var(--color-danger); }

/* ── Quick-react bar on received broadcast cards (NudgeUP-4kw / NudgeUP-665) ── */
/* Burst expand toggle (NudgeUP-m6kg + NudgeUP-qw1b) */
.btn-burst-expand {
  display: inline-block;
  margin-top: 5px;
  font-size: 0.78rem;
  color: var(--color-primary);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-weight: 600;
  transition: opacity 0.15s ease;
}
.btn-burst-expand:hover { text-decoration: underline; }
.burst-expand-inner {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: hidden;
  max-height: 500px;
  transition: max-height 0.3s ease;
}
.burst-expand-inner.burst-collapsed { max-height: 0; }
.burst-expand-inner li {
  font-size: 0.83rem;
  color: var(--color-text);
  padding: 4px 8px;
  background: var(--color-bg);
  border-radius: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.burst-item-time { font-size: 0.75rem; color: var(--color-text-muted); flex-shrink: 0; }

.broadcast-react-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 7px;
}
.btn-react {
  background: var(--color-surface-1, var(--color-surface-2));
  border: 1.5px solid transparent;
  border-radius: 20px;
  padding: 2px 9px;
  font-size: 0.95rem;
  line-height: 1.5;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.btn-react:hover { border-color: var(--color-primary); }
.btn-react.active {
  border-color: var(--color-primary);
  background: rgba(124,58,237,0.18);
  background: color-mix(in srgb, var(--color-primary) 18%, transparent);
}

/* ── Voice broadcast transcript (NudgeUP-2rc) ───────────────────────────── */
.transcript-section {
  margin-top: 7px;
  font-size: 0.8rem;
  color: var(--color-text-muted);
}
.btn-show-transcript {
  background: none;
  border: 1px solid var(--color-border, rgba(255,255,255,0.12));
  border-radius: 12px;
  padding: 2px 10px;
  font-size: 0.78rem;
  cursor: pointer;
  color: var(--color-text-muted);
  font-family: inherit;
  transition: border-color 0.15s, color 0.15s;
}
.btn-show-transcript:hover:not(:disabled) { border-color: var(--color-primary); color: var(--color-primary); }
.btn-show-transcript:disabled { opacity: 0.55; cursor: default; }
.transcript-text { margin-top: 4px; line-height: 1.45; color: var(--color-text); }
.transcript-conf-badge {
  display: inline-block;
  font-size: 0.7rem;
  background: rgba(255,200,0,0.15);
  color: #c8a200;
  border-radius: 4px;
  padding: 1px 5px;
  margin-right: 4px;
  vertical-align: middle;
}
.btn-retry-transcript {
  background: none;
  border: 1px solid rgba(200,162,0,0.4);
  border-radius: 12px;
  padding: 1px 8px;
  font-size: 0.72rem;
  cursor: pointer;
  color: #c8a200;
  font-family: inherit;
  margin-left: 6px;
  transition: border-color 0.15s, opacity 0.15s;
}
.btn-retry-transcript:hover:not(:disabled) { border-color: #c8a200; }
.btn-retry-transcript:disabled { opacity: 0.5; cursor: default; }
.transcript-retry-spinner { font-size: 0.72rem; color: var(--color-text-muted); margin-left: 4px; }

/* ── QR code modal (NudgeUP-45w) ────────────────────────────────────────── */
.qr-subtitle {
  font-size: 0.88rem;
  color: var(--color-text-muted);
  margin-bottom: 20px;
}
.qr-container { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.qr-code {
  padding: 12px;
  background: #fff;
  border-radius: 12px;
  display: inline-flex;
}
.qr-nudge-id-text {
  font-size: 1.4rem;
  font-weight: 700;
  font-family: monospace;
  letter-spacing: 0.1em;
  color: var(--color-primary);
  margin-bottom: 4px;
}

/* ── Micro-animations ──────────────────────────────────────────────────────── */

/* Streak flame flicker */
@keyframes flame-flicker {
  0%, 100% { transform: scale(1) rotate(-2deg); }
  25%       { transform: scale(1.08) rotate(2deg); }
  50%       { transform: scale(0.96) rotate(-1deg); }
  75%       { transform: scale(1.05) rotate(1deg); }
}
.streak-flame {
  display: inline-block;
  animation: flame-flicker 2.4s ease-in-out infinite;
  transform-origin: center bottom;
}

/* View crossfade transition */
@keyframes view-fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.view.active { animation: view-fade-in 0.2s ease; }

/* Pulse on empty state CTA button */
@keyframes pulse-add {
  0%, 100% { box-shadow: 0 0 0 0 rgba(124,58,237,0.4); }
  50%       { box-shadow: 0 0 0 6px rgba(124,58,237,0); }
}
.btn-add.pulse { animation: pulse-add 2s ease-in-out infinite; }

/* Broadcast confetti particles */
@keyframes confetti-pop {
  0%   { opacity: 1; transform: translate(0, 0) scale(1); }
  100% { opacity: 0; transform: translate(var(--tx), var(--ty)) scale(0.5); }
}
.confetti-particle {
  position: fixed;
  width: 8px; height: 8px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  animation: confetti-pop 0.6s ease-out forwards;
}

/* ── Password strength meter ────────────────────────────────────────────────── */
.pw-strength {
  margin-top: 6px;
}
.pw-strength-bar {
  display: flex;
  gap: 4px;
  height: 4px;
}
.pw-strength-seg {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: var(--color-border);
  transition: background 0.2s;
}
.pw-strength-label {
  display: block;
  font-size: 11px;
  margin-top: 4px;
  color: var(--color-text-muted);
  transition: color 0.2s;
}
.pw-breach-warning {
  font-size: 12px;
  color: var(--color-danger);
  margin-top: 5px;
  line-height: 1.4;
}

/* ── Birthday display ──────────────────────────────────────────────────────── */
.birthday-saved-display {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin: 4px 0 0;
}

/* ── Founding Member badge (NudgeUP-xld) ─────────────────────────────────────── */
.founder-badge {
  display: inline-block;
  font-size: 0.75rem;
  vertical-align: middle;
  line-height: 1;
  animation: founder-shimmer 2.5s ease-in-out infinite;
  cursor: default;
  user-select: none;
}

@keyframes founder-shimmer {
  0%, 100% { opacity: 1;   transform: scale(1);    }
  50%       { opacity: 0.6; transform: scale(1.18); }
}

.founder-badge-lg {
  font-size: 1.25rem;
}

.profile-founding-section {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  margin: 8px 0 4px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.1), rgba(6, 182, 212, 0.08));
  border: 1px solid rgba(124, 58, 237, 0.2);
  border-radius: 10px;
}

.profile-founding-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.profile-founding-text strong {
  font-size: 0.875rem;
  color: var(--color-text);
}

.profile-founding-since {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

/* ── Founding Member — additional styles (NudgeUP-xld) ───────────────────── */
.founding-badge {
  font-size: 0.75em;
  margin-left: 4px;
  animation: founding-shimmer 3s ease-in-out infinite;
}
.founding-border { box-shadow: 0 0 0 2px #9B67F5, 0 0 0 4px #06B6D4; }
.founding-member-card {
  background: linear-gradient(135deg, rgba(155,103,245,0.3), rgba(6,182,212,0.18));
  border: 1px solid #9B67F5;
  border-radius: 12px;
  padding: 12px 16px;
  font-weight: 600;
  color: #9B67F5;
  margin: 12px 0;
}
@keyframes founding-shimmer {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* ── Referral Card (NudgeUP-o0x3) ───────────────────────────────────────── */
.referral-card {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  padding: 16px;
  margin: 12px 0;
}
/* Share card tabs (NudgeUP-e426) */
.share-tabs {
  display: flex;
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: 4px;
  margin: 8px 0 14px;
  gap: 2px;
}
.share-tab-btn {
  flex: 1;
  padding: 8px 10px;
  background: none;
  border: none;
  color: var(--color-text-muted);
  font-size: 0.8125rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s;
}
.share-tab-btn.active {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-lt));
  color: #fff;
  box-shadow: 0 2px 8px rgba(124,58,237,0.3);
}
.share-tab-panel { /* visible by default; hidden panel gets .hidden */ }

.referral-desc {
  font-size: 13px;
  color: var(--color-text-muted);
  margin: 4px 0 10px;
  line-height: 1.5;
}
.referral-stats {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 10px;
}
.referral-stats-dot { color: var(--color-text-muted); }
.referral-link-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.referral-link-input {
  flex: 1;
  font-size: 12px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.referral-qr {
  display: flex;
  justify-content: center;
  margin: 4px 0 10px;
}
.referral-qr canvas,
.referral-qr img { border-radius: 8px; }
.referral-note {
  font-size: 12px;
  color: var(--color-text-muted);
  text-align: center;
  margin: 0;
}

/* Tier progress bar (NudgeUP-hir) */
.referral-tier-progress {
  margin: 12px 0 4px;
}
.referral-tier-bar-wrap {
  height: 6px;
  background: var(--color-surface-2);
  border-radius: 99px;
  overflow: hidden;
}
.referral-tier-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  border-radius: 99px;
  transition: width 0.6s ease;
  min-width: 4px;
}
.referral-tier-label {
  font-size: 11px;
  color: var(--color-text-muted);
  margin: 5px 0 0;
  text-align: center;
}

/* ── Group Burst Events (NudgeUP-fww) ────────────────────────────────────── */
.burst-section { margin-top: 20px; }
.burst-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.burst-section-title { font-size: 14px; font-weight: 700; color: var(--color-text); }
.burst-list { display: flex; flex-direction: column; gap: 10px; }
.burst-card {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  padding: 14px;
}
.burst-card-header { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.burst-category-icon { font-size: 22px; line-height: 1; flex-shrink: 0; }
.burst-card-titles { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.burst-title { font-size: 14px; font-weight: 600; color: var(--color-text); line-height: 1.3; }
.burst-countdown { font-size: 11px; color: var(--color-text-muted); }
.burst-creator-badge {
  font-size: 10px;
  background: rgba(124,58,237,0.15);
  background: color-mix(in srgb, var(--color-primary) 15%, transparent);
  color: var(--color-primary);
  border-radius: 6px;
  padding: 2px 7px;
  font-weight: 600;
  white-space: nowrap;
}
.burst-members-row { display: flex; align-items: center; gap: 6px; margin-bottom: 12px; }
.burst-member-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--color-border);
  flex-shrink: 0;
  transition: background 0.2s;
}
.burst-member-dot.done { background: #22c55e; }
.burst-member-count { font-size: 12px; color: var(--color-text-muted); margin-left: 4px; }
.btn-burst-complete { width: 100%; justify-content: center; }
.burst-done-badge {
  font-size: 13px; color: #22c55e; font-weight: 600;
  display: block; text-align: center; padding: 4px 0;
}
.burst-empty { font-size: 13px; color: var(--color-text-muted); text-align: center; padding: 12px 0; margin: 0; }
.burst-modal-note { font-size: 12px; color: var(--color-text-muted); margin: 8px 0 0; }

/* ── Referral Leaderboard (NudgeUP-cm4n) ─────────────────────────────────── */
.referral-leaderboard {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  padding: 16px;
  margin: 12px 0;
}
.leaderboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.leaderboard-header .settings-section-title { margin: 0; }
.leaderboard-filter {
  display: flex;
  gap: 4px;
}
.leaderboard-filter-btn {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 99px;
  border: 1px solid var(--color-border);
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.leaderboard-filter-btn.active {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}
.leaderboard-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.leaderboard-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--color-surface);
  font-size: 13px;
}
.leaderboard-row-me {
  border: 1px solid var(--color-primary);
  background: var(--color-surface-2);
  background: color-mix(in srgb, var(--color-primary) 8%, var(--color-surface));
}
.lb-rank {
  font-size: 15px;
  min-width: 28px;
  text-align: center;
}
.lb-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.lb-name {
  flex: 1;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lb-name em { font-style: normal; color: var(--color-text-muted); font-size: 11px; }
.lb-delta {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 6px;
  flex-shrink: 0;
}
.lb-delta-up    { color: #22c55e; background: rgba(34,197,94,0.12);  background: color-mix(in srgb, #22c55e 12%, transparent); }
.lb-delta-down  { color: #ef4444; background: rgba(239,68,68,0.12);  background: color-mix(in srgb, #ef4444 12%, transparent); }
.lb-delta-same  { color: var(--color-text-muted); }
.lb-delta-new   { color: var(--color-primary); }
.lb-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
}
.lb-count-label {
  font-weight: 400;
  color: var(--color-text-muted);
}
.leaderboard-loading,
.leaderboard-empty {
  list-style: none;
  text-align: center;
  font-size: 13px;
  color: var(--color-text-muted);
  padding: 16px 0;
}
.leaderboard-self-rank {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 8px 12px;
  border-top: 1px solid var(--color-border);
  font-size: 12px;
}
.lb-self-label { color: var(--color-text-muted); }
.lb-self-hint  { color: var(--color-text-muted); font-style: italic; margin-left: auto; font-size: 11px; }

/* ── Changelog Modal (NudgeUP-sql) ───────────────────────────────────────── */
.changelog-modal-body { max-height: 60vh; overflow-y: auto; padding: 0 4px; }
.changelog-version-tag {
  display: inline-block; font-size: 11px; font-weight: 700;
  background: rgba(155,103,245,0.15); color: #9B67F5;
  border-radius: 99px; padding: 2px 10px; margin-bottom: 8px;
}
.changelog-release-date { font-size: 12px; color: var(--color-text-muted); margin-bottom: 12px; }
.changelog-image { width: 100%; border-radius: 10px; margin-bottom: 12px; }
.changelog-body-text { font-size: 14px; line-height: 1.65; color: var(--color-text); white-space: pre-wrap; }
.changelog-inline-section {
  margin: 12px 0;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  overflow: hidden;
}
.changelog-inline-toggle {
  width: 100%; background: none; border: none; cursor: pointer;
  padding: 12px 16px; text-align: left;
  color: var(--color-text); font-size: 14px; font-weight: 600;
  display: flex; align-items: center; justify-content: space-between;
}
.changelog-inline-content {
  padding: 0 16px 12px; font-size: 13px; line-height: 1.6;
  color: var(--color-text-muted); white-space: pre-wrap;
}
.changelog-inline-content.hidden { display: none; }

/* Changelog History Sheet (NudgeUP-j7a4) */
.changelog-history-entry { padding: 16px 0; }
.changelog-history-divider { border-top: 1px solid var(--color-border, rgba(255,255,255,0.08)); }
.changelog-new-badge {
  display: inline-block;
  font-size: 0.625rem;
  font-weight: 800;
  background: #22c55e;
  color: #fff;
  border-radius: 9999px;
  padding: 1px 7px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  vertical-align: middle;
}
.about-changelog-link {
  display: inline-block;
  background: none;
  border: none;
  color: var(--color-primary, #7c3aed);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0 0 12px;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.about-changelog-link:hover { opacity: 0.8; }

/* Nav badge dot */
/* ── Profile nav new-item dot (B+E) ────────────────────────────────────────── */
.nav-new-dot {
  position: absolute;
  top: -2px; right: -2px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--color-primary);
  border: 1.5px solid var(--color-bg);
  animation: nav-dot-pulse 2s ease-in-out infinite;
}
@keyframes nav-dot-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.6; transform: scale(0.85); }
}

.nav-btn.has-badge .nav-icon { position: relative; }
.nav-btn.has-badge .nav-icon::after {
  content: '';
  position: absolute; top: -1px; right: -1px;
  width: 8px; height: 8px; border-radius: 50%;
  background: #EF4444;
  border: 1.5px solid var(--color-bg);
}

/* ── App Footer (NudgeUP-4x3) ────────────────────────────────────────────── */
.app-footer { text-align: center; padding: 16px; color: #999; font-size: 12px; }
.app-footer a { color: #9B67F5; text-decoration: none; }

/* ── About Modal (NudgeUP-4x3) ──────────────────────────────────────────── */
.about-version { font-size: 12px; color: var(--color-text-muted); text-align: center; margin-bottom: 16px; }
.about-mission { font-size: 14px; line-height: 1.65; color: var(--color-text-muted); margin-bottom: 16px; }
.about-founder-card {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 16px;
  font-size: 14px;
}
.about-founder-card strong { display: block; margin-bottom: 4px; }
.about-founder-card a { color: #9B67F5; text-decoration: none; }
.about-links { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 20px; font-size: 13px; }
.about-links a { color: #9B67F5; text-decoration: none; }
.about-qr-section { text-align: center; }
.about-qr-section p { font-size: 13px; color: var(--color-text-muted); margin-bottom: 10px; }
.about-qr-wrap { display: inline-block; background: #fff; padding: 10px; border-radius: 10px; }
/* NudgeUP-nby4: DryDev attribution nested at the bottom of Settings (theme-aware) */
.settings-attribution { text-align: center; margin: 20px 0 8px; font-size: 12px; color: var(--color-text-muted); }
.settings-attribution a { color: var(--color-text-muted); text-decoration: underline; }
.settings-attribution a:hover { color: var(--color-primary); }

/* ── CSV Import ─────────────────────────────────────────────────────────────── */
.import-section {
  margin-top: 24px;
  padding: 0 0 8px;
}
.import-desc {
  font-size: 13px;
  margin-bottom: 12px;
}
.import-gate {
  background: var(--surface-2, rgba(255,255,255,0.04));
  border: 1px dashed var(--border);
  border-radius: 10px;
  padding: 16px;
  text-align: center;
}
.import-gate-msg {
  font-size: 13px;
  margin: 0 0 10px;
}
.import-drop-zone {
  border: 2px dashed var(--border);
  border-radius: 10px;
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.import-drop-zone:hover,
.import-drop-zone.import-drag-over {
  border-color: var(--accent, #9B67F5);
  background: rgba(155,103,245,0.05);
}
.import-drop-zone svg {
  color: var(--text-muted);
  margin-bottom: 8px;
}
.import-drop-label {
  font-size: 14px;
  margin: 0 0 4px;
  line-height: 1.5;
}
.import-file-label {
  color: var(--accent, #9B67F5);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.import-drop-hint {
  font-size: 12px;
  margin: 0;
}
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}
.import-preview-msg {
  font-size: 13px;
  margin: 0 0 10px;
}
.import-table-scroll {
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid var(--border);
  margin-bottom: 12px;
  max-height: 260px;
  overflow-y: auto;
}
.import-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.import-table th {
  background: var(--surface-2, rgba(255,255,255,0.06));
  padding: 8px 10px;
  text-align: left;
  font-weight: 600;
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 1;
}
.import-table td {
  padding: 6px 10px;
  border-top: 1px solid var(--border);
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.import-row-dupe {
  opacity: 0.45;
}
.import-dupe-badge {
  display: inline-block;
  font-size: 10px;
  background: var(--surface-2, rgba(255,255,255,0.08));
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0 4px;
  margin-left: 4px;
  vertical-align: middle;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.import-preview-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}
.import-undo-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--surface-2, rgba(255,255,255,0.05));
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  margin-top: 12px;
}
/* Simple app toast (used by import + voice) */
.app-toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: var(--surface, #1e1e2e);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 13px;
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  white-space: nowrap;
  max-width: calc(100vw - 32px);
}
.app-toast.app-toast-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── NPS Survey Modal ──────────────────────────────────────────────────────── */
.modal-nps {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal-nps.hidden { display: none; }
.modal-nps-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(4px);
}
.modal-nps-card {
  position: relative;
  background: var(--surface, #1e1e2e);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px 24px 20px;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 24px 64px rgba(0,0,0,0.5);
  animation: nps-pop 0.25s ease;
}
@keyframes nps-pop {
  from { opacity: 0; transform: scale(0.93) translateY(8px); }
  to   { opacity: 1; transform: scale(1)    translateY(0); }
}
.modal-nps-close {
  position: absolute;
  top: 12px; right: 14px;
  background: none; border: none;
  color: var(--text-muted, #6b7280);
  font-size: 16px; cursor: pointer; padding: 4px 6px;
  border-radius: 6px; line-height: 1;
  transition: background 0.15s;
}
.modal-nps-close:hover { background: var(--surface-2, rgba(255,255,255,0.06)); }
.nps-icon { font-size: 32px; text-align: center; margin-bottom: 10px; }
.nps-title {
  font-size: 17px; font-weight: 700; text-align: center;
  color: var(--color-text, #f1f5f9); margin: 0 0 6px;
}
.nps-subtitle {
  font-size: 13px; text-align: center;
  color: var(--text-muted, #9ca3af); margin: 0 0 18px;
}
.nps-scale-labels {
  display: flex; justify-content: space-between;
  font-size: 11px; color: var(--text-muted, #9ca3af);
  margin-bottom: 6px;
}
.nps-buttons {
  display: flex; gap: 4px; justify-content: center; flex-wrap: nowrap;
}
.nps-score-btn {
  flex: 1; min-width: 0;
  aspect-ratio: 1;
  border: 1.5px solid var(--border);
  background: var(--surface-2, rgba(255,255,255,0.04));
  color: var(--color-text, #f1f5f9);
  border-radius: 8px; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all 0.12s;
}
.nps-score-btn:hover { border-color: var(--color-primary, #9B67F5); background: rgba(155,103,245,0.12); }
.nps-score-btn.selected.promoter  { background: rgba(34,197,94,0.2);  border-color: #22c55e; color: #22c55e; }
.nps-score-btn.selected.passive   { background: rgba(234,179,8,0.2);  border-color: #eab308; color: #eab308; }
.nps-score-btn.selected.detractor { background: rgba(239,68,68,0.2);  border-color: #ef4444; color: #ef4444; }
.nps-reason-wrap { margin-top: 16px; }
.nps-reason-wrap.hidden { display: none; }
.nps-reason-label { display: block; font-size: 13px; font-weight: 600; color: var(--color-text); margin-bottom: 6px; }
.nps-optional { font-weight: 400; color: var(--text-muted, #9ca3af); }
.nps-reason-input {
  width: 100%; box-sizing: border-box;
  background: var(--surface-2, rgba(255,255,255,0.04));
  border: 1.5px solid var(--border);
  border-radius: 10px; padding: 10px 12px;
  color: var(--color-text); font-size: 14px; resize: vertical;
  font-family: inherit; min-height: 72px;
}
.nps-reason-input:focus { outline: none; border-color: var(--color-primary, #9B67F5); }
.nps-submit-btn { width: 100%; margin-top: 12px; }
.nps-privacy { font-size: 11px; text-align: center; color: var(--text-muted, #9ca3af); margin: 12px 0 0; }
.nps-thankyou-toast {
  position: fixed; bottom: 88px; left: 50%;
  transform: translateX(-50%);
  background: var(--surface, #1e1e2e);
  border: 1px solid var(--border);
  color: var(--color-text); padding: 10px 20px;
  border-radius: 20px; font-size: 14px;
  z-index: 1200; box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  animation: nps-pop 0.2s ease;
}

/* ── Churn Win-back Notice (NudgeUP-61p) ──────────────────────────────────── */
/* ── My Access trial progress bar (NudgeUP-yud) ─────────────────────────────── */
.trial-progress-wrap { margin-top: 10px; }
.trial-progress-bar {
  height: 6px;
  background: var(--color-border);
  border-radius: 3px;
  overflow: hidden;
}
.trial-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #9B67F5, #D4604A);
  border-radius: 3px;
  transition: width 0.5s ease;
}
.trial-progress-caption {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-top: 4px;
}

/* ── Share-a-win bar (NudgeUP-ig4k) ─────────────────────────────────────────── */
.share-win-bar {
  position: fixed;
  bottom: 80px; /* above nav bar */
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  opacity: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--color-surface);
  border: 1.5px solid #D4604A;
  border-radius: 30px;
  padding: 10px 20px 10px 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  cursor: pointer;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 3000;
  white-space: nowrap;
  user-select: none;
}
.share-win-bar--visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.share-win-emoji { font-size: 20px; }
.share-win-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #D4604A;
}
.share-win-close {
  background: none;
  border: none;
  color: var(--color-text-muted);
  font-size: 14px;
  padding: 0 0 0 6px;
  cursor: pointer;
  line-height: 1;
  opacity: 0.6;
}
.share-win-close:hover { opacity: 1; }

/* ── Offer banner (NudgeUP-iti) ────────────────────────────────────────────── */
.offer-banner {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 16px;
  background: linear-gradient(135deg, #D4604A, #9B67F5);
  color: #fff; font-size: 13px;
  position: sticky; top: 0; z-index: 98;
  flex-wrap: wrap;
}
.offer-banner.hidden { display: none; }
.offer-banner-icon { font-size: 20px; flex-shrink: 0; }
.offer-banner-body { flex: 1; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.offer-banner-headline { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.offer-banner-text { font-size: 12px; opacity: 0.9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.offer-banner-cta {
  flex-shrink: 0; background: rgba(255,255,255,0.2); color: #fff;
  text-decoration: none; border-radius: 9999px; padding: 5px 12px;
  font-size: 12px; font-weight: 600; white-space: nowrap;
  border: 1px solid rgba(255,255,255,0.35); transition: background 0.15s;
}
.offer-banner-cta:hover { background: rgba(255,255,255,0.32); }
.offer-banner-close {
  background: none; border: none; cursor: pointer;
  color: rgba(255,255,255,0.75); font-size: 16px;
  padding: 4px 6px; line-height: 1; border-radius: 50%; flex-shrink: 0;
}
.offer-banner-close:hover { background: rgba(255,255,255,0.15); color: #fff; }

.churn-notice {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  background: linear-gradient(135deg, rgba(155,103,245,0.15), rgba(99,102,241,0.12));
  border-bottom: 1px solid rgba(155,103,245,0.35);
  font-size: 13px; color: var(--color-text);
}
.churn-notice.hidden { display: none; }
.churn-notice-icon { font-size: 22px; flex-shrink: 0; }
.churn-notice-body { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.churn-notice-body strong { font-size: 14px; }
.churn-notice-body span { color: var(--text-muted, #9ca3af); }
.churn-notice-dismiss {
  background: none; border: none; cursor: pointer;
  color: var(--text-muted, #9ca3af); font-size: 18px;
  padding: 4px 6px; line-height: 1; border-radius: 50%;
  flex-shrink: 0;
}
.churn-notice-dismiss:hover { background: rgba(255,255,255,0.08); }

/* ── Session Management (NudgeUP-bzf) ─────────────────────────────────────── */
.sessions-list { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.session-card { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; background: var(--color-surface-2, #f8f7ff); border-radius: 12px; border: 1px solid var(--color-border, #e8e4ff); gap: 12px; }
.session-card.current-session { border-color: #9B67F5; background: rgba(155,103,245,0.08); }
.session-info { flex: 1; min-width: 0; }
.session-device { font-weight: 600; font-size: 14px; color: var(--color-text, #1a1a2e); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.session-meta { font-size: 12px; color: var(--color-text-muted, #888); margin-top: 3px; }
.session-badge { font-size: 11px; font-weight: 700; color: #9B67F5; background: rgba(155,103,245,0.15); padding: 2px 8px; border-radius: 99px; white-space: nowrap; }
.btn-revoke { font-size: 12px; font-weight: 600; color: #ef4444; background: rgba(239,68,68,0.1); border: none; border-radius: 8px; padding: 6px 12px; cursor: pointer; white-space: nowrap; transition: background 0.15s; }
.btn-revoke:hover { background: rgba(239,68,68,0.2); }
.sessions-empty { text-align: center; color: var(--color-text-muted, #888); font-size: 14px; padding: 16px; }
.btn-revoke-all { width: 100%; padding: 12px; margin-top: 8px; background: none; border: 1.5px solid #ef4444; color: #ef4444; border-radius: 10px; font-weight: 600; cursor: pointer; font-size: 14px; transition: all 0.15s; }
.btn-revoke-all:hover { background: rgba(239,68,68,0.08); }

/* ── Bug report FAB (NudgeUP-dvz) ──────────────────────────────────────────── */
.bug-fab {
  position: fixed;
  bottom: 80px;
  right: 16px;
  background: #1a1a2e;
  color: white;
  border: 1px solid #333;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  cursor: pointer;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  transition: opacity 0.15s;
}
.bug-fab:hover { opacity: 0.85; }
.bug-panel {
  position: fixed;
  bottom: 130px;
  right: 16px;
  width: 280px;
  background: var(--color-surface, #1C1B29);
  border: 1px solid var(--color-border, #2E2D42);
  border-radius: 16px;
  padding: 16px;
  z-index: 101;
  box-shadow: 0 4px 24px rgba(0,0,0,0.2);
}
.bug-panel h3 { margin: 0 0 10px; font-size: 15px; color: var(--color-text, #E8E8F0); }
.bug-panel textarea {
  width: 100%;
  background: var(--color-surface-2, #252438);
  border: 1px solid var(--color-border, #2E2D42);
  border-radius: 8px;
  color: var(--color-text, #E8E8F0);
  padding: 8px;
  font-size: 13px;
  resize: none;
  font-family: var(--font);
  box-sizing: border-box;
}
.bug-panel-actions { display: flex; gap: 8px; margin-top: 10px; }
.bug-panel-actions .btn-primary { flex: 1; font-size: 13px; padding: 8px; }
.bug-panel-actions .btn-ghost   { flex: 1; font-size: 13px; padding: 8px; }

/* ── Beta survey card (NudgeUP-dvz) ────────────────────────────────────────── */
.survey-card {
  position: fixed;
  bottom: 80px;
  left: 16px;
  right: 16px;
  max-width: 400px;
  margin: 0 auto;
  background: var(--color-surface, #1C1B29);
  border: 1px solid var(--color-primary, #7C3AED);
  border-radius: 14px;
  padding: 14px 16px;
  z-index: 99;
  box-shadow: 0 4px 24px rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slide-up-in 0.3s ease;
}
@keyframes slide-up-in {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.survey-card-text { flex: 1; font-size: 13px; color: var(--color-text, #E8E8F0); margin: 0; line-height: 1.4; }
.survey-card-btn  { font-size: 12px; padding: 6px 14px; white-space: nowrap; text-decoration: none; }
.survey-card-close {
  background: none;
  border: none;
  color: var(--color-text-muted, #8E8EA0);
  cursor: pointer;
  font-size: 14px;
  padding: 0 4px;
  line-height: 1;
  flex-shrink: 0;
}

/* ── Announcement bar (NudgeUP-2u3) ─────────────────────────────────────── */
.announcement-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  gap: 12px;
}
.announcement-bar.hidden { display: none; }
.announcement-bar.info     { background: #1e3a5f; color: #93c5fd; }
.announcement-bar.warning  { background: #451a03; color: #fbbf24; }
.announcement-bar.critical { background: linear-gradient(90deg, #7f1d1d, #991b1b); color: white; }
.announcement-bar #announcement-dismiss {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  font-size: 16px;
  padding: 0 4px;
  opacity: 0.7;
  flex-shrink: 0;
}

/* ── Sprint C: Skeleton loaders (NudgeUP-juir) ─────────────────────────── */
.skeleton-card { display:flex; align-items:center; gap:12px; padding:12px; }
.skeleton-avatar { width:40px; height:40px; border-radius:50%; background:var(--color-border); flex-shrink:0; }
.skeleton-lines { flex:1; display:flex; flex-direction:column; gap:6px; }
.skeleton-line { height:12px; border-radius:6px; background:var(--color-border);
  animation: skeleton-pulse 1.4s ease-in-out infinite; }
.skeleton-line-wide { width:70%; }
.skeleton-line-narrow { width:40%; animation-delay:0.2s; }
@keyframes skeleton-pulse { 0%,100%{opacity:1} 50%{opacity:0.4} }

/* ── Sprint C: Avatar upload (NudgeUP-lr8) ──────────────────────────────── */
.profile-avatar-wrap { position:relative; cursor:pointer; display:inline-block; }
.profile-avatar-img { width:100%; height:100%; border-radius:50%; object-fit:cover; display:block; }

/* NudgeUP-buo1: Camera icon tap-to-edit overlay */
.avatar-edit-overlay {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.18s ease;
  pointer-events: none;
  color: #fff;
}
.profile-avatar-wrap:hover .avatar-edit-overlay,
.profile-avatar-wrap:focus-within .avatar-edit-overlay { opacity: 1; }

/* NudgeUP-buo1: SVG upload progress ring */
.avatar-upload-ring {
  position: absolute;
  inset: -4px;
  width: calc(100% + 8px);
  height: calc(100% + 8px);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
}
.avatar-upload-ring.visible { opacity: 1; }
.avatar-ring-track {
  fill: none;
  stroke: rgba(155,103,245,0.2);
  stroke-width: 3;
}
.avatar-ring-fill {
  fill: none;
  stroke: var(--color-primary-lt, #9B67F5);
  stroke-width: 3;
  stroke-linecap: round;
  /* circumference = 2π×38 ≈ 238.76; start at top */
  stroke-dasharray: 238.76;
  stroke-dashoffset: 238.76;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
  transition: stroke-dashoffset 0.1s linear;
}
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }

/* ── Sprint C: Version badge (NudgeUP-4dz1) ─────────────────────────────── */
.profile-version-badge {
  font-size:10px;
  background:rgba(155,103,245,0.12);
  color:var(--color-accent, #9B67F5);
  border:1px solid rgba(155,103,245,0.25);
  border-radius:99px;
  padding:2px 8px;
  cursor:pointer;
  font-weight:600;
  margin-left:6px;
  display:inline-block;
  margin-top:4px;
}
.profile-version-badge:hover { background:rgba(155,103,245,0.2); }

/* ── Sprint C: Shutdown ritual (NudgeUP-hm3y) ───────────────────────────── */
#shutdown-modal {
  position:fixed; inset:0; z-index:300;
  background:var(--color-overlay);
  display:flex; align-items:center; justify-content:center;
  padding:16px;
  backdrop-filter:blur(4px);
  -webkit-backdrop-filter:blur(4px);
}
#shutdown-modal.hidden { display:none; }
.shutdown-card { max-width:360px; width:100%; text-align:center; position:relative; }
.shutdown-card .modal-close {
  position:absolute; top:12px; right:12px;
  background:none; border:none; color:var(--color-text-muted);
  font-size:18px; cursor:pointer; padding:4px 8px; border-radius:6px;
}
.shutdown-card .modal-close:hover { color:var(--color-text); }
.shutdown-card h2 { font-size:1.25rem; margin-bottom:4px; }
.shutdown-sub { color:var(--color-text-muted); font-size:0.875rem; margin-bottom:8px; }
.shutdown-rating { display:flex; gap:8px; justify-content:center; flex-wrap:wrap; margin:20px 0; }
.shutdown-btn {
  padding:10px 14px; border-radius:var(--radius-md); font-size:0.9rem;
  background:var(--color-surface-2); border:1px solid var(--color-border);
  color:var(--color-text); cursor:pointer; font-weight:500; transition:all 0.15s;
}
.shutdown-btn:hover { background:var(--color-primary); color:#fff; border-color:var(--color-primary); }
.shutdown-btn.selected { background:var(--color-primary); color:#fff; border-color:var(--color-primary); }
.shutdown-note-wrap { display:flex; flex-direction:column; gap:10px; }
.shutdown-textarea {
  width:100%; padding:10px 12px; border-radius:var(--radius-sm);
  background:var(--color-surface-2); border:1px solid var(--color-border);
  color:var(--color-text); font-size:0.9rem; resize:vertical;
  font-family:var(--font);
}
.shutdown-textarea:focus { outline:none; border-color:var(--color-primary); }

/* ── Sprint C: End day button (NudgeUP-hm3y) ────────────────────────────── */
.tasks-header-btns { display:flex; align-items:center; gap:8px; }
.btn-end-day {
  font-size:0.75rem; padding:6px 10px; border-radius:var(--radius-sm);
  background:var(--color-surface-2); border:1px solid var(--color-border);
  color:var(--color-text-muted); cursor:pointer; font-weight:500;
  white-space:nowrap; transition:all 0.15s;
}
.btn-end-day:hover { color:var(--color-text); border-color:var(--color-text-muted); }

/* ── Sprint C: Task-complete confetti (NudgeUP-fo1j) ────────────────────── */
/* Uses .task-confetti-particle to avoid conflicting with broadcast .confetti-particle */
@keyframes confetti-fall {
  0%   { transform: translateY(0) rotate(0deg) scale(1); opacity: 1; }
  100% { transform: translateY(-80px) rotate(720deg) scale(0); opacity: 0; }
}
.task-confetti-particle {
  position: fixed; pointer-events: none; z-index: 9998;
  width: 8px; height: 8px; border-radius: 2px;
  animation: confetti-fall 0.7s ease-out forwards;
}
.announcement-bar #announcement-dismiss:hover { opacity: 1; }

/* ═══════════════════════════════════════════════════════════════════════════
   NudgeUP-aehc — Futuristic motion layer (Cycle 15)
   All durations 150-250ms, spring easing. Respects prefers-reduced-motion.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── 1. Button press micro-feedback ──────────────────────────────────────── */
.btn-primary:active,
.btn-secondary:active,
.btn-ghost:active,
.btn-upgrade:active,
.btn-trial-upgrade:active,
.btn-danger:active,
.filter-btn:active,
.nav-btn:active {
  transform: scale(0.97);
  transition: transform 0.08s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.btn-primary,
.btn-secondary,
.btn-ghost,
.btn-upgrade,
.btn-trial-upgrade,
.btn-danger,
.filter-btn {
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.15s, color 0.15s, border-color 0.15s, opacity 0.15s;
}

/* ── 2. Task card enter — slide in from bottom with stagger ──────────────── */
@keyframes card-enter {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.task-card.card-entering {
  animation: card-enter 0.22s cubic-bezier(0.34, 1.2, 0.64, 1) both;
  animation-delay: calc(var(--card-i, 0) * 40ms);
}

/* ── 3. Enhanced task-done shrink (extend existing fading-done) ──────────── */
.task-card.fading-done {
  opacity: 0.45;
  transform: scale(0.98);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

/* ── 4. Vibe emoji bounce on select ─────────────────────────────────────── */
@keyframes emoji-bounce {
  0%   { transform: scale(1); }
  35%  { transform: scale(1.22); }
  65%  { transform: scale(0.93); }
  100% { transform: scale(1); }
}
.vibe-emoji.bounce-once {
  animation: emoji-bounce 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ── 5. Nav active indicator — slide transition ───────────────────────────── */
.nav-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 24px;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  border-radius: 0 0 3px 3px;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s;
  opacity: 0;
}
.nav-btn.active::before {
  transform: translateX(-50%) scaleX(1);
  opacity: 1;
}

/* ── 6. Broadcast send ripple ────────────────────────────────────────────── */
@keyframes btn-ripple {
  0%   { box-shadow: 0 0 0 0 rgba(124,58,237,0.5); }
  70%  { box-shadow: 0 0 0 10px rgba(124,58,237,0); }
  100% { box-shadow: 0 0 0 0 rgba(124,58,237,0); }
}
.btn-ripple-once {
  animation: btn-ripple 0.55s ease-out;
}

/* ── 7. Streak count pulse when updated ──────────────────────────────────── */
@keyframes streak-pop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.35); color: var(--color-primary-lt); }
  100% { transform: scale(1); }
}
.streak-count.pop-once,
#header-streak-count.pop-once {
  animation: streak-pop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ── 8. Glassmorphism overlay enhancement ────────────────────────────────── */
.modal-overlay {
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* ── 9. prefers-reduced-motion — disable all custom animations ───────────── */
@media (prefers-reduced-motion: reduce) {
  .task-card.card-entering,
  .vibe-emoji.bounce-once,
  .btn-ripple-once,
  .streak-count.pop-once,
  #header-streak-count.pop-once,
  .btn-primary, .btn-secondary, .btn-ghost,
  .btn-upgrade, .btn-trial-upgrade, .btn-danger,
  .filter-btn, .nav-btn {
    animation: none !important;
    transition: none !important;
  }
  .nav-btn::before { transition: none !important; }
}

/* ── PWA Add-to-Home-Screen banner (NudgeUP-7m3k) ───────────────────────────── */
.pwa-install-banner {
  position: fixed;
  left: 50%;
  bottom: calc(var(--nav-height, 64px) + 16px);
  transform: translateX(-50%);
  z-index: 1200;
  width: min(420px, calc(100vw - 24px));
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--color-surface, #1e1e2e);
  color: var(--color-text, #fff);
  border: 1px solid var(--color-border, rgba(255,255,255,0.12));
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
  animation: pwaBannerUp 0.3s ease;
}
.pwa-install-banner.hidden { display: none; }
@keyframes pwaBannerUp {
  from { opacity: 0; transform: translateX(-50%) translateY(12px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.pwa-install-icon { font-size: 1.5rem; flex-shrink: 0; }
.pwa-install-text { flex: 1; font-size: 0.9rem; line-height: 1.35; margin: 0; }
.pwa-install-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.pwa-install-yes {
  background: var(--color-accent, #9B67F5);
  color: #fff; border: none;
  padding: 8px 14px; border-radius: 999px;
  font-size: 0.85rem; font-weight: 600; cursor: pointer;
}
.pwa-install-no {
  background: transparent;
  color: var(--color-text-muted, rgba(255,255,255,0.6));
  border: none; padding: 8px 10px; font-size: 0.82rem; cursor: pointer;
}

/* iOS manual-install modal */
.pwa-ios-modal {
  position: fixed; inset: 0; z-index: 1300;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.55); padding: 20px;
}
.pwa-ios-modal.hidden { display: none; }
.pwa-ios-card {
  background: var(--color-surface, #1e1e2e);
  color: var(--color-text, #fff);
  border-radius: 16px; padding: 24px;
  width: min(360px, 100%);
  box-shadow: 0 20px 50px rgba(0,0,0,0.45);
}
.pwa-ios-card h3 { margin: 0 0 14px; font-size: 1.15rem; }
.pwa-ios-steps { margin: 0 0 18px; padding-left: 20px; }
.pwa-ios-steps li { font-size: 0.92rem; line-height: 1.5; margin-bottom: 8px; }
@media (prefers-reduced-motion: reduce) {
  .pwa-install-banner { animation: none; }
}

/* ── NudgeUP-7p98 additions ──────────────────────────────────────────────── */

/* Priority text chips (replaces color dot) */
.task-priority-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}
.task-priority-chip.priority-high   { background: rgba(239,68,68,0.15);  color: #EF4444; }
.task-priority-chip.priority-medium { background: rgba(245,158,11,0.15); color: #F59E0B; }
.task-priority-chip.priority-low    { background: rgba(107,114,128,0.15);color: #9CA3AF; }

/* Skeleton loader */
@keyframes skeleton-shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position:  400px 0; }
}
.task-card-skeleton {
  background: var(--color-surface);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 8px;
}
.skeleton-line {
  background: linear-gradient(90deg, var(--color-surface-2) 25%, var(--color-border) 50%, var(--color-surface-2) 75%);
  background-size: 800px 100%;
  animation: skeleton-shimmer 1.4s infinite;
  border-radius: 4px;
}
.skeleton-title { height: 16px; width: 60%; margin-bottom: 8px; }
.skeleton-meta  { height: 12px; width: 35%; }

/* Error state */
.task-error-state {
  text-align: center;
  padding: 32px 16px;
  color: var(--color-text-muted);
}
.task-error-state p { margin-bottom: 12px; }

/* Undo toast */
.undo-toast {
  position: fixed;
  bottom: calc(var(--nav-height) + 12px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.875rem;
  z-index: 5000;
  box-shadow: var(--shadow-elevated);
  white-space: nowrap;
}
.undo-toast-btn {
  background: none;
  border: none;
  color: var(--color-primary-lt);
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  font-size: 0.875rem;
}
.undo-toast-btn:hover { text-decoration: underline; }

/* 7-day streak dot row */
.streak-dot-row {
  display: flex;
  gap: 6px;
  justify-content: center;
  padding: 6px 0 2px;
  cursor: pointer;
}
.streak-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: var(--color-surface-2);
  color: var(--color-text-muted);
  border: 1.5px solid var(--color-border);
  text-transform: uppercase;
  transition: background 0.2s;
}
.streak-dot-active {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

/* Profile section group labels */
.profile-section-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  padding: 20px 0 6px;
  border-top: 1px solid var(--color-border);
  margin-top: 8px;
}

/* Empty state CTA */
.empty-state-cta {
  margin-top: 16px;
  padding: 10px 24px;
  font-size: 0.95rem;
}

/* Plan option pricing — total billed primary, per-month secondary */
.plan-option-total {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-text);
}
.plan-option-permonth {
  font-size: 0.72rem;
  color: var(--color-text-muted);
  margin-top: 1px;
}
.plan-popular-badge {
  background: var(--color-primary);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ── Payment-failed badge (NudgeUP-fkzb) ───────────────────────────────────── */
.payment-failed-badge {
  background: #C8482E;
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  animation: payBadgePulse 2s ease-in-out infinite;
}
.payment-failed-badge.hidden { display: none; }
@keyframes payBadgePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(200,72,46,0.45); }
  50%      { box-shadow: 0 0 0 6px rgba(200,72,46,0); }
}
@media (prefers-reduced-motion: reduce) {
  .payment-failed-badge { animation: none; }
}

/* ── NudgeUP-2hp9: Vibe Check + AI Coach UX Polish ─────────────────────────── */

/* (1) Coach identity strip */
.vibe-coach-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  margin-bottom: 14px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}
.vibe-coach-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-lt) 100%);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.vibe-coach-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.vibe-coach-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text);
}
.vibe-coach-tagline {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  opacity: 0.85;
}
.vibe-coach-customize-btn {
  flex-shrink: 0;
  font-size: 0.72rem;
  padding: 3px 8px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.vibe-coach-customize-btn:hover { color: var(--color-primary); border-color: var(--color-primary); }

/* (2) Loading pulse on vibe-response.loading */
@keyframes vibe-loading-breathe {
  0%, 100% { opacity: 0.75; }
  50%       { opacity: 0.45; }
}
.vibe-response.loading {
  animation: vibe-loading-breathe 1.4s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  .vibe-response.loading { animation: none; }
}

/* (3) Emoji range labels */
.vibe-emoji-labels {
  display: flex;
  justify-content: space-between;
  padding: 4px 10px 0;
  font-size: 0.6875rem;
  color: var(--color-text-muted);
  opacity: 0.7;
  user-select: none;
}

/* (4) Mode button descriptors */
.vibe-mode-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.vibe-mode-desc {
  font-size: 0.625rem;
  font-weight: 400;
  opacity: 0.7;
  letter-spacing: 0.01em;
  text-transform: none;
  line-height: 1.2;
  color: inherit;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* (5) Response max-height + fade on mobile */
.vibe-response {
  position: relative;
  max-height: 42vh;
  overflow-y: auto;
  scroll-behavior: smooth;
}
.vibe-response::after {
  content: '';
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  display: block;
  height: 32px;
  background: linear-gradient(to bottom, transparent, var(--color-surface));
  pointer-events: none;
  margin-top: -32px;
}
/* Don't clip stuck card (it's short) */
.vibe-response.vibe-response--stuck { max-height: none; }

/* (6) First-time intro card */
.vibe-first-intro {
  background: linear-gradient(135deg, rgba(124,58,237,0.08) 0%, rgba(124,58,237,0.02) 100%);
  border: 1px solid rgba(124,58,237,0.2);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 14px;
}
.vibe-intro-text {
  font-size: 0.875rem;
  color: var(--color-text);
  margin: 0 0 4px;
  line-height: 1.5;
}
.vibe-intro-sub {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin: 0;
  opacity: 0.8;
}

/* (8) Day plan task preview */
.vibe-dayplan-preview {
  padding: 10px 12px 10px;
  margin-bottom: 10px;
  background: rgba(124,58,237,0.06);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(124,58,237,0.12);
}
.vibe-dp-label {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-primary-lt);
  margin: 0 0 6px;
}
.vibe-dp-list {
  margin: 0;
  padding-left: 18px;
  font-size: 0.875rem;
  color: var(--color-text);
  line-height: 1.6;
}
.vibe-dp-list li { margin-bottom: 2px; }

/* (10) Share button as footer inside response — already has border-top via .vibe-share-row */
.btn-vibe-share {
  width: 100%;
  text-align: left;
  justify-content: flex-start;
}

/* Responsive: remove max-height constraint on larger screens */
@media (min-height: 700px) {
  .vibe-response { max-height: 50vh; }
}
@media (min-height: 900px) {
  .vibe-response { max-height: none; overflow-y: visible; }
  .vibe-response::after { display: none; }
}

/* ── Weekly goal card (NudgeUP-yj2c) ──────────────────────────────────────── */
.weekly-goal-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-primary);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin: 0 0 12px;
}

.weekly-goal-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.weekly-goal-icon {
  font-size: 1.125rem;
  line-height: 1;
}

.weekly-goal-label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  flex: 1;
}

.weekly-goal-complete-btn {
  background: none;
  border: 1.5px solid var(--color-border);
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  cursor: pointer;
  color: var(--color-text-muted);
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  flex-shrink: 0;
}
.weekly-goal-complete-btn:hover:not(:disabled) {
  background: #22c55e18;
  border-color: #22c55e;
  color: #22c55e;
}
.weekly-goal-complete-btn:disabled {
  background: #22c55e18;
  border-color: #22c55e;
  color: #22c55e;
  cursor: default;
}

.weekly-goal-text {
  font-size: 0.9375rem;
  font-weight: 500;
  margin: 0;
  color: var(--color-text);
  line-height: 1.4;
}

.weekly-goal-nudge {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin: 8px 0 0;
}

/* Completed state */
.weekly-goal-card--done .weekly-goal-text {
  text-decoration: line-through;
  opacity: 0.55;
}

/* ── Weekly goal modal content (NudgeUP-yj2c) ─────────────────────────────── */
.weekly-goal-suggest-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.weekly-goal-suggest-btn {
  font-size: 0.8125rem;
  padding: 6px 12px;
}

.weekly-goal-cf-prev {
  font-size: 0.9375rem;
  font-weight: 500;
  padding: 10px 14px;
  background: var(--color-surface-raised, var(--color-surface));
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  margin: 0 0 4px;
  color: var(--color-text);
  line-height: 1.4;
}

.weekly-goal-cf-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}
.weekly-goal-cf-actions button {
  flex: 1;
}

/* ── 7-day vibe mood strip (NudgeUP-elb2) ─────────────────────────────────── */
.mood-history-section {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 12px;
}

.mood-history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.mood-history-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text);
}

.mood-history-avg {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  font-weight: 500;
}

.mood-history-strip {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.mood-day-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 4px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: default;
  transition: background 0.15s;
}

/* Improvement #3 — color tints by mood score */
.mood-tint--high {
  background: #22c55e10;
  border-color: #22c55e22;
}
.mood-tint--low {
  background: #ef444410;
  border-color: #ef444422;
}

.mood-day-label {
  font-size: 0.625rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}

.mood-day-emoji {
  font-size: 1.25rem;
  line-height: 1;
}

.mood-day-empty {
  font-size: 1rem;
  color: var(--color-border);
}

.mood-day-count {
  font-size: 0.5625rem;
  color: var(--color-text-muted);
  opacity: 0.7;
}

.mood-history-footer {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  min-height: 18px;
}

.mood-history-streak,
.mood-history-best {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.mood-empty-cta {
  width: 100%;
  background: none;
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-sm);
  padding: 10px;
  font-size: 0.8125rem;
  color: var(--color-primary);
  cursor: pointer;
  text-align: center;
}
.mood-empty-cta:hover { background: var(--color-surface-raised, var(--color-surface)); }

/* ── Smart Nudge Hour (NudgeUP-2p80) ──────────────────────────────────────── */
.smart-nudge-section {
  margin-top: 10px;
}
.smart-nudge-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #ede9fe 0%, #f5f3ff 100%);
  border: 1px solid #c4b5fd;
  border-radius: 12px;
  padding: 10px 12px;
}
[data-theme="dark"] .smart-nudge-pill {
  background: linear-gradient(135deg, #2d1d5c 0%, #1e1b33 100%);
  border-color: #6d28d9;
}
.smart-nudge-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}
.smart-nudge-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.smart-nudge-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-text);
}
.smart-nudge-label strong {
  color: #7c3aed;
  font-weight: 700;
}
[data-theme="dark"] .smart-nudge-label strong {
  color: #a78bfa;
}
.smart-nudge-sub {
  font-size: 0.72rem;
  color: var(--color-text-muted);
  line-height: 1.3;
}
.smart-nudge-reset {
  flex-shrink: 0;
  font-size: 0.72rem;
  color: var(--color-text-muted);
  background: none;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 3px 8px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.smart-nudge-reset:hover {
  color: var(--color-text);
  border-color: var(--color-text-muted);
}

/* ── AI mood insight bubble (NudgeUP-je9y) ──────────────────────────────────── */
.mood-insight-wrap {
  padding: 2px 0 6px;
}
.mood-insight-bubble {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-primary);
  border-radius: 10px;
  padding: 10px 12px;
  animation: fadeIn 0.3s ease;
}
.mood-insight-avatar {
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: 1px;
}
.mood-insight-text {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--color-text);
  flex: 1;
}

/* ── Weekly coach digest card (NudgeUP-n5r7) ────────────────────────────────── */
.vibe-digest-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-primary);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 14px;
  animation: digestSlideIn 0.3s ease;
}
@keyframes digestSlideIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.vibe-digest-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.vibe-digest-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.vibe-digest-coach-name {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-text-muted);
  flex: 1;
}
.vibe-digest-dismiss {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-muted);
  font-size: 1.1rem;
  line-height: 1;
  padding: 0 2px;
  opacity: 0.6;
  transition: opacity 0.15s;
}
.vibe-digest-dismiss:hover { opacity: 1; }
.vibe-digest-text {
  margin: 0 0 10px;
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--color-text);
}
.vibe-digest-opt-out {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.72rem;
  color: var(--color-text-muted);
  text-decoration: underline;
  padding: 0;
  opacity: 0.6;
  transition: opacity 0.15s;
}
.vibe-digest-opt-out:hover { opacity: 1; }

/* ── AI task prioritizer — 'Where to start?' (NudgeUP-o9a2) ─────────────────── */
.task-prioritizer-wrap {
  margin-bottom: 10px;
}
.task-prioritizer-btn {
  width: 100%;
  padding: 10px 16px;
  background: linear-gradient(135deg, var(--color-primary), #7c3aed);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
}
.task-prioritizer-btn:hover  { opacity: 0.9; transform: translateY(-1px); }
.task-prioritizer-btn:active { transform: translateY(0); }
.task-prioritizer-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.task-prioritizer-bubble {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left: 3px solid #7c3aed;
  border-radius: 10px;
  padding: 10px 12px;
  margin-top: 8px;
  animation: fadeIn 0.3s ease;
}
.task-prioritizer-icon {
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: 1px;
}
.task-prioritizer-text {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--color-text);
  flex: 1;
}
.task-prioritizer-reprioritize {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-top: 6px;
  padding: 0;
  text-decoration: underline;
  opacity: 0.7;
  transition: opacity 0.15s;
  display: block;
}
.task-prioritizer-reprioritize:hover { opacity: 1; }

/* ═══════════════════════════════════════════════════════════
   DESKTOP LAYOUT — Sidebar Navigation  (≥768px)
   Mobile layout (bottom-nav, app-main padding) untouched
═══════════════════════════════════════════════════════════ */

/* Sidebar hidden by default (mobile-first) */
.sidebar-desktop {
  display: none;
}

@media (min-width: 768px) {
  /* Hide bottom nav */
  .bottom-nav { display: none !important; }

  /* ── Sidebar ── */
  .sidebar-desktop {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: 210px;
    background: var(--color-surface);
    border-right: 1px solid var(--color-border);
    z-index: 200;
    overflow: hidden;
  }

  .sidebar-logo-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 22px 18px 16px;
    border-bottom: 1px solid var(--color-border);
    flex-shrink: 0;
  }

  .sidebar-logo-mark {
    width: 32px; height: 32px;
    background: linear-gradient(135deg, var(--color-primary-lt), #06B6D4);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 15px; font-weight: 800; color: #fff;
    flex-shrink: 0;
  }

  .sidebar-wordmark {
    font-size: 17px; font-weight: 800;
    background: linear-gradient(135deg, var(--color-primary-lt), #06B6D4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.3px;
  }

  .sidebar-nav-items {
    flex: 1;
    padding: 10px 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow-y: auto;
  }

  .sidebar-nav-btn {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    width: 100%;
    text-align: left;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--color-text-muted);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: background 0.12s, color 0.12s;
    line-height: 1.2;
    min-height: unset;
    flex: none;
  }

  .sidebar-nav-btn:hover {
    background: var(--color-surface-2);
    color: var(--color-text);
  }

  .sidebar-nav-btn.active {
    background: rgba(124, 58, 237, 0.15);
    color: var(--color-primary-lt);
  }

  .sidebar-nav-btn.active .sidebar-nav-icon svg {
    stroke: var(--color-primary-lt);
  }

  .sidebar-nav-icon {
    width: 20px; height: 20px;
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
  }

  .sidebar-nav-icon svg {
    stroke: var(--color-text-muted);
    transition: stroke 0.12s;
  }

  .sidebar-nav-btn:hover .sidebar-nav-icon svg {
    stroke: var(--color-text);
  }

  .sidebar-nav-label {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
  }

  /* Sidebar user card (footer) */
  .sidebar-user-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-top: 1px solid var(--color-border);
    flex-shrink: 0;
    cursor: pointer;
  }

  .sidebar-user-card:hover { background: var(--color-surface-2); }

  .sidebar-user-avatar-sm {
    width: 30px; height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary-lt), #06B6D4);
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700; color: #fff;
    flex-shrink: 0;
    background-size: cover;
    background-position: center;
  }

  .sidebar-user-details { flex: 1; min-width: 0; }

  .sidebar-user-name {
    font-size: 12.5px; font-weight: 600;
    color: var(--color-text);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }

  .sidebar-nudge-id {
    font-size: 10.5px;
    color: var(--color-text-muted);
    white-space: nowrap;
  }

  /* ── Main content shift ── */
  .app-main {
    margin-left: 210px;
    padding-bottom: 32px;
    max-width: none;
  }

  /* Give views comfortable desktop width with max-width */
  .view {
    max-width: 740px;
    padding-left: 24px;
    padding-right: 24px;
  }

  /* Profile view gets a bit more room */
  #view-profile {
    max-width: 820px;
  }

  /* View headers at desktop */
  .view-header {
    padding-top: 28px;
  }

  .view-header h2 {
    font-size: 1.6rem;
  }
}

/* ── Test voice preview button (NudgeUP-rxbk) ───────────────────────────────── */
.btn-test-voice {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 10px;
  padding: 6px 14px;
  background: none;
  border: 1px solid var(--color-border);
  border-radius: 20px;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, opacity 0.15s;
}
.btn-test-voice:hover  { border-color: var(--color-primary); color: var(--color-primary); }
.btn-test-voice:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Deepgram Aura voice picker (NudgeUP-czsx) ──────────────────────────────── */
.coach-aura-wrap {
  margin-top: 12px;
}
.coach-aura-label {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  margin: 0 0 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.badge-pro {
  font-size: 0.65rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--color-primary), #7c3aed);
  color: #fff;
  padding: 1px 6px;
  border-radius: 10px;
  letter-spacing: 0.03em;
}
.coach-aura-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.coach-aura-tile {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1.5px solid var(--color-border);
  border-radius: 8px;
  cursor: pointer;
  background: var(--color-surface);
  transition: border-color 0.15s, background 0.15s;
  user-select: none;
}
.coach-aura-tile:hover  { border-color: var(--color-primary); }
.coach-aura-tile.active {
  border-color: var(--color-primary);
  background: rgba(124,58,237,0.10);
  background: color-mix(in srgb, var(--color-primary) 10%, transparent);
}
.coach-aura-name {
  font-size: 0.82rem;
  color: var(--color-text);
}
.coach-aura-preview {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.7rem;
  color: var(--color-text-muted);
  padding: 0 2px;
  line-height: 1;
  transition: color 0.15s;
}
.coach-aura-preview:hover { color: var(--color-primary); }
.coach-aura-preview:disabled { opacity: 0.4; cursor: not-allowed; }

/* Tile body: name + desc stacked (NudgeUP-ezdo) */
.coach-aura-tile-body {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1;
  min-width: 0;
}
.coach-aura-desc {
  font-size: 0.68rem;
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Locked tile for free-tier voice cards */
.coach-aura-tile.voice-locked {
  opacity: 0.55;
  cursor: pointer;
  position: relative;
}
.coach-aura-tile.voice-locked:hover {
  border-color: var(--color-primary);
  opacity: 0.75;
}
.voice-lock-icon {
  font-size: 0.78rem;
  flex-shrink: 0;
}

/* Aura TTS stop bar (shown while response is playing) */
.aura-tts-bar {
  display: flex;
  justify-content: flex-end;
  margin-top: 6px;
}
.aura-tts-stop-btn {
  background: none;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  padding: 4px 12px;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.aura-tts-stop-btn:hover { border-color: var(--color-primary); color: var(--color-primary); }

/* ── Avatar upload — NudgeUP-e6uu / NudgeUP-buo1 ───────────────────────────── */
.profile-avatar-wrap.uploading {
  pointer-events: none;
}

/* Wrapper keeps remove button anchored to avatar */
.profile-avatar-container {
  position: relative;
  display: inline-block;
  flex-shrink: 0;
}

/* Remove avatar button */
.avatar-remove-btn {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--color-danger);
  color: #fff;
  border: 2px solid var(--color-bg);
  font-size: 10px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  padding: 0;
}
.avatar-remove-btn:hover { background: #b91c1c; }

/* Bud avatar with photo */
.bud-avatar-photo {
  border-radius: 50%;
  background-color: var(--color-surface-2);
  flex-shrink: 0;
}

/* ── Coach personality picker (NudgeUP-4bca) ──────────────────────────────── */
.coach-personality-wrap { margin-top: 12px; }
.coach-personality-heading {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-text);
  margin: 0 0 6px;
}
.coach-personality-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.coach-personality-tile {
  flex: 1 1 30%;
  min-width: 92px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 10px 12px;
  border: 1.5px solid var(--color-border);
  border-radius: 10px;
  cursor: pointer;
  background: var(--color-surface);
  transition: border-color 0.15s, background 0.15s;
  user-select: none;
}
.coach-personality-tile:hover { border-color: var(--color-primary); }
.coach-personality-tile.active {
  border-color: var(--color-primary);
  background: rgba(124,58,237,0.10);
  background: color-mix(in srgb, var(--color-primary) 10%, transparent);
}
.coach-personality-tile:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}
.coach-personality-icon { font-size: 1.1rem; line-height: 1; }
.coach-personality-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text);
}
.coach-personality-desc {
  font-size: 0.72rem;
  color: var(--color-text-muted);
  line-height: 1.3;
}
.coach-personality-preview {
  margin: 8px 0 0;
  font-size: 0.78rem;
  font-style: italic;
  color: var(--color-text-muted);
  min-height: 1.1em;
}

/* ── Profile completeness setup card (NudgeUP-9ozc) ─────────────────────── */
.setup-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin: 0 0 12px;
}

.setup-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.setup-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
}

.setup-card-dismiss {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-muted);
  font-size: 14px;
  padding: 2px 4px;
  line-height: 1;
}

.setup-progress-bar {
  height: 4px;
  background: var(--color-surface-2);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 4px;
}

.setup-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary-lt), #06B6D4);
  border-radius: 2px;
  transition: width 0.4s ease;
}

.setup-progress-label {
  font-size: 11px;
  color: var(--color-text-muted);
  margin: 0 0 10px;
}

.setup-steps {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.setup-step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 6px;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: 6px;
  text-align: left;
  width: 100%;
  transition: background 0.12s;
}

.setup-step:hover:not([disabled]) { background: var(--color-surface-2); }
.setup-step[data-done="true"] { cursor: default; opacity: 0.65; }

.setup-step-check { font-size: 15px; flex-shrink: 0; width: 20px; text-align: center; }
.setup-step-text  { flex: 1; font-size: 13.5px; color: var(--color-text); }
.setup-step-arrow { font-size: 16px; color: var(--color-text-muted); flex-shrink: 0; }

/* ── Quick-add FAB (NudgeUP-fz3r) ───────────────────────────────────────────── */
.fab-add {
  position: fixed;
  bottom: calc(env(safe-area-inset-bottom) + 72px); /* above bottom-nav */
  right: 18px;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary-lt), #06B6D4);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(124,58,237,0.45);
  z-index: 150;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.2s, opacity 0.25s, bottom 0.2s;
}

.fab-add:hover { transform: scale(1.08); }
.fab-add.fab-open { background: var(--color-surface-2); box-shadow: 0 2px 8px rgba(0,0,0,0.3); }
.fab-add.fab-hidden { opacity: 0; pointer-events: none; transform: translateY(16px); }

/* Hide FAB on desktop (sidebar already has nav) */
@media (min-width: 768px) { .fab-add, .modal-quick-add { display: none !important; } }

/* One-shot pulse ring */
@keyframes fab-ring {
  0%   { box-shadow: 0 0 0 0 rgba(124,58,237,0.6); }
  70%  { box-shadow: 0 0 0 16px rgba(124,58,237,0); }
  100% { box-shadow: 0 0 0 0 rgba(124,58,237,0); }
}
.fab-pulse { animation: fab-ring 0.9s ease-out 1; }

/* Quick-add modal sheet */
.modal-quick-add {
  position: fixed;
  bottom: calc(env(safe-area-inset-bottom) + 64px);
  left: 12px; right: 12px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  z-index: 149;
}

.quick-add-heading {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  margin: 0 0 8px;
}

.quick-add-input {
  width: 100%;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 15px;
  color: var(--color-text);
  outline: none;
  margin-bottom: 10px;
  box-sizing: border-box;
}
.quick-add-input:focus { border-color: var(--color-primary-lt); }

.quick-add-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.quick-add-due {
  flex: 1;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 13px;
  color: var(--color-text-muted);
  outline: none;
}
/* Dark-themed date picker chrome — only on actual dark themes */
:root .quick-add-due,
html.theme-cosmos .quick-add-due,
html.theme-terminal .quick-add-due,
html.theme-aurora .quick-add-due { color-scheme: dark; }
html.light-mode .quick-add-due,
html.theme-white .quick-add-due,
html.theme-warm  .quick-add-due  { color-scheme: light; }

.quick-add-submit {
  flex-shrink: 0;
  padding: 8px 20px;
  font-size: 14px;
}

/* ── App update UI (NudgeUP-ntca) ───────────────────────────────────────────── */

/* Blocking screen */
.update-blocking {
  position: fixed;
  inset: 0;
  background: var(--color-bg);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.update-blocking-card {
  text-align: center;
  max-width: 320px;
}

.update-blocking-icon {
  font-size: 52px;
  margin-bottom: 16px;
}

.update-blocking-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 10px;
}

.update-blocking-body {
  font-size: 15px;
  color: var(--color-text-muted);
  margin: 0 0 24px;
  line-height: 1.5;
}

/* Soft banner */
.update-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9000;
  background: linear-gradient(90deg, var(--color-primary-lt), #06B6D4);
  color: #fff;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
}

.update-banner span { flex: 1; font-weight: 500; }

.update-banner-btn {
  background: rgba(255,255,255,0.25);
  border: 1px solid rgba(255,255,255,0.5);
  color: #fff;
  padding: 4px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
}

.update-banner-dismiss {
  background: none;
  border: none;
  color: rgba(255,255,255,0.8);
  cursor: pointer;
  font-size: 16px;
  padding: 2px 4px;
  flex-shrink: 0;
}

/* ── All-done celebration overlay (NudgeUP-unid) ─────────────────────────── */
.all-done-overlay {
  position: fixed;
  inset: 0;
  background: var(--color-overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9500;
  padding: 24px;
  animation: fadeIn 0.2s ease;
}
.all-done-overlay.hidden { display: none; }

.all-done-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  max-width: 340px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-elevated);
  animation: scaleIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes scaleIn {
  from { transform: scale(0.85); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}

.all-done-emoji { font-size: 3.5rem; margin-bottom: 12px; line-height: 1; }
.all-done-title { font-size: 1.5rem; font-weight: 700; color: var(--color-text); margin-bottom: 8px; }
.all-done-streak { font-size: 1rem; color: var(--color-primary-lt); font-weight: 600; min-height: 1.4em; margin-bottom: 24px; }
.all-done-btn { width: 100%; }

/* ── Streak-risk nudge banner (NudgeUP-xit5) ─────────────────────────────── */
.streak-nudge-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(90deg, #92400e, #b45309);
  color: #fff;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 4000;
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  animation: slideDown 0.3s ease;
}
.streak-nudge-banner.hidden { display: none; }

@keyframes slideDown {
  from { transform: translateY(-100%); }
  to   { transform: translateY(0); }
}

.streak-nudge-text { flex: 1; }

.streak-nudge-add {
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.4);
  color: #fff;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}
.streak-nudge-add:hover { background: rgba(255,255,255,0.3); }

.streak-nudge-close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.8);
  cursor: pointer;
  font-size: 16px;
  padding: 2px 4px;
  flex-shrink: 0;
  line-height: 1;
}

/* ── Streak-recovery banner (NudgeUP-wy5b) ──────────────────────────────── */
.streak-recovery-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, rgba(245,158,11,0.13), rgba(251,191,36,0.07));
  border: 1px solid rgba(245,158,11,0.40);
  border-radius: var(--radius-lg);
  padding: 10px 14px;
  margin-bottom: 12px;
  animation: slideDown 0.25s ease;
}
.streak-recovery-banner.hidden { display: none; }
.streak-recovery-icon { font-size: 1.2rem; flex-shrink: 0; }
.streak-recovery-msg  { flex: 1; font-size: 0.88rem; line-height: 1.4; margin: 0; color: var(--color-text); }
.streak-recovery-cta {
  flex-shrink: 0;
  background: rgba(245,158,11,0.18);
  border: 1px solid rgba(245,158,11,0.45);
  color: var(--color-amber-dark, #b45309);
  border-radius: 6px;
  padding: 4px 11px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}
.streak-recovery-cta:hover { background: rgba(245,158,11,0.28); }
.streak-recovery-dismiss {
  flex-shrink: 0;
  background: none;
  border: none;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  color: var(--color-text-muted);
  padding: 2px 4px;
  border-radius: 4px;
  transition: color 0.15s;
}
.streak-recovery-dismiss:hover { color: var(--color-text); }

/* ── Due-date quick-chips (NudgeUP-8zr6) ────────────────────────────────── */
.due-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.due-chip {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: 100px;
  padding: 4px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-text-muted);
  cursor: pointer;
  font-family: var(--font);
  transition: background 0.12s, color 0.12s, border-color 0.12s;
  white-space: nowrap;
}

.due-chip:hover {
  background: var(--color-surface);
  color: var(--color-text);
  border-color: var(--color-primary);
}

.due-chip--active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

/* ── Victory broadcast bar (NudgeUP-w9ny) ───────────────────────────────── */
.victory-bud-bar {
  position: fixed;
  bottom: calc(var(--nav-height) + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--color-primary);
  color: #fff;
  border-radius: 100px;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 3500;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 4px 20px rgba(124,58,237,0.5);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s;
  opacity: 0;
  white-space: nowrap;
}
.victory-bud-bar.hidden { display: none; }
.victory-bud-bar--visible { transform: translateX(-50%) translateY(0); opacity: 1; }

.victory-bud-btn {
  background: rgba(255,255,255,0.25);
  border: 1px solid rgba(255,255,255,0.5);
  color: #fff;
  border-radius: 100px;
  padding: 4px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font);
}
.victory-bud-btn:hover { background: rgba(255,255,255,0.35); }

.victory-bud-close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.8);
  cursor: pointer;
  font-size: 14px;
  padding: 2px 4px;
  line-height: 1;
}

/* ── Profile completeness bar (NudgeUP-6ceh) ────────────────────────────── */
.profile-completeness-wrap {
  padding: 12px 16px 0;
}
.profile-completeness-wrap.hidden { display: none; }

.profile-completeness-bar-track {
  height: 4px;
  background: var(--color-surface-2);
  border-radius: 100px;
  overflow: hidden;
  margin-bottom: 10px;
}

.profile-completeness-bar-fill {
  height: 100%;
  background: var(--color-primary-lt);
  border-radius: 100px;
  transition: width 0.6s ease;
}

.profile-completeness-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin-bottom: 4px;
}

.profile-completeness-pct {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-primary-lt);
}

.profile-completeness-label {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  font-weight: 600;
  flex: 1;
}

.profile-completeness-list {
  width: 100%;
  list-style: none;
  padding: 0;
  margin: 4px 0 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.profile-completeness-list li {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.profile-completeness-list li::before {
  content: '○';
  font-size: 0.65rem;
  color: var(--color-primary-lt);
  flex-shrink: 0;
}

/* ── Onboarding go-to-app link (NudgeUP-aksf) ───────────────────────────── */
.ob-goto-app-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,0.6);
  font-size: 0.78rem;
  font-family: var(--font);
  cursor: pointer;
  margin-top: 10px;
  padding: 4px 8px;
  text-decoration: underline;
  text-underline-offset: 3px;
  display: block;
}

/* ── Settings accordion (NudgeUP-qjec) ──────────────────────────────────────
   Each section label becomes a tap-to-expand accordion panel. ─────────────── */
#settings-accordion { margin-top: 8px; }
.settings-accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 12px 0 8px;
  background: none;
  border: none;
  border-top: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font: 600 0.72rem/1 var(--font);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  text-align: left;
}
.settings-accordion-header:first-of-type { border-top: none; }
.accordion-chevron {
  font-size: 1rem;
  transition: transform 0.2s ease;
  display: inline-block;
  color: var(--color-text-muted);
}
.settings-accordion-header[aria-expanded="true"] .accordion-chevron {
  transform: rotate(90deg);
}
.settings-accordion-body {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease;
}
.settings-accordion-body.open {
  max-height: 9999px;
}

/* ── Focus-visible accessibility (NudgeUP-luq1) ────────────────────────────
   Global :focus-visible ring on all interactive controls — WCAG 2.4.7.
   Uses :focus:not(:focus-visible) to suppress the ring for mouse/touch users
   so we don't regress existing click UX. ─────────────────────────────────── */
:is(button, [role="button"], a[href], select):focus-visible,
:is(input, textarea):not([type="checkbox"]):not([type="radio"]):focus-visible {
  outline: 2px solid var(--color-primary-lt, #9B67F5);
  outline-offset: 2px;
}
/* Suppress default ring on mouse/touch (keep it for keyboard) */
:is(button, [role="button"], a[href], select):focus:not(:focus-visible),
:is(input, textarea):not([type="checkbox"]):not([type="radio"]):focus:not(:focus-visible) {
  outline: none;
}
/* Extra: extend prefers-reduced-motion to cover all animated elements */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ── Narrow-viewport reflow (NudgeUP-ufie) — 320px/360px devices ────────────
   Use flex-wrap / single-column where layouts overflow at ≤360px. ──────────── */
@media (max-width: 360px) {
  .pause-duration-cards {
    grid-template-columns: 1fr;
  }
  .referral-link-row {
    flex-wrap: wrap;
  }
  .referral-link-row .btn-sm {
    flex: 1 0 auto;
  }
  .trial-stats {
    flex-wrap: wrap;
  }
  .trial-stat {
    flex: 1 1 40%;
  }
  .plan-option {
    min-width: 0;
  }
  .coach-name-chips button {
    font-size: 0.78rem;
    padding: 4px 8px;
  }
}

/* ═══════════════════════════════════════════════════════════
   3-COLUMN DESKTOP LAYOUT — NudgeUP-7slt  (≥1024px)
   Below 1024px: existing mobile/tablet layout untouched.
   1024–1280px: icon-only sidebar rail (64px wide).
   >1280px: sidebar shows full labels (240px wide).
   Uses fixed positioning for sidebar + right panel so
   in-flow banners (sticky) still work correctly.
═══════════════════════════════════════════════════════════ */

/* Right panel hidden on mobile/tablet */
.desktop-right-panel {
  display: none;
}

@media (min-width: 1024px) {
  /* ── Cancel the narrow 640px PWA frame ── */
  .app-body {
    max-width: none;
    margin: 0;
    border-left: none;
    border-right: none;
    box-shadow: none;
  }

  /* ── Sidebar: fixed, icon-only rail (1024–1280px) ── */
  .sidebar-desktop {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: 64px;
    background: var(--color-surface);
    border-right: 1px solid var(--color-border);
    z-index: 200;
    overflow: hidden;
    align-items: center;
  }

  .sidebar-logo-row {
    justify-content: center;
    padding: 18px 0 14px;
  }

  .sidebar-wordmark {
    display: none;
  }

  .sidebar-nav-items {
    padding: 10px 0;
    align-items: center;
  }

  .sidebar-nav-btn {
    justify-content: center;
    padding: 12px;
    width: 44px;
  }

  .sidebar-nav-label {
    display: none;
  }

  .sidebar-user-details {
    display: none;
  }

  .sidebar-user-card {
    justify-content: center;
    padding: 12px;
  }

  /* ── Right panel: fixed, right column ── */
  .desktop-right-panel {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; right: 0; bottom: 0;
    width: 280px;
    background: var(--color-surface);
    border-left: 1px solid var(--color-border);
    overflow-y: auto;
    padding: 20px 16px;
    gap: 24px;
    z-index: 150;
  }

  /* ── Main content: offset from both fixed panels ── */
  .app-main {
    margin-left: 64px;
    margin-right: 280px;
    max-width: none;
    padding-bottom: 32px;
  }

  .view {
    max-width: 720px;
    padding-left: 32px;
    padding-right: 32px;
  }

  #view-profile {
    max-width: 800px;
  }

  /* ── Bottom nav stays hidden ── */
  .bottom-nav { display: none !important; }
}

/* ── Full labels at >1280px ── */
@media (min-width: 1280px) {
  .sidebar-desktop {
    width: 240px;
    align-items: stretch;
  }

  .sidebar-logo-row {
    justify-content: flex-start;
    padding: 22px 18px 16px;
  }

  .sidebar-wordmark {
    display: block;
  }

  .sidebar-nav-items {
    padding: 10px 8px;
    align-items: stretch;
  }

  .sidebar-nav-btn {
    justify-content: flex-start;
    padding: 10px 12px;
    width: 100%;
  }

  .sidebar-nav-label {
    display: block;
  }

  .sidebar-user-details {
    display: block;
  }

  .sidebar-user-card {
    justify-content: flex-start;
    padding: 12px 14px;
  }

  .app-main {
    margin-left: 240px;
  }
}

/* ── Right panel widget styles ── */
.drp-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.drp-section-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
}

.drp-streak-display {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.drp-streak-flame {
  font-size: 1.4rem;
  line-height: 1;
}

.drp-streak-count {
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-text);
  line-height: 1;
}

.drp-streak-unit {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.drp-progress-bar-wrap {
  height: 6px;
  background: var(--color-surface-2);
  border-radius: 999px;
  overflow: hidden;
}

.drp-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--color-primary-lt), var(--color-accent));
  border-radius: 999px;
  transition: width 0.4s ease;
}

.drp-progress-label {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  margin: 0;
}

.drp-buds-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.drp-empty {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin: 0;
}

/* ── Combined bud streak milestone card (NudgeUP-jbr2) ───────────────────── */
.combined-milestone-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: linear-gradient(135deg, rgba(245,158,11,0.15) 0%, rgba(251,191,36,0.10) 100%);
  border: 1px solid rgba(245,158,11,0.4);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  margin-bottom: 12px;
  box-shadow: 0 2px 12px rgba(245,158,11,0.15);
  animation: milestone-slide-in 0.35s ease;
  position: relative;
}
.combined-milestone-card__emoji {
  font-size: 2rem;
  line-height: 1;
  flex-shrink: 0;
}
.combined-milestone-card__body {
  flex: 1;
  min-width: 0;
}
.combined-milestone-card__title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--color-warning, #d97706);
  margin: 0 0 2px;
  line-height: 1.3;
}
.combined-milestone-card__sub {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin: 0;
}
.combined-milestone-card__dismiss {
  position: absolute;
  top: 8px;
  right: 10px;
  background: none;
  border: none;
  font-size: 1rem;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 2px 4px;
  line-height: 1;
  border-radius: 4px;
}
.combined-milestone-card__dismiss:hover {
  color: var(--color-text);
  background: rgba(0,0,0,0.06);
}
@keyframes milestone-slide-in {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
