/* ============================================================
   SOMA — Calm ADHD focus tracker
   Dark-only · Minimal · One thing at a time
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #141418;
  --surface: #1c1c22;
  --surface-hover: #222228;
  --border: #2a2a32;

  --text-primary: #e8e8ec;
  --text-secondary: #8b8b96;
  --text-muted: #5a5a66;

  /* Project accents — repainted for at-a-glance distinction on the Candy Land path.
     Each active project gets a hue from a different family (warm / cool / neutral)
     so no two projects look alike side-by-side. Values drawn from the 16-color
     project-tag palette in app.js. */
  --c-dlpfc: #e07a5f;       /* coral   — RUSH DLPFC AD */
  --c-fic: #d98c3f;         /* rust    — RUSH FIC AD (was duplicate of dlpfc) */
  --c-bd2: #8e7cc3;         /* lavender — BD2 ACC */
  --c-dg: #4f8fc0;          /* steel-blue — DG Neurogenesis */
  --c-package: #a3c586;     /* fresh green — txomics Package */
  --c-cursor: #5c8a7a;      /* teal    — Cursor Plan (was duplicate of dg) */
  --c-eef2: #e6b422;        /* amber   — EEF2 Methods Paper */
  --c-network: #9ca3af;     /* archived, keep neutral */
  --c-learning: #3f6b8b;    /* deep-blue — Learning Plan */
  --c-career: #b84a62;      /* berry   — Career Path */
  --c-gold: #d4a44c;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --text-xs: 11px;
  --text-sm: 13px;
  --text-base: 15px;
  --text-md: 16px;
  --text-lg: 18px;

  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px;
  --sp-5: 20px; --sp-6: 24px; --sp-8: 32px; --sp-10: 40px;

  --r-sm: 4px; --r-md: 6px; --r-lg: 8px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.2);
  --t-fast: 150ms ease-out;
  --t-normal: 200ms ease-out;

  --sidebar-w: 56px;
  --bottom-bar-h: 52px;
}

html { font-size: var(--text-base); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body { font-family: var(--font); background: var(--bg); color: var(--text-primary); line-height: 1.5; min-height: 100vh; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }

/* ---- Layout Shell ---- */
.app-shell { display: flex; min-height: 100vh; }

/* Sidebar desktop */
.sidebar {
  position: fixed; top: 0; left: 0;
  width: var(--sidebar-w); height: 100vh;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column; align-items: center;
  padding: var(--sp-4) 0; gap: var(--sp-2); z-index: 100;
}
.sidebar .nav-item {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--r-lg); color: var(--text-muted);
  cursor: pointer; transition: background var(--t-fast), color var(--t-fast);
  position: relative;
}
.sidebar .nav-item:hover { background: var(--surface-hover); color: var(--text-secondary); }
.sidebar .nav-item.active { color: var(--text-primary); background: rgba(255,255,255,0.06); }
.sidebar .nav-item svg { width: 20px; height: 20px; }
.sidebar .nav-spacer { flex: 1; }

.sidebar .nav-item .tooltip {
  position: absolute; left: 52px; top: 50%; transform: translateY(-50%);
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-primary); font-size: var(--text-sm);
  padding: 4px 10px; border-radius: var(--r-sm); white-space: nowrap;
  pointer-events: none; opacity: 0; transition: opacity var(--t-fast);
}
.sidebar .nav-item:hover .tooltip { opacity: 1; }

/* Main content */
.main-content {
  margin-left: var(--sidebar-w); flex: 1; min-height: 100vh;
  padding: var(--sp-8) var(--sp-8) var(--sp-10);
  max-width: 720px;
}

/* Bottom bar mobile */
.bottom-bar {
  display: none; position: fixed; bottom: 0; left: 0; right: 0;
  height: var(--bottom-bar-h); background: var(--surface);
  border-top: 1px solid var(--border); z-index: 100;
  justify-content: space-around; align-items: center;
}
.bottom-bar .nav-item {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  color: var(--text-muted); cursor: pointer; font-size: 10px;
  padding: var(--sp-1) var(--sp-2); border-radius: var(--r-md);
  transition: color var(--t-fast);
}
.bottom-bar .nav-item:hover, .bottom-bar .nav-item.active { color: var(--text-primary); }
.bottom-bar .nav-item svg { width: 18px; height: 18px; }

/* ---- Views ---- */
.view { display: none; }
.view.active { display: block; animation: fadeIn 200ms ease-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

/* ---- Shared Components ---- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: var(--sp-4);
  transition: background var(--t-fast);
}
.card.clickable { cursor: pointer; }
.card.clickable:hover { background: var(--surface-hover); }

.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-4); border: none; border-radius: var(--r-md);
  font-family: var(--font); font-size: var(--text-sm); font-weight: 500;
  cursor: pointer; transition: background var(--t-fast), opacity var(--t-fast);
  color: var(--text-primary);
}
.btn:hover { opacity: 0.85; }
.btn:disabled { opacity: 0.4; cursor: default; }
.btn-primary { background: var(--c-dlpfc); color: #fff; }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text-secondary); }
.btn-outline:hover { border-color: var(--text-muted); color: var(--text-primary); }
.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { color: var(--text-primary); background: rgba(255,255,255,0.04); }
.btn-danger { background: transparent; border: 1px solid rgba(176,112,112,0.3); color: #b07070; }
.btn-danger:hover { border-color: #b07070; opacity: 1; }

.badge {
  display: inline-flex; align-items: center;
  padding: 2px 8px; font-size: var(--text-xs); font-weight: 500;
  border-radius: var(--r-sm); background: rgba(255,255,255,0.06); color: var(--text-secondary);
}
.badge-type {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; padding: 1px 6px;
}

/* ========================================
   HOME VIEW — Meditation-like daily view
   ======================================== */
.home-view { max-width: 480px; margin: 0 auto; }

.greeting-bar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: var(--sp-8);
}
.greeting-date { font-size: var(--text-md); font-weight: 500; color: var(--text-primary); }
.points-badge { font-size: var(--text-sm); color: var(--text-muted); font-weight: 400; }

/* Start next block — THE button */
.start-block-btn {
  width: 100%; padding: var(--sp-5) var(--sp-6);
  border: none; border-radius: var(--r-lg);
  font-family: var(--font); font-size: var(--text-base); font-weight: 600;
  color: #fff; cursor: pointer;
  transition: opacity var(--t-fast), transform var(--t-fast);
  text-align: left;
  display: flex; flex-direction: column; gap: 2px;
  margin-bottom: var(--sp-8);
}
.start-block-btn:hover { opacity: 0.9; transform: translateY(-1px); }
.start-block-btn .btn-label-sm {
  font-size: var(--text-xs); font-weight: 400; opacity: 0.7;
}

/* Block circle rows */
.block-section { margin-bottom: var(--sp-6); }
.block-section-label {
  font-size: var(--text-xs); color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.5px;
  margin-bottom: var(--sp-2); font-weight: 500;
}
.block-circles { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.block-circle {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid var(--border); background: transparent;
  transition: background var(--t-fast), border-color var(--t-fast);
  flex-shrink: 0;
}
.block-circle.filled { border-color: transparent; }
.block-circle.bonus { border-color: transparent; background: var(--c-gold); }

/* Done message */
.done-msg {
  font-size: var(--text-sm); color: var(--text-secondary);
  background: rgba(125,184,138,0.08); border: 1px solid rgba(125,184,138,0.12);
  border-radius: var(--r-lg); padding: var(--sp-4); text-align: center;
  margin-bottom: var(--sp-6);
}

/* Where was I */
.where-was-i {
  font-size: var(--text-sm); color: var(--text-muted);
  padding-top: var(--sp-4); border-top: 1px solid var(--border);
  margin-top: var(--sp-4);
}

/* Streak */
.streak-line {
  font-size: var(--text-sm); color: var(--text-muted);
  margin-top: var(--sp-3);
}

/* No plan nudge */
.no-plan-msg {
  font-size: var(--text-sm); color: var(--text-muted);
  text-align: center; padding: var(--sp-5); margin-bottom: var(--sp-6);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg);
}
.no-plan-msg a { color: var(--text-secondary); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }

/* Sunday prompt */
.sunday-prompt {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: var(--sp-4);
  font-size: var(--text-sm); color: var(--text-secondary);
  text-align: center; margin-bottom: var(--sp-6);
}

/* ========================================
   PROJECTS VIEW
   ======================================== */
.section-title {
  font-size: var(--text-lg); font-weight: 600;
  margin-bottom: var(--sp-5); color: var(--text-primary);
}

.project-card {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); cursor: pointer;
  transition: background var(--t-fast); margin-bottom: var(--sp-2);
}
.project-card:hover { background: var(--surface-hover); }

.project-card .proj-name {
  font-size: var(--text-sm); font-weight: 600; color: var(--text-primary);
  white-space: nowrap; min-width: 110px;
}
/* Feature 2: Editable project name */
.proj-name-editable {
  cursor: text; border-radius: var(--r-sm);
  padding: 1px 3px; margin: -1px -3px;
  transition: background var(--t-fast);
}
.proj-name-editable:hover { background: rgba(255,255,255,0.06); }
.proj-name-input {
  background: transparent; border: none; border-bottom: 1px solid var(--text-muted);
  color: var(--text-primary); font-family: var(--font); font-size: var(--text-sm);
  font-weight: 600; outline: none; min-width: 80px; max-width: 180px;
}

.project-card .proj-milestone {
  font-size: var(--text-sm); color: var(--text-secondary);
  flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.project-card .proj-progress {
  font-size: var(--text-sm); color: var(--text-muted); white-space: nowrap;
}

.mini-progress {
  width: 48px; height: 3px; background: var(--border);
  border-radius: 2px; overflow: hidden; display: inline-block; vertical-align: middle;
}
.mini-progress-fill { height: 100%; border-radius: 2px; }

.archive-toggle {
  display: flex; align-items: center; gap: var(--sp-2);
  font-size: var(--text-sm); color: var(--text-muted);
  cursor: pointer; padding: var(--sp-3) 0; margin-top: var(--sp-4);
  transition: color var(--t-fast);
}
.archive-toggle:hover { color: var(--text-secondary); }
.archive-toggle svg { width: 14px; height: 14px; transition: transform var(--t-fast); }
.archive-toggle.open svg { transform: rotate(90deg); }

.archive-list { margin-top: var(--sp-2); }
.archive-list .project-card { opacity: 0.45; }

/* ========================================
   TRACK VIEW — milestones list for a project
   ======================================== */
.track-header {
  display: flex; align-items: flex-start; gap: var(--sp-3); margin-bottom: var(--sp-6);
}
.track-header-info { flex: 1; min-width: 0; }
.back-btn {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border: 1px solid var(--border);
  border-radius: var(--r-md); background: transparent; color: var(--text-secondary);
  cursor: pointer; transition: background var(--t-fast), color var(--t-fast); flex-shrink: 0;
}
.back-btn:hover { background: var(--surface-hover); color: var(--text-primary); }
.back-btn svg { width: 16px; height: 16px; }

.track-title { font-size: var(--text-lg); font-weight: 600; display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }

/* Feature 2: Tags on track view */
.track-tags {
  display: flex; align-items: center; gap: var(--sp-1); flex-wrap: wrap;
  margin-top: var(--sp-2);
}
.tag-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; font-size: var(--text-xs);
  border-radius: var(--r-sm); background: rgba(255,255,255,0.06);
  color: var(--text-secondary); border: 1px solid var(--border);
}
.tag-remove {
  background: none; border: none; color: var(--text-muted);
  cursor: pointer; padding: 0; line-height: 1; font-size: 12px;
  display: flex; align-items: center;
  transition: color var(--t-fast);
}
.tag-remove:hover { color: var(--text-primary); }
.tag-add-btn {
  background: none; border: 1px dashed var(--border);
  border-radius: var(--r-sm); color: var(--text-muted);
  font-size: var(--text-xs); padding: 2px 8px; cursor: pointer;
  font-family: var(--font); transition: border-color var(--t-fast), color var(--t-fast);
}
.tag-add-btn:hover { border-color: var(--text-muted); color: var(--text-secondary); }
.tag-input {
  background: var(--surface); border: 1px solid var(--text-muted);
  border-radius: var(--r-sm); color: var(--text-primary);
  font-family: var(--font); font-size: var(--text-xs);
  padding: 2px 8px; outline: none; width: 140px;
}

.milestone-card {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); cursor: pointer;
  transition: background var(--t-fast); margin-bottom: var(--sp-2);
}
.milestone-card:hover { background: var(--surface-hover); }
.milestone-card.status-done { opacity: 0.5; }
.milestone-card .ms-name {
  font-size: var(--text-sm); font-weight: 500; color: var(--text-primary); flex: 1;
  display: flex; align-items: center; gap: var(--sp-2);
}
.milestone-card .ms-progress { font-size: var(--text-sm); color: var(--text-muted); }

/* Feature 4: Milestone due date / pace indicator */
.ms-due-wrap {
  display: flex; align-items: center; gap: var(--sp-2);
  font-size: var(--text-xs); color: var(--text-muted);
  margin-top: 4px;
}
.ms-due-date-input {
  background: transparent; border: none; border-bottom: 1px solid var(--border);
  color: var(--text-muted); font-family: var(--font); font-size: var(--text-xs);
  outline: none; cursor: pointer; color-scheme: dark;
  width: 108px;
}
.ms-due-date-input:focus { border-bottom-color: var(--text-muted); }
.ms-pace-label { font-size: var(--text-xs); }
.ms-pace-ok { color: var(--text-muted); }
.ms-pace-warn { color: var(--c-dlpfc); }
.ms-pace-crit { color: #b07070; }

/* Feature 3: Urgency dots */
.urgency-dot {
  width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
  display: inline-block;
}
.urgency-dot.important { background: var(--c-dlpfc); }
.urgency-dot.critical { background: #b07070; }

/* Urgency toggle button */
.urgency-btn {
  background: none; border: none; cursor: pointer;
  padding: 2px; border-radius: var(--r-sm);
  display: flex; align-items: center;
  color: var(--text-muted); transition: color var(--t-fast);
  font-size: var(--text-xs);
}
.urgency-btn:hover { color: var(--text-secondary); }

/* ========================================
   PATH VIEW — board game winding path
   ======================================== */
.path-header { display: flex; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-2); }
.path-title { font-size: var(--text-lg); font-weight: 600; display: flex; align-items: center; gap: var(--sp-2); }
.path-progress-text { font-size: var(--text-sm); color: var(--text-muted); margin-bottom: var(--sp-6); }

.winding-path { position: relative; padding: 0 var(--sp-6); }

.path-node { position: relative; margin-bottom: var(--sp-1); }

.path-step {
  position: relative; width: 220px;
  padding: var(--sp-3) var(--sp-4);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); cursor: pointer;
  transition: background var(--t-fast), border-color var(--t-fast);
}
.path-step:hover { background: var(--surface-hover); }
.path-step:hover .step-reorder { opacity: 1; }
.path-step.left { margin-left: 0; margin-right: auto; }
.path-step.right { margin-left: auto; margin-right: 0; }

.path-step.status-locked { opacity: 0.35; pointer-events: none; }
.path-step.status-active { border-color: var(--step-accent, var(--text-muted)); }
.path-step.status-done { opacity: 0.55; }

.game-piece {
  position: absolute; width: 12px; height: 12px;
  border-radius: 50%; top: 50%; transform: translateY(-50%);
  animation: pulse 2s ease-in-out infinite; z-index: 2;
}
.path-step.left .game-piece { right: -22px; }
.path-step.right .game-piece { left: -22px; }

@keyframes pulse { 0%, 100% { opacity: 0.6; } 50% { opacity: 1; } }

.step-num { font-size: var(--text-xs); color: var(--text-muted); margin-bottom: 2px; }
.step-title-text { font-size: var(--text-sm); font-weight: 500; color: var(--text-primary); margin-bottom: var(--sp-1); }
.step-meta { display: flex; align-items: center; gap: var(--sp-2); }
.step-block-dots { display: flex; gap: 3px; }
.step-block-dot {
  width: 6px; height: 6px; border-radius: 50%;
  border: 1.5px solid var(--text-muted);
}
.step-block-dot.filled { background: var(--text-secondary); border-color: var(--text-secondary); }

.path-connector { width: 1px; height: 12px; background: var(--border); margin: 0 auto; }

.gate-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: var(--sp-4);
  margin-top: var(--sp-3); width: 280px;
  margin-left: auto; margin-right: auto;
}
.gate-card h4 { font-size: var(--text-sm); font-weight: 600; color: var(--text-primary); margin-bottom: var(--sp-2); }
.gate-item {
  font-size: var(--text-sm); color: var(--text-muted);
  padding: 2px 0 2px var(--sp-4); position: relative;
}
.gate-item::before {
  content: ''; position: absolute; left: 0; top: 9px;
  width: 6px; height: 6px; border-radius: 50%; border: 1.5px solid var(--text-muted);
}

.reward-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: var(--sp-4);
  margin-top: var(--sp-3); text-align: center;
  width: 280px; margin-left: auto; margin-right: auto;
}
.reward-card .reward-text { font-size: var(--text-sm); color: var(--text-secondary); }

/* Feature 1: Step reorder controls */
.step-reorder {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 2px;
  opacity: 0; transition: opacity var(--t-fast);
}
.step-reorder-btn {
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); padding: 2px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 2px; transition: color var(--t-fast), background var(--t-fast);
}
.step-reorder-btn:hover { color: var(--text-primary); background: rgba(255,255,255,0.08); }
.step-reorder-btn svg { width: 12px; height: 12px; }

/* Feature 1: Add step button */
.add-step-btn {
  display: flex; align-items: center; gap: var(--sp-2);
  width: 220px; padding: var(--sp-2) var(--sp-3);
  background: transparent; border: 1px dashed var(--border);
  border-radius: var(--r-lg); color: var(--text-muted);
  cursor: pointer; font-family: var(--font); font-size: var(--text-sm);
  transition: border-color var(--t-fast), color var(--t-fast);
  margin: var(--sp-2) 0;
}
.add-step-btn:hover { border-color: var(--text-muted); color: var(--text-secondary); }

/* Feature 1: Inline step title editing */
.step-title-editable {
  background: transparent; border: none; border-bottom: 1px solid transparent;
  color: var(--text-primary); font-family: var(--font); font-size: var(--text-sm);
  font-weight: 500; outline: none; width: 100%;
  transition: border-bottom-color var(--t-fast);
  padding: 0;
}
.step-title-editable:focus { border-bottom-color: var(--text-muted); }

/* ---- Step detail drawer ---- */
.drawer-overlay {
  display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5); z-index: 200;
}
.drawer-overlay.open { display: block; }

.drawer {
  position: fixed; top: 0; right: 0;
  width: 380px; max-width: 90vw; height: 100vh;
  background: var(--bg); border-left: 1px solid var(--border);
  z-index: 201; overflow-y: auto; padding: var(--sp-6);
  transform: translateX(100%); transition: transform 250ms ease-out;
}
.drawer-overlay.open .drawer { transform: translateX(0); }

.drawer-close {
  display: flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border: none; background: transparent;
  color: var(--text-muted); cursor: pointer; border-radius: var(--r-sm);
  margin-bottom: var(--sp-4);
}
.drawer-close:hover { color: var(--text-primary); }

.drawer h3 { font-size: var(--text-md); font-weight: 600; margin-bottom: var(--sp-2); }
.drawer-desc { font-size: var(--text-sm); color: var(--text-secondary); margin-bottom: var(--sp-5); line-height: 1.6; }

.drawer-section-title {
  font-size: var(--text-xs); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--text-muted); margin-bottom: var(--sp-2); margin-top: var(--sp-5);
}

.drawer-checklist label {
  display: flex; align-items: flex-start; gap: var(--sp-2);
  font-size: var(--text-sm); color: var(--text-secondary);
  padding: var(--sp-1) 0; cursor: pointer;
}
.drawer-cb {
  appearance: none; -webkit-appearance: none;
  width: 14px; height: 14px; border: 1.5px solid var(--text-muted);
  border-radius: 3px; background: transparent; cursor: pointer;
  flex-shrink: 0; margin-top: 2px;
  transition: background var(--t-fast), border-color var(--t-fast);
}
.drawer-cb:checked { background: var(--c-package); border-color: var(--c-package); }
.drawer-cb:checked::after {
  content: ''; display: block; width: 4px; height: 7px;
  border: solid #fff; border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg); margin: 1px auto 0;
}

.drawer-notes {
  width: 100%; min-height: 80px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: var(--sp-3);
  font-family: var(--font); font-size: var(--text-sm); color: var(--text-primary);
  resize: vertical; outline: none;
  transition: border-color var(--t-fast);
}
.drawer-notes:focus { border-color: var(--text-muted); }
.drawer-notes::placeholder { color: var(--text-muted); }

.drawer-due-date {
  width: 100%; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: var(--sp-2) var(--sp-3);
  font-family: var(--font); font-size: var(--text-sm); color: var(--text-primary);
  outline: none; color-scheme: dark;
}

/* Feature 3: Urgency selector in drawer */
.urgency-picker {
  display: flex; gap: var(--sp-2); margin-top: var(--sp-2);
}
.urgency-option {
  display: flex; align-items: center; gap: 6px;
  padding: 4px 10px; border: 1px solid var(--border);
  border-radius: var(--r-sm); cursor: pointer; font-size: var(--text-xs);
  color: var(--text-muted); background: transparent;
  font-family: var(--font); transition: all var(--t-fast);
}
.urgency-option:hover { border-color: var(--text-muted); color: var(--text-secondary); }
.urgency-option.active-none { border-color: var(--text-muted); color: var(--text-primary); background: rgba(255,255,255,0.04); }
.urgency-option.active-important { border-color: var(--c-dlpfc); color: var(--c-dlpfc); background: rgba(196,154,108,0.08); }
.urgency-option.active-critical { border-color: #b07070; color: #b07070; background: rgba(176,112,112,0.08); }

/* ========================================
   FOCUS VIEW — Zen timer
   ======================================== */
.focus-view {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; min-height: 70vh; text-align: center;
  max-width: 480px; margin: 0 auto;
}

.focus-breadcrumb { font-size: var(--text-xs); color: var(--text-muted); margin-bottom: var(--sp-4); letter-spacing: 0.3px; }
.focus-step-title { font-size: var(--text-md); font-weight: 600; color: var(--text-primary); margin-bottom: var(--sp-8); max-width: 400px; }

.timer-ring { position: relative; width: 180px; height: 180px; margin: 0 auto var(--sp-6); }
.timer-ring svg { width: 180px; height: 180px; transform: rotate(-90deg); }
.timer-ring .ring-bg { fill: none; stroke: var(--border); stroke-width: 4; }
.timer-ring .ring-fill { fill: none; stroke-width: 4; stroke-linecap: round; transition: stroke-dashoffset 1s linear; }
.timer-time {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  font-size: 32px; font-weight: 600; font-variant-numeric: tabular-nums;
  color: var(--text-primary); letter-spacing: 1px;
}

.focus-block-info { font-size: var(--text-sm); color: var(--text-muted); margin-bottom: var(--sp-6); }

.focus-controls { display: flex; gap: var(--sp-3); justify-content: center; margin-bottom: var(--sp-5); }

.focus-toggle { display: flex; align-items: center; gap: var(--sp-2); margin-bottom: var(--sp-4); }
.focus-toggle button {
  padding: var(--sp-1) var(--sp-3);
  border: 1px solid var(--border); border-radius: var(--r-sm);
  background: transparent; color: var(--text-secondary);
  font-family: var(--font); font-size: var(--text-xs);
  cursor: pointer; transition: background var(--t-fast), color var(--t-fast);
}
.focus-toggle button.active { background: rgba(255,255,255,0.08); color: var(--text-primary); }

.focus-done-msg {
  font-size: var(--text-sm); color: var(--text-secondary);
  margin-top: var(--sp-4); padding: var(--sp-4);
  background: rgba(125,184,138,0.08); border-radius: var(--r-lg);
}

/* Points popup */
.points-popup {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
  font-size: 24px; font-weight: 600; color: var(--c-package);
  pointer-events: none; opacity: 0; z-index: 300;
  animation: pointsPop 2s ease-out forwards;
}
@keyframes pointsPop {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
  15% { opacity: 1; transform: translate(-50%, -50%) scale(1.05); }
  70% { opacity: 1; transform: translate(-50%, -60%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -70%) scale(1); }
}

/* Anti-switch modal */
.modal-overlay {
  display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6); z-index: 250;
  align-items: center; justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: var(--sp-6); max-width: 340px;
  text-align: center;
}
.modal-box p { font-size: var(--text-sm); color: var(--text-secondary); margin-bottom: var(--sp-5); }
.modal-actions { display: flex; gap: var(--sp-3); justify-content: center; }

/* ========================================
   SCHEDULE VIEW
   ======================================== */
.schedule-tabs {
  display: flex; gap: var(--sp-1);
  margin-bottom: var(--sp-6); border-bottom: 1px solid var(--border);
}
.schedule-tab {
  padding: var(--sp-2) var(--sp-4); font-size: var(--text-sm); font-weight: 500;
  color: var(--text-muted); cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color var(--t-fast), border-color var(--t-fast);
}
.schedule-tab:hover { color: var(--text-secondary); }
.schedule-tab.active { color: var(--text-primary); border-bottom-color: var(--text-primary); }

.review-summary { font-size: var(--text-base); color: var(--text-primary); margin-bottom: var(--sp-4); }
.review-breakdown { margin-bottom: var(--sp-5); }
.review-breakdown-item {
  display: flex; align-items: center; gap: var(--sp-2);
  font-size: var(--text-sm); color: var(--text-secondary); padding: 3px 0;
}
.review-wins { margin-bottom: var(--sp-5); }
.review-wins h4 { font-size: var(--text-sm); font-weight: 600; color: var(--text-primary); margin-bottom: var(--sp-2); }
.review-win-item {
  font-size: var(--text-sm); color: var(--text-secondary);
  padding: 2px 0 2px var(--sp-4); position: relative;
}
.review-win-item::before {
  content: ''; position: absolute; left: 0; top: 9px;
  width: 5px; height: 5px; background: var(--c-package); border-radius: 50%;
}
.morale-msg {
  font-size: var(--text-sm); color: var(--text-secondary); font-style: italic;
  margin-top: var(--sp-4); padding: var(--sp-3);
  background: rgba(125,184,138,0.06); border-radius: var(--r-md);
}

/* Focus picker */
.focus-picker {
  margin-bottom: var(--sp-6); padding: var(--sp-4);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
}
.focus-picker h4 { font-size: var(--text-sm); font-weight: 600; color: var(--text-primary); margin-bottom: var(--sp-3); }

.focus-proj-toggle {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-2) var(--sp-3);
  background: transparent; border: 1px solid var(--border);
  border-radius: var(--r-md); cursor: pointer;
  transition: background var(--t-fast), border-color var(--t-fast);
  margin-bottom: var(--sp-2);
}
.focus-proj-toggle:hover { background: var(--surface-hover); }
.focus-proj-toggle.selected { border-color: var(--text-muted); background: rgba(255,255,255,0.03); }
.focus-proj-toggle .fp-name { font-size: var(--text-sm); color: var(--text-secondary); font-weight: 500; }
.focus-proj-toggle.selected .fp-name { color: var(--text-primary); }

/* Plan grid */
.plan-grid {
  display: grid; grid-template-columns: repeat(5, 1fr);
  gap: var(--sp-2); margin-bottom: var(--sp-5);
}
.plan-day {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: var(--sp-3); min-height: 120px;
}
.plan-day-name {
  font-size: var(--text-xs); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--text-muted); margin-bottom: var(--sp-2);
}
.plan-slot {
  display: flex; align-items: center; gap: var(--sp-1);
  font-size: var(--text-xs); color: var(--text-secondary);
  padding: 4px 6px; background: rgba(255,255,255,0.03);
  border-radius: var(--r-sm); margin-bottom: 4px;
}
.plan-slot .dot { width: 6px; height: 6px; }
.plan-slot.flex-slot {
  border: 1px dashed var(--border); color: var(--text-muted); background: transparent;
}
/* Feature 3: Urgency in plan grid */
.plan-slot.urgency-critical { border-left: 2px solid #b07070; }
.plan-slot.urgency-important { border-left: 2px solid var(--c-dlpfc); }

/* ========================================
   IDEAS VIEW
   ======================================== */
.idea-input-wrap { display: flex; gap: var(--sp-2); margin-bottom: var(--sp-6); }
.idea-input {
  flex: 1; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: var(--sp-2) var(--sp-3);
  font-family: var(--font); font-size: var(--text-sm); color: var(--text-primary);
  outline: none; transition: border-color var(--t-fast);
}
.idea-input:focus { border-color: var(--text-muted); }
.idea-input::placeholder { color: var(--text-muted); }

.idea-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: var(--sp-3) var(--sp-4); margin-bottom: var(--sp-2);
}
.idea-text { font-size: var(--text-sm); color: var(--text-primary); margin-bottom: var(--sp-1); }
.idea-meta { display: flex; align-items: center; justify-content: space-between; }
.idea-time { font-size: var(--text-xs); color: var(--text-muted); }
.idea-promote {
  font-size: var(--text-xs); color: var(--text-muted);
  background: transparent; border: 1px solid var(--border);
  border-radius: var(--r-sm); padding: 2px 8px; cursor: pointer;
  font-family: var(--font); transition: color var(--t-fast), border-color var(--t-fast);
}
.idea-promote:hover { color: var(--text-secondary); border-color: var(--text-muted); }

/* Promote modal */
.promote-modal-content { text-align: left; }
.promote-modal-content select {
  width: 100%; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: var(--sp-2) var(--sp-3);
  font-family: var(--font); font-size: var(--text-sm); color: var(--text-primary);
  outline: none; margin-bottom: var(--sp-3); color-scheme: dark;
}

/* ========================================
   ADMIN VIEW (Feature 5)
   ======================================== */
.admin-cap-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--sp-3) var(--sp-4);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); margin-bottom: var(--sp-5);
}
.admin-cap-count { font-size: var(--text-sm); color: var(--text-secondary); }
.admin-cap-count strong { color: var(--text-primary); }
.admin-cap-reached {
  font-size: var(--text-sm); color: var(--c-package);
  font-style: italic;
}

.admin-input-wrap { display: flex; gap: var(--sp-2); margin-bottom: var(--sp-5); }
.admin-input {
  flex: 1; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: var(--sp-2) var(--sp-3);
  font-family: var(--font); font-size: var(--text-sm); color: var(--text-primary);
  outline: none; transition: border-color var(--t-fast);
}
.admin-input:focus { border-color: var(--text-muted); }
.admin-input::placeholder { color: var(--text-muted); }

.admin-section-label {
  font-size: var(--text-xs); color: var(--text-muted); font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.5px;
  margin-bottom: var(--sp-2); margin-top: var(--sp-4);
}
.admin-section-label:first-of-type { margin-top: 0; }

.admin-task-card {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); margin-bottom: var(--sp-2);
  transition: background var(--t-fast);
}
.admin-task-card.completed { opacity: 0.5; }
.admin-task-cb {
  appearance: none; -webkit-appearance: none;
  width: 16px; height: 16px; border: 1.5px solid var(--text-muted);
  border-radius: 3px; background: transparent; cursor: pointer;
  flex-shrink: 0;
  transition: background var(--t-fast), border-color var(--t-fast);
}
.admin-task-cb:checked { background: var(--c-package); border-color: var(--c-package); }
.admin-task-cb:checked::after {
  content: ''; display: block; width: 5px; height: 8px;
  border: solid #fff; border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg); margin: 1px auto 0;
}
.admin-task-text {
  flex: 1; font-size: var(--text-sm); color: var(--text-primary);
  line-height: 1.4;
}
.admin-task-card.completed .admin-task-text {
  text-decoration: line-through; color: var(--text-muted);
}
.admin-task-delete {
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); padding: 4px;
  border-radius: var(--r-sm); display: flex; align-items: center;
  transition: color var(--t-fast);
}
.admin-task-delete:hover { color: #b07070; }
.admin-task-delete svg { width: 14px; height: 14px; }

/* ========================================
   PREP VIEW (Feature 6)
   ======================================== */
.prep-batch-new {
  display: flex; gap: var(--sp-2); flex-wrap: wrap;
  margin-bottom: var(--sp-6); padding: var(--sp-4);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg);
}
.prep-batch-new h4 {
  width: 100%; font-size: var(--text-sm); font-weight: 600;
  color: var(--text-primary); margin-bottom: var(--sp-1);
}
.prep-input {
  flex: 1; min-width: 120px; background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: var(--sp-2) var(--sp-3);
  font-family: var(--font); font-size: var(--text-sm); color: var(--text-primary);
  outline: none; transition: border-color var(--t-fast);
}
.prep-input:focus { border-color: var(--text-muted); }
.prep-input::placeholder { color: var(--text-muted); }
.prep-date-input {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: var(--sp-2) var(--sp-3);
  font-family: var(--font); font-size: var(--text-sm); color: var(--text-primary);
  outline: none; color-scheme: dark;
}
.prep-select {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: var(--sp-2) var(--sp-3);
  font-family: var(--font); font-size: var(--text-sm); color: var(--text-primary);
  outline: none; color-scheme: dark;
}

/* Batch cards */
.batch-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); margin-bottom: var(--sp-3); overflow: hidden;
}
.batch-card-header {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4); cursor: pointer;
  transition: background var(--t-fast);
}
.batch-card-header:hover { background: var(--surface-hover); }
.batch-name { font-size: var(--text-sm); font-weight: 600; color: var(--text-primary); flex: 1; }
.batch-meta { font-size: var(--text-xs); color: var(--text-muted); }
.batch-chevron {
  color: var(--text-muted); transition: transform var(--t-fast);
  display: flex; align-items: center;
}
.batch-card.open .batch-chevron { transform: rotate(90deg); }
.batch-body { display: none; padding: var(--sp-3) var(--sp-4) var(--sp-4); border-top: 1px solid var(--border); }
.batch-card.open .batch-body { display: block; }

.batch-progress-bar {
  height: 3px; background: var(--border); border-radius: 2px;
  margin-bottom: var(--sp-3); overflow: hidden;
}
.batch-progress-fill { height: 100%; border-radius: 2px; background: var(--c-dg); transition: width var(--t-normal); }

/* Prep template section */
.prep-template-header {
  font-size: var(--text-sm); font-weight: 600; color: var(--text-secondary);
  margin-bottom: var(--sp-4); padding-top: var(--sp-4);
  border-top: 1px solid var(--border);
}
.prep-phase { margin-bottom: var(--sp-4); }
.prep-phase-name {
  font-size: var(--text-sm); font-weight: 500; color: var(--text-secondary);
  margin-bottom: var(--sp-1); display: flex; align-items: center; gap: var(--sp-2);
}
.prep-phase-day {
  font-size: var(--text-xs); color: var(--text-muted);
  background: rgba(255,255,255,0.04); border-radius: var(--r-sm);
  padding: 1px 6px;
}
.prep-phase-stop {
  font-size: var(--text-xs); color: var(--c-package);
  background: rgba(125,184,138,0.08); border-radius: var(--r-sm);
  padding: 1px 6px;
}
.prep-step {
  display: flex; align-items: flex-start; gap: var(--sp-2);
  font-size: var(--text-sm); color: var(--text-muted);
  padding: 3px 0 3px var(--sp-4);
}
.prep-step-cb {
  appearance: none; -webkit-appearance: none;
  width: 14px; height: 14px; border: 1.5px solid var(--text-muted);
  border-radius: 3px; background: transparent; cursor: pointer;
  flex-shrink: 0; margin-top: 2px;
  transition: background var(--t-fast), border-color var(--t-fast);
}
.prep-step-cb:checked { background: var(--c-dg); border-color: var(--c-dg); }
.prep-step-cb:checked::after {
  content: ''; display: block; width: 4px; height: 7px;
  border: solid #fff; border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg); margin: 1px auto 0;
}
.prep-step-info { flex: 1; }
.prep-step-name { color: var(--text-secondary); }
.prep-step-note { font-size: var(--text-xs); color: var(--text-muted); margin-top: 1px; }

/* ========================================
   SETTINGS VIEW
   ======================================== */
.settings-group { margin-bottom: var(--sp-6); }
.settings-group h4 { font-size: var(--text-sm); font-weight: 600; color: var(--text-primary); margin-bottom: var(--sp-3); }
.setting-row { display: flex; align-items: center; justify-content: space-between; padding: var(--sp-2) 0; }
.setting-label { font-size: var(--text-sm); color: var(--text-secondary); }
.setting-input {
  width: 64px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: var(--sp-1) var(--sp-2);
  font-family: var(--font); font-size: var(--text-sm); color: var(--text-primary);
  text-align: center; outline: none;
}
.setting-input:focus { border-color: var(--text-muted); }

/* Due indicators */
.due-soon { color: var(--c-dlpfc) !important; }
.due-urgent { color: #b07070 !important; }

/* Confetti */
.confetti-container { position: fixed; top: 0; left: 0; right: 0; bottom: 0; pointer-events: none; z-index: 400; overflow: hidden; }
.confetti-piece {
  position: absolute; width: 8px; height: 8px; opacity: 0;
  animation: confettiFall 2.5s ease-out forwards;
}
@keyframes confettiFall {
  0% { opacity: 1; transform: translateY(-20px) rotate(0deg); }
  100% { opacity: 0; transform: translateY(100vh) rotate(720deg); }
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .sidebar { display: none; }
  .bottom-bar { display: flex; }
  .main-content {
    margin-left: 0; padding: var(--sp-5) var(--sp-4) calc(var(--bottom-bar-h) + var(--sp-5));
    max-width: 100%;
  }
  .plan-grid { grid-template-columns: 1fr; }
  .path-step { width: 180px; }
  .drawer { width: 100vw; }
  .home-view { max-width: 100%; }
  .bottom-bar .nav-item span { font-size: 9px; }
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

::selection { background: rgba(196,154,108,0.3); }

/* ========================================
   FEATURE 9: REWARDS VIEW
   ======================================== */
.rewards-section-label {
  font-size: var(--text-xs); font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.8px; color: var(--text-muted); margin: var(--sp-6) 0 var(--sp-3);
}
.rewards-section-label:first-child { margin-top: 0; }

.reward-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: var(--sp-4);
  margin-bottom: var(--sp-3); transition: background var(--t-fast);
}
.reward-card.earned { border-color: rgba(212,164,76,0.35); }
.reward-card.claimed { opacity: 0.55; }

.reward-card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: var(--sp-3);
}
.reward-threshold {
  font-size: var(--text-sm); font-weight: 600; color: var(--text-primary);
}
.reward-status-badge {
  font-size: var(--text-xs); padding: 2px 8px; border-radius: var(--r-sm);
  font-weight: 500;
}
.reward-status-badge.locked { background: rgba(255,255,255,0.04); color: var(--text-muted); }
.reward-status-badge.earned { background: rgba(212,164,76,0.15); color: var(--c-gold); }
.reward-status-badge.claimed { background: rgba(125,184,138,0.15); color: var(--c-package); }

.reward-progress-bar {
  height: 3px; background: var(--border); border-radius: 2px;
  margin-bottom: var(--sp-3); overflow: hidden;
}
.reward-progress-fill {
  height: 100%; background: var(--c-gold); border-radius: 2px;
  transition: width 400ms ease-out;
}
.reward-progress-fill.full { background: var(--c-package); }

.reward-progress-label {
  font-size: var(--text-xs); color: var(--text-muted); margin-bottom: var(--sp-3);
}

.reward-picker {
  display: flex; gap: var(--sp-2); align-items: center; flex-wrap: wrap;
}
.reward-picker select {
  flex: 1; min-width: 0; background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: var(--sp-1) var(--sp-2);
  font-family: var(--font); font-size: var(--text-sm); color: var(--text-secondary);
  outline: none; cursor: pointer;
}
.reward-picker select:focus { border-color: var(--text-muted); }
.reward-custom-input {
  flex: 1; min-width: 120px; background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: var(--sp-1) var(--sp-2);
  font-family: var(--font); font-size: var(--text-sm); color: var(--text-primary);
  outline: none;
}
.reward-custom-input:focus { border-color: var(--text-muted); }
.reward-custom-input::placeholder { color: var(--text-muted); }

.reward-chosen-text {
  font-size: var(--text-sm); color: var(--text-secondary); margin-bottom: var(--sp-2);
  font-style: italic;
}

.reward-claim-btn {
  font-size: var(--text-xs); padding: 4px 12px;
  background: rgba(212,164,76,0.12); border: 1px solid rgba(212,164,76,0.3);
  color: var(--c-gold); border-radius: var(--r-sm); cursor: pointer;
  transition: background var(--t-fast); font-family: var(--font); font-weight: 500;
}
.reward-claim-btn:hover { background: rgba(212,164,76,0.22); }

.reward-claimed-check {
  font-size: var(--text-xs); color: var(--c-package);
  display: flex; align-items: center; gap: 4px;
}

/* Home: Next reward card */
.next-reward-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: var(--sp-3) var(--sp-4);
  margin-top: var(--sp-4); cursor: pointer;
  transition: background var(--t-fast);
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
}
.next-reward-card:hover { background: var(--surface-hover); }
.next-reward-label { font-size: var(--text-xs); color: var(--text-muted); margin-bottom: 2px; }
.next-reward-text { font-size: var(--text-sm); color: var(--text-secondary); }
.next-reward-progress { font-size: var(--text-xs); color: var(--c-gold); font-weight: 500; white-space: nowrap; }

/* Reward unlocked banner */
.reward-unlocked-banner {
  background: rgba(212,164,76,0.1); border: 1px solid rgba(212,164,76,0.25);
  border-radius: var(--r-lg); padding: var(--sp-3) var(--sp-4);
  margin-top: var(--sp-4); font-size: var(--text-sm); color: var(--c-gold);
  display: flex; align-items: center; gap: var(--sp-2);
}

/* ========================================
   FEATURE 10: PROGRESS VIEW
   ======================================== */
.progress-stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-3);
  margin-bottom: var(--sp-6);
}
.progress-stat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: var(--sp-3) var(--sp-4);
  text-align: center;
}
.progress-stat-value {
  font-size: 22px; font-weight: 600; color: var(--text-primary);
  line-height: 1.2; margin-bottom: 2px;
}
.progress-stat-label {
  font-size: var(--text-xs); color: var(--text-muted);
}

.chart-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: var(--sp-5);
  margin-bottom: var(--sp-4);
}
.chart-card-title {
  font-size: var(--text-sm); font-weight: 600; color: var(--text-secondary);
  margin-bottom: var(--sp-4); text-transform: uppercase;
  letter-spacing: 0.5px; font-size: var(--text-xs);
}
.chart-canvas-wrap {
  position: relative; width: 100%;
}

@media (max-width: 600px) {
  .progress-stats-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ========================================
   FEATURE 11: WEEKLY REVIEW MODAL
   ======================================== */
.review-modal-box {
  max-width: 500px; width: 92%; max-height: 90vh; overflow-y: auto;
  padding: var(--sp-6);
}

.review-step-indicator {
  display: flex; gap: var(--sp-2); margin-bottom: var(--sp-5);
}
.review-step-dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--border);
  transition: background var(--t-normal);
}
.review-step-dot.active { background: var(--c-gold); }
.review-step-dot.done { background: var(--c-package); }

.review-title {
  font-size: var(--text-md); font-weight: 600; color: var(--text-primary);
  margin-bottom: var(--sp-1);
}
.review-subtitle {
  font-size: var(--text-sm); color: var(--text-muted); margin-bottom: var(--sp-5);
}

.review-stats-row {
  display: flex; gap: var(--sp-3); margin-bottom: var(--sp-5); flex-wrap: wrap;
}
.review-stat {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: var(--sp-2) var(--sp-3);
  text-align: center; flex: 1;
}
.review-stat-val { font-size: 18px; font-weight: 600; color: var(--text-primary); }
.review-stat-lbl { font-size: var(--text-xs); color: var(--text-muted); }

.review-textarea {
  width: 100%; background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: var(--sp-3);
  font-family: var(--font); font-size: var(--text-sm); color: var(--text-primary);
  resize: vertical; min-height: 72px; outline: none; line-height: 1.5;
  margin-bottom: var(--sp-4);
}
.review-textarea:focus { border-color: var(--text-muted); }
.review-textarea::placeholder { color: var(--text-muted); }

.review-label {
  font-size: var(--text-xs); font-weight: 600; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.6px; margin-bottom: var(--sp-2);
  display: block;
}

.review-actions {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: var(--sp-4); padding-top: var(--sp-4);
  border-top: 1px solid var(--border);
}
.review-skip {
  font-size: var(--text-sm); color: var(--text-muted); cursor: pointer;
  background: none; border: none; font-family: var(--font);
}
.review-skip:hover { color: var(--text-secondary); }

.review-done-card {
  text-align: center; padding: var(--sp-6) var(--sp-4);
}
.review-done-pts {
  font-size: 32px; font-weight: 600; color: var(--c-gold);
  margin-bottom: var(--sp-2);
}
.review-done-msg {
  font-size: var(--text-sm); color: var(--text-secondary); margin-bottom: var(--sp-5);
}

/* Home: review done badge */
.review-done-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: var(--text-xs); color: var(--c-package);
  background: rgba(125,184,138,0.1); border: 1px solid rgba(125,184,138,0.2);
  border-radius: var(--r-sm); padding: 2px 8px;
  margin-top: var(--sp-3);
}

/* ========================================
   FEATURE 12: EXPORT/IMPORT
   ======================================== */
.data-actions-row {
  display: flex; gap: var(--sp-2); flex-wrap: wrap; margin-top: var(--sp-2);
}
.btn-data {
  flex: 1; min-width: 80px; font-size: var(--text-xs); padding: var(--sp-2) var(--sp-3);
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-md);
  color: var(--text-secondary); cursor: pointer; font-family: var(--font);
  font-weight: 500; transition: background var(--t-fast), color var(--t-fast);
  text-align: center;
}
.btn-data:hover { background: var(--surface-hover); color: var(--text-primary); border-color: var(--text-muted); }
.btn-data.success { color: var(--c-package); border-color: rgba(125,184,138,0.3); }

.import-file-input { display: none; }

/* ========================================
   THEME SYSTEM
   ======================================== */

/* ============================================================
   THEME PALETTES (Round 5 Task 13)
   8 popular, designer-tested schemes. Each block notes WCAG AA
   contrast against bg/surface for the three text tokens.
   ============================================================ */

/* -- Tokyo Night (dark purple/blue) --
   AA vs --bg #1a1b26: text-primary #c0caf5 ~ 11.6:1, text-secondary #a9b1d6 ~ 9.0:1,
   text-muted #7aa2f7 ~ 5.1:1. */
[data-theme="tokyo-night"] {
  --bg: #1a1b26;
  --surface: #24283b;
  --surface-hover: #2f3549;
  --border: #3b4261;
  --text-primary: #c0caf5;
  --text-secondary: #a9b1d6;
  --text-muted: #7aa2f7;
  --accent: #bb9af7;
  --c-gold: #e0af68;
}

/* -- Catppuccin Mocha (warm dark) --
   AA vs --bg #1e1e2e: text-primary #cdd6f4 ~ 12.1:1, text-secondary #bac2de ~ 9.7:1,
   text-muted #a6adc8 ~ 7.3:1. */
[data-theme="catppuccin-mocha"] {
  --bg: #1e1e2e;
  --surface: #313244;
  --surface-hover: #45475a;
  --border: #45475a;
  --text-primary: #cdd6f4;
  --text-secondary: #bac2de;
  --text-muted: #a6adc8;
  --accent: #f5c2e7;
  --c-gold: #f9e2af;
}

/* -- Nord (cool blue-gray arctic) --
   AA vs --bg #2e3440: text-primary #eceff4 ~ 12.8:1, text-secondary #d8dee9 ~ 10.7:1,
   text-muted #88c0d0 ~ 6.6:1. */
[data-theme="nord"] {
  --bg: #2e3440;
  --surface: #3b4252;
  --surface-hover: #434c5e;
  --border: #4c566a;
  --text-primary: #eceff4;
  --text-secondary: #d8dee9;
  --text-muted: #88c0d0;
  --accent: #88c0d0;
  --c-gold: #ebcb8b;
}

/* -- Gruvbox Dark (retro warm) --
   AA vs --bg #282828: text-primary #ebdbb2 ~ 11.9:1, text-secondary #d5c4a1 ~ 9.6:1,
   text-muted #bdae93 ~ 7.2:1. */
[data-theme="gruvbox-dark"] {
  --bg: #282828;
  --surface: #32302f;
  --surface-hover: #3c3836;
  --border: #504945;
  --text-primary: #ebdbb2;
  --text-secondary: #d5c4a1;
  --text-muted: #bdae93;
  --accent: #fabd2f;
  --c-gold: #fabd2f;
}

/* -- Catppuccin Latte (warm light) --
   AA vs --bg #eff1f5: text-primary #4c4f69 ~ 8.4:1, text-secondary #5c5f77 ~ 6.7:1,
   text-muted #6c6f85 ~ 5.4:1. */
[data-theme="catppuccin-latte"] {
  --bg: #eff1f5;
  --surface: #e6e9ef;
  --surface-hover: #dce0e8;
  --border: #bcc0cc;
  --text-primary: #4c4f69;
  --text-secondary: #5c5f77;
  --text-muted: #6c6f85;
  --accent: #8839ef;
  --c-gold: #8839ef;
}

/* -- Solarized Light (Ethan Schoonover) --
   AA vs --bg #fdf6e3: text-primary #073642 ~ 15.3:1, text-secondary #586e75 ~ 7.0:1,
   text-muted #657b83 ~ 5.5:1. */
[data-theme="solarized-light"] {
  --bg: #fdf6e3;
  --surface: #eee8d5;
  --surface-hover: #e5deca;
  --border: #93a1a1;
  --text-primary: #073642;
  --text-secondary: #586e75;
  --text-muted: #657b83;
  --accent: #268bd2;
  --c-gold: #b58900;
}

/* -- Rosé Pine Dawn (soft warm light) --
   AA vs --bg #faf4ed: text-primary #575279 ~ 6.7:1, text-secondary #797593 ~ 4.7:1,
   text-muted #9893a5 ~ 3.3:1 (decorative only). */
[data-theme="rose-pine-dawn"] {
  --bg: #faf4ed;
  --surface: #fffaf3;
  --surface-hover: #f2e9e1;
  --border: #cecacd;
  --text-primary: #575279;
  --text-secondary: #797593;
  --text-muted: #9893a5;
  --accent: #b4637a;
  --c-gold: #d7827e;
}

/* -- Gruvbox Light (retro warm light) --
   AA vs --bg #fbf1c7: text-primary #3c3836 ~ 11.5:1, text-secondary #504945 ~ 8.0:1,
   text-muted #665c54 ~ 5.7:1. */
[data-theme="gruvbox-light"] {
  --bg: #fbf1c7;
  --surface: #f2e5bc;
  --surface-hover: #ebdbb2;
  --border: #d5c4a1;
  --text-primary: #3c3836;
  --text-secondary: #504945;
  --text-muted: #665c54;
  --accent: #b57614;
  --c-gold: #b57614;
}

/* -- Remote Lime (Framer 'Remote' template: warm cream + electric lime accent) --
   AA vs --bg #f4f1ec: text-primary #121212 ~ 18.5:1, text-secondary #3d3d3d ~ 10.3:1,
   text-muted #6b6b6b ~ 5.1:1. Accent lime is decorative only; accent text uses ink. */
[data-theme="remote-lime"] {
  --bg: #f4f1ec;
  --surface: #fffdf8;
  --surface-hover: #eae7e0;
  --border: #d9d5cc;
  --text-primary: #121212;
  --text-secondary: #3d3d3d;
  --text-muted: #6b6b6b;
  --accent: #121212;
  --c-gold: #8a6a1c;
}
/* Keep the signature lime visible on primary CTAs without hurting contrast:
   button background is lime, label is deep ink (contrast ~15:1 vs #c6ee5c). */
[data-theme="remote-lime"] .btn-primary {
  background: #c6ee5c;
  border-color: #b6dd4a;
  color: #121212;
}
[data-theme="remote-lime"] .btn-primary:hover {
  background: #b6dd4a;
  border-color: #a6cd3a;
  color: #121212;
}
/* Lime-tinted surface for the 'done' message to echo the template's section blocks. */
[data-theme="remote-lime"] .done-msg {
  background: rgba(198, 238, 92, 0.22);
  border-color: rgba(182, 221, 74, 0.45);
}

/* --- Remote Lime: make the lime the hero (like the Framer template) --- */
/* The hero 'Start next block' gets inline background:${projectColor} from JS.
   Override it with the signature lime and force ink text, matching the template's
   yellow-green headline frame. !important is required to beat the inline style. */
[data-theme="remote-lime"] .start-block-btn-calm,
[data-theme="remote-lime"] .start-block-btn {
  background: #c6ee5c !important;
  color: #121212 !important;
  border: 1px solid #b6dd4a;
}
[data-theme="remote-lime"] .start-block-btn-calm:hover,
[data-theme="remote-lime"] .start-block-btn:hover {
  background: #b6dd4a !important;
}
[data-theme="remote-lime"] .start-block-btn-calm .btn-label-sm,
[data-theme="remote-lime"] .start-block-btn .btn-label-sm {
  color: #121212; opacity: 0.65;
}

/* Planned-today rows: lime left-accent stripe + crisp ink text, mirroring the
   template's bordered cards. Keeps the per-project dot as the secondary marker. */
[data-theme="remote-lime"] .planned-row-calm {
  background: #fffdf8;
  border: 1px solid #d9d5cc;
  border-left: 4px solid #c6ee5c;
}
[data-theme="remote-lime"] .planned-row-calm .planned-row-title-calm {
  color: #121212;
}

/* 'This week' summary card: soft lime surface so the week plan pops like the
   template's pale-lime section blocks. */
[data-theme="remote-lime"] .week-summary-card,
[data-theme="remote-lime"] .week-plan-panel,
[data-theme="remote-lime"] .week-plan-summary {
  background: #eaf5c1;
  border-color: #cfe28a;
}

/* Week-dots and block-circles: lime fill + ink border when active, like the
   template's highlight chips. */
[data-theme="remote-lime"] .block-circle.filled { background: #c6ee5c; }
[data-theme="remote-lime"] .block-circle.bonus { background: #8a6a1c; }

/* 'Plan my week with AI' CTA: lime-tinted so it reads as an action, not chrome. */
[data-theme="remote-lime"] .plan-week-btn {
  background: #eaf5c1;
  border: 1px solid #cfe28a;
  border-style: solid;
  color: #121212;
}
[data-theme="remote-lime"] .plan-week-btn:hover {
  background: #dfee9a;
  border-color: #b6dd4a;
  color: #121212;
}

/* Active tab indicator in the side nav gets the lime accent. */
[data-theme="remote-lime"] .nav-item.active,
[data-theme="remote-lime"] .tab-active {
  color: #121212;
}
[data-theme="remote-lime"] .nav-item.active::before,
[data-theme="remote-lime"] .nav-item.active::after {
  background: #c6ee5c;
}

/* ============================================================
   Remote Lime — Candy Land path, Focus view, and step drawer
   Consistent lime accent while preserving per-project color dots.
   ============================================================ */

/* --- Candy Land path nodes --- */
/* Active milestone/step: lime ring + lime-tinted surface (replaces the per-track
   colored glow). The project-color dot in the title still shows track identity. */
[data-theme="remote-lime"] .candy-node--active {
  border-color: #b6dd4a;
  background: #f6fce0;
  box-shadow: 0 0 0 2px rgba(198, 238, 92, 0.55), var(--shadow-subtle);
}
[data-theme="remote-lime"] .candy-node--active .candy-icon {
  background: #c6ee5c;
  border-color: #b6dd4a;
  color: #121212;
}
/* Done milestone/step: solid lime gradient + deep-ink glyph, like the template's
   highlight section blocks. */
[data-theme="remote-lime"] .candy-node--done {
  background: linear-gradient(135deg, #eaf5c1 0%, #c6ee5c 100%);
  border-color: #b6dd4a;
}
[data-theme="remote-lime"] .candy-node--done .candy-icon {
  background: #c6ee5c;
  border-color: #a6cd3a;
  color: #121212;
}
[data-theme="remote-lime"] .candy-node--done .candy-title,
[data-theme="remote-lime"] .candy-node--done .candy-sub {
  color: #121212;
}
[data-theme="remote-lime"] .candy-trophy {
  color: #121212;
  filter: drop-shadow(0 0 3px rgba(198, 238, 92, 0.6));
}
/* Connectors between nodes: lime when the segment is complete. */
[data-theme="remote-lime"] .candy-path-connector--done {
  background-image: linear-gradient(#c6ee5c 100%, transparent 0);
}
/* Hover border on any node uses lime instead of the per-track accent, so the
   feedback stays visually consistent across projects. */
[data-theme="remote-lime"] .candy-node:hover {
  border-color: #b6dd4a;
}

/* --- Focus view: timer + workflow checklist --- */
/* Timer ring progress stroke: lime, matching the hero CTA. */
[data-theme="remote-lime"] .timer-ring .ring-fill {
  stroke: #c6ee5c;
}
[data-theme="remote-lime"] .timer-ring .ring-bg {
  stroke: #d9d5cc;
}
[data-theme="remote-lime"] .timer-time {
  color: #121212;
}
/* Focus-done message: lime wash instead of the default green tint. */
[data-theme="remote-lime"] .focus-done-msg {
  background: rgba(198, 238, 92, 0.22);
  border-color: rgba(182, 221, 74, 0.45);
  color: #121212;
}
/* Current step in the workflow checklist: lime left-accent stripe. */
[data-theme="remote-lime"] .focus-workflow-step.current {
  background: #f6fce0;
  border-color: #b6dd4a;
  border-left: 4px solid #c6ee5c;
}
[data-theme="remote-lime"] .focus-workflow-step.done {
  opacity: 0.55;
}
/* Floating timer pill: lime glyph + subtle lime ring on hover. */
[data-theme="remote-lime"] .timer-pill {
  --pill-color: #8fb81a;
}
/* Project picker: selected card gets a lime left-accent. */
[data-theme="remote-lime"] .focus-proj-toggle.selected {
  background: #f6fce0;
  border-color: #b6dd4a;
  border-left: 4px solid #c6ee5c;
}

/* --- Step drawer --- */
/* Checked checkbox: lime fill with deep-ink check, so completion reads instantly. */
[data-theme="remote-lime"] .drawer-cb:checked {
  background: #c6ee5c;
  border-color: #b6dd4a;
}
[data-theme="remote-lime"] .drawer-cb:checked::after {
  border-color: #121212;
}
/* Textarea focus ring in lime for continuity with other focused states. */
[data-theme="remote-lime"] .drawer-notes:focus {
  border-color: #b6dd4a;
  box-shadow: 0 0 0 3px rgba(198, 238, 92, 0.25);
}
/* Section title: small lime underline to echo the template's text-highlight move. */
[data-theme="remote-lime"] .drawer-section-title {
  color: #121212;
  padding-bottom: 4px;
  border-bottom: 2px solid #c6ee5c;
  display: inline-block;
}

/* Light theme shared tweaks */
[data-theme="catppuccin-latte"] .btn-primary,
[data-theme="solarized-light"] .btn-primary,
[data-theme="rose-pine-dawn"] .btn-primary,
[data-theme="gruvbox-light"] .btn-primary { color: #fff; }
[data-theme="catppuccin-latte"] .card,
[data-theme="solarized-light"] .card,
[data-theme="rose-pine-dawn"] .card,
[data-theme="gruvbox-light"] .card,
[data-theme="remote-lime"] .card { box-shadow: none; }
[data-theme="catppuccin-latte"] .setting-input,
[data-theme="solarized-light"] .setting-input,
[data-theme="rose-pine-dawn"] .setting-input,
[data-theme="gruvbox-light"] .setting-input,
[data-theme="remote-lime"] .setting-input {
  background: var(--surface); border-color: var(--border); color: var(--text-primary);
}
[data-theme="catppuccin-latte"] .btn-data,
[data-theme="solarized-light"] .btn-data,
[data-theme="rose-pine-dawn"] .btn-data,
[data-theme="gruvbox-light"] .btn-data,
[data-theme="remote-lime"] .btn-data {
  background: var(--surface); border-color: var(--border); color: var(--text-secondary);
}
[data-theme="catppuccin-latte"] .no-plan-msg,
[data-theme="solarized-light"] .no-plan-msg,
[data-theme="rose-pine-dawn"] .no-plan-msg,
[data-theme="gruvbox-light"] .no-plan-msg,
[data-theme="remote-lime"] .no-plan-msg { background: var(--surface); }
[data-theme="catppuccin-latte"] .done-msg,
[data-theme="solarized-light"] .done-msg,
[data-theme="rose-pine-dawn"] .done-msg,
[data-theme="gruvbox-light"] .done-msg { background: rgba(125,184,138,0.1); border-color: rgba(125,184,138,0.2); }

/* ========================================
   PLAN MY WEEK BUTTON
   ======================================== */
.plan-week-btn {
  display: flex; align-items: center; gap: var(--sp-2); width: 100%;
  margin-top: var(--sp-4); padding: var(--sp-3) var(--sp-4);
  font-family: var(--font); font-size: var(--text-sm); font-weight: 500;
  color: var(--text-secondary); background: var(--surface);
  border: 1px dashed var(--border); border-radius: var(--r-lg);
  cursor: pointer; transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
  justify-content: center;
}
.plan-week-btn:hover {
  background: var(--surface-hover); color: var(--text-primary);
  border-color: var(--text-muted);
}
.plan-week-btn.copied {
  background: rgba(125,184,138,0.1); border-color: rgba(125,184,138,0.3);
  color: var(--c-package); border-style: solid;
}

/* ========================================
   DOCS VIEW
   ======================================== */
.docs-filter {
  display: flex; gap: var(--sp-2); flex-wrap: wrap; margin-bottom: var(--sp-5);
}
.doc-filter-btn {
  font-family: var(--font); font-size: var(--text-xs); font-weight: 500;
  padding: var(--sp-1) var(--sp-3); border-radius: var(--r-md);
  border: 1px solid var(--border); background: transparent;
  color: var(--text-muted); cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.doc-filter-btn:hover { color: var(--text-secondary); border-color: var(--text-muted); }
.doc-filter-btn.active {
  background: rgba(255,255,255,0.06); color: var(--text-primary);
  border-color: var(--text-muted);
}
[data-theme="catppuccin-latte"] .doc-filter-btn.active,
[data-theme="solarized-light"] .doc-filter-btn.active,
[data-theme="rose-pine-dawn"] .doc-filter-btn.active,
[data-theme="gruvbox-light"] .doc-filter-btn.active,
[data-theme="remote-lime"] .doc-filter-btn.active {
  background: rgba(0,0,0,0.06);
}

.docs-grid {
  display: flex; flex-direction: column; gap: var(--sp-2);
}
.doc-card {
  display: flex; gap: var(--sp-3); padding: var(--sp-3) var(--sp-4);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); cursor: pointer; text-decoration: none; color: inherit;
  transition: background var(--t-fast);
}
.doc-card:hover { background: var(--surface-hover); }
.doc-card-icon {
  flex-shrink: 0; width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); background: rgba(255,255,255,0.04);
  border-radius: var(--r-md);
}
[data-theme="catppuccin-latte"] .doc-card-icon,
[data-theme="solarized-light"] .doc-card-icon,
[data-theme="rose-pine-dawn"] .doc-card-icon,
[data-theme="gruvbox-light"] .doc-card-icon,
[data-theme="remote-lime"] .doc-card-icon { background: rgba(0,0,0,0.04); }
.doc-card-body { flex: 1; min-width: 0; }
.doc-card-title {
  font-size: var(--text-sm); font-weight: 600; color: var(--text-primary);
  margin-bottom: 2px; display: flex; align-items: center; gap: var(--sp-2);
}
.doc-type-badge {
  font-size: 9px; font-weight: 600; text-transform: uppercase;
  padding: 1px 5px; border-radius: 3px;
  background: rgba(196,154,108,0.15); color: var(--c-dlpfc);
  letter-spacing: 0.3px;
}
.doc-card-desc {
  font-size: var(--text-xs); color: var(--text-secondary);
  line-height: 1.4; margin-bottom: var(--sp-1);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.doc-card-tags { display: flex; gap: 4px; flex-wrap: wrap; }
.doc-tag {
  font-size: 9px; font-weight: 500; padding: 1px 6px;
  border: 1px solid; border-radius: 3px;
  text-transform: uppercase; letter-spacing: 0.3px;
}

/* Theme picker styles (labels in-flow so they never overlap) */
.theme-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 14px 12px;
  padding-top: var(--sp-2);
}
.theme-swatch {
  border-radius: var(--r-lg);
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color var(--t-fast), transform var(--t-fast);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 8px 6px 10px;
  min-width: 0;
}
.theme-swatch:hover { transform: scale(1.04); }
.theme-swatch.active { border-color: var(--c-gold); }
.theme-swatch .swatch-inner {
  width: 56px; height: 56px; border-radius: 10px;
  display: flex; flex-direction: column; overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}
.theme-swatch .swatch-top { flex: 1; }
.theme-swatch .swatch-bot { flex: 1; }
.theme-swatch .swatch-label {
  position: static;
  transform: none;
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.25;
  max-width: 100%;
  word-break: break-word;
  overflow-wrap: anywhere;
  white-space: normal;
}
.theme-swatch.active .swatch-label { color: var(--text-primary); font-weight: 600; }

/* ============================================================
   TASK 1 — More drawer overflow list + drawer header
   ============================================================ */
.drawer-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--border);
}
.drawer-header h2 { font-size: var(--text-lg); font-weight: 600; color: var(--text-primary); margin: 0; }
.drawer-body { padding: var(--sp-4) var(--sp-5); overflow-y: auto; }
.btn-ghost {
  background: transparent; border: none; color: var(--text-secondary);
  font-size: 20px; width: 32px; height: 32px; cursor: pointer; border-radius: 8px;
}
.btn-ghost:hover { background: var(--surface-hover); color: var(--text-primary); }

.more-list { display: flex; flex-direction: column; gap: var(--sp-2); }
.more-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--sp-4);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  text-decoration: none; color: var(--text-primary);
  transition: background var(--t-fast), border-color var(--t-fast);
}
.more-row:hover { background: var(--surface-hover); border-color: var(--text-muted); }
.more-row-label { font-weight: 600; font-size: var(--text-base); }
.more-row-desc { font-size: var(--text-xs); color: var(--text-secondary); margin-top: 2px; }
.more-row-caret { color: var(--text-muted); }

/* ============================================================
   TASK 5 — Persistent timer pill (top-right, over all routes)
   ============================================================ */
.timer-pill {
  --pill-color: #c49a6c;
  position: fixed; top: 14px; right: 14px; z-index: 500;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  background: var(--surface); color: var(--text-primary);
  border: 1px solid var(--pill-color);
  border-radius: 999px;
  text-decoration: none; font-family: var(--font); font-size: 13px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.28), 0 0 0 2px color-mix(in srgb, var(--pill-color) 12%, transparent);
  cursor: pointer;
  transition: transform var(--t-fast), box-shadow var(--t-fast);
}
.timer-pill[hidden] { display: none !important; }
.timer-pill:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(0,0,0,0.32), 0 0 0 3px color-mix(in srgb, var(--pill-color) 18%, transparent); }
.timer-pill svg { color: var(--pill-color); flex: 0 0 16px; }
.timer-pill-text { display: flex; flex-direction: column; line-height: 1.1; }
.timer-pill-time { font-weight: 600; font-variant-numeric: tabular-nums; }
.timer-pill-label {
  font-size: 11px; color: var(--text-secondary);
  max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
@media (max-width: 600px) {
  .timer-pill { top: 10px; right: 10px; padding: 6px 10px; font-size: 12px; }
  .timer-pill-label { max-width: 110px; }
}

/* ============================================================
   TASK 2 — Project template card
   ============================================================ */
.template-card {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-4);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  margin-bottom: var(--sp-3); cursor: pointer;
  transition: background var(--t-fast), border-color var(--t-fast);
}
.template-card:hover { background: var(--surface-hover); border-color: var(--text-muted); }
.template-card-main { flex: 1; }
.template-card-title { font-weight: 600; color: var(--text-primary); font-size: var(--text-base); }
.template-card-desc { font-size: var(--text-xs); color: var(--text-secondary); margin-top: 2px; }
.template-card-cta { color: var(--text-secondary); font-size: var(--text-sm); font-weight: 500; }
.section-title-sub {
  font-size: var(--text-sm); text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-secondary); margin-bottom: var(--sp-2);
}

/* ============================================================
   TASK 3 — Project card progress bar
   ============================================================ */
.proj-progress-bar {
  grid-column: 1 / -1;
  height: 4px; width: 100%;
  background: var(--surface-hover); border-radius: 999px; overflow: hidden;
  margin-top: var(--sp-2);
}
.proj-progress-bar-fill { height: 100%; border-radius: 999px; transition: width 400ms ease; }

/* ============================================================
   TASK 7 — Planned blocks checklist (Home)
   ============================================================ */
.planned-blocks { margin: var(--sp-5) 0; }
.planned-blocks-header {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: var(--sp-3);
}
.planned-blocks-title {
  font-size: var(--text-sm); text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-secondary);
}
.planned-blocks-count {
  font-size: var(--text-xs); color: var(--text-muted); font-variant-numeric: tabular-nums;
}
.planned-blocks-empty {
  padding: var(--sp-4); background: var(--surface); border: 1px dashed var(--border);
  border-radius: var(--r-lg); color: var(--text-secondary); font-size: var(--text-sm);
}
.planned-blocks-empty a { color: var(--text-primary); text-decoration: underline; cursor: pointer; }
.planned-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: var(--sp-2); }
.planned-row {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
}
.planned-cb {
  width: 20px; height: 20px; accent-color: var(--c-package, #7db88a); cursor: pointer;
  flex: 0 0 auto;
}
.planned-row-main { flex: 1; min-width: 0; }
.planned-row-title {
  font-size: var(--text-base); color: var(--text-primary);
  font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.planned-row-meta {
  font-size: var(--text-xs); color: var(--text-secondary); margin-top: 2px;
}
.planned-row-track { font-weight: 600; }
.planned-row-bar {
  height: 3px; width: 100%; margin-top: 6px;
  background: var(--surface-hover); border-radius: 999px; overflow: hidden;
}
.planned-row-bar-fill { height: 100%; border-radius: 999px; transition: width 400ms ease; }
.planned-row-go {
  font-size: var(--text-xs); color: var(--text-secondary);
  padding: 4px 8px; border-radius: 6px; cursor: pointer; white-space: nowrap;
}
.planned-row-go:hover { background: var(--surface-hover); color: var(--text-primary); }

/* ============================================================
   TASK 6 — Focus view split layout + workflow chart
   ============================================================ */
.focus-view-split {
  display: flex; flex-direction: row; gap: var(--sp-5);
  align-items: flex-start; max-width: 1100px; margin: 0 auto; padding: var(--sp-5);
}
.focus-view-split .focus-main { flex: 1 1 420px; display: flex; flex-direction: column; align-items: center; min-width: 0; }
.focus-workflow {
  flex: 0 1 340px; max-height: calc(100vh - 120px);
  overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: var(--sp-4);
  position: sticky; top: var(--sp-5);
}
.focus-workflow-header { margin-bottom: var(--sp-3); }
.focus-workflow-title {
  font-size: var(--text-sm); font-weight: 600; color: var(--text-primary);
}
.focus-workflow-sub { font-size: var(--text-xs); color: var(--text-muted); margin-top: 2px; }
.focus-workflow-list { display: flex; flex-direction: column; gap: var(--sp-2); }
.focus-workflow-step {
  padding: var(--sp-3);
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-md);
  cursor: pointer; transition: background var(--t-fast), border-color var(--t-fast);
}
.focus-workflow-step:hover { background: var(--surface-hover); }
.focus-workflow-step.current {
  border-color: var(--text-primary);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--text-primary) 18%, transparent);
}
.focus-workflow-step.done { opacity: 0.55; }
.focus-workflow-step.active { border-color: var(--text-muted); }
.fw-step-head { display: flex; align-items: center; gap: var(--sp-2); margin-bottom: 4px; }
.fw-step-num {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 22px; padding: 0 6px; border-radius: 6px;
  font-size: 11px; font-weight: 700;
  background: var(--surface-hover); color: var(--text-secondary);
}
.fw-step-title {
  flex: 1; font-size: var(--text-xs); color: var(--text-primary);
  line-height: 1.3;
}
.fw-step-dots { display: flex; gap: 3px; margin-top: 4px; }
.fw-step-meta { font-size: 10px; color: var(--text-muted); margin-top: 4px; }
.fw-qc-label {
  margin-top: var(--sp-3); padding-top: var(--sp-2);
  border-top: 1px solid var(--border);
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em;
  color: #d4a44c; font-weight: 600;
}
.qc-num { background: rgba(212,164,76,0.18) !important; color: #d4a44c !important; }
.focus-workflow-step.qc { border-color: rgba(212,164,76,0.3); }
@media (max-width: 900px) {
  .focus-view-split { flex-direction: column; }
  .focus-workflow { flex: 1 1 auto; max-height: none; position: static; width: 100%; }
}

/* ============================================================
   TASK 10 — QC step styling on path view
   ============================================================ */
.qc-section {
  margin: var(--sp-4) 0;
  padding: var(--sp-3);
  border: 1px solid rgba(212,164,76,0.35); border-radius: var(--r-lg);
  background: color-mix(in srgb, #d4a44c 6%, transparent);
}
.qc-section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: var(--sp-3);
}
.qc-section-title { font-size: var(--text-sm); font-weight: 600; color: var(--text-primary); }
.qc-section-count { font-size: var(--text-xs); color: #d4a44c; font-variant-numeric: tabular-nums; font-weight: 600; }
.qc-step { border-left: 3px solid #d4a44c; }
.qc-step-num { color: #d4a44c !important; }
.qc-check {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--text-xs); color: var(--text-secondary); cursor: pointer;
  margin-left: auto;
}
.qc-check input { accent-color: #d4a44c; width: 16px; height: 16px; }
.gate-card.gate-passed {
  border-color: rgba(125,184,138,0.4);
  background: rgba(125,184,138,0.06);
}
.gate-card.gate-passed h4 { color: var(--c-package, #7db88a); }

/* ============================================================
   TASK 9 — Richer progress visuals
   ============================================================ */
/* Bigger, greener done check */
.done-check {
  color: #7db88a; transform: scale(1.35); transform-origin: center; display: inline-flex;
  filter: drop-shadow(0 0 4px rgba(125,184,138,0.55));
}

/* Block dot: gradient fill + current glow */
.step-block-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: transparent; border: 1px solid var(--text-muted);
  position: relative;
  transition: background 200ms ease, transform 200ms ease, box-shadow 200ms ease;
}
.step-block-dot.filled {
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--text-secondary) 80%, white 10%) 0%,
    var(--text-secondary) 100%);
  border-color: transparent;
  box-shadow: 0 0 6px rgba(125,184,138,0.35);
}
.step-block-dot.current {
  border-color: var(--text-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--text-primary) 20%, transparent);
}

/* Home block circles — gradient fill + bonus shimmer */
.block-circle.filled {
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--text-secondary) 70%, white 15%) 0%,
    var(--text-secondary) 100%);
  border-color: transparent;
  box-shadow: 0 0 8px rgba(255,255,255,0.06);
}
.block-circle.bonus {
  background: linear-gradient(135deg, #e6c075, #b8922c);
  box-shadow: 0 0 10px rgba(212,164,76,0.45);
}

/* Step card status enhancements */
.path-step.status-done {
  position: relative;
  background: linear-gradient(135deg,
    var(--surface) 0%,
    color-mix(in srgb, #7db88a 7%, var(--surface)) 100%);
}
.path-step.status-done::after {
  content: ""; position: absolute; inset: 0;
  border-radius: inherit; pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(125,184,138,0.25);
}
.path-step.status-active {
  position: relative;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--step-accent, var(--text-muted)) 25%, transparent);
  animation: step-pulse 2.4s ease-in-out infinite;
}
@keyframes step-pulse {
  0%, 100% { box-shadow: 0 0 0 2px color-mix(in srgb, var(--step-accent, var(--text-muted)) 18%, transparent); }
  50%      { box-shadow: 0 0 0 3px color-mix(in srgb, var(--step-accent, var(--text-muted)) 36%, transparent); }
}
.path-step.status-locked {
  background-image: repeating-linear-gradient(
    45deg,
    transparent, transparent 6px,
    color-mix(in srgb, var(--text-muted) 12%, transparent) 6px,
    color-mix(in srgb, var(--text-muted) 12%, transparent) 12px);
}

/* Milestone cards — trophy + gold ring when done */
.milestone-card.status-done {
  opacity: 1;
  position: relative;
  border-color: rgba(212,164,76,0.5);
  background: linear-gradient(135deg,
    var(--surface) 0%,
    color-mix(in srgb, #d4a44c 8%, var(--surface)) 100%);
}
.milestone-card.status-done::before {
  content: "🏆";
  position: absolute; top: 8px; right: 10px; font-size: 16px;
  filter: drop-shadow(0 0 4px rgba(212,164,76,0.55));
}

/* ============================================================
   TASK 8 — Focus, hover, and button AA touch-ups
   ============================================================ */
:focus-visible {
  outline: 2px solid var(--text-primary);
  outline-offset: 2px;
  border-radius: 6px;
}
[data-theme="catppuccin-latte"] .btn-outline:hover,
[data-theme="solarized-light"] .btn-outline:hover,
[data-theme="rose-pine-dawn"] .btn-outline:hover,
[data-theme="gruvbox-light"] .btn-outline:hover,
[data-theme="remote-lime"] .btn-outline:hover {
  background: var(--surface-hover); border-color: var(--text-secondary); color: var(--text-primary);
}
/* Ensure QC-gold badges still reach AA in light themes */
[data-theme="catppuccin-latte"] .qc-section-count,
[data-theme="solarized-light"] .qc-section-count,
[data-theme="rose-pine-dawn"] .qc-section-count,
[data-theme="gruvbox-light"] .qc-section-count,
[data-theme="remote-lime"] .qc-section-count,
[data-theme="catppuccin-latte"] .fw-qc-label,
[data-theme="solarized-light"] .fw-qc-label,
[data-theme="rose-pine-dawn"] .fw-qc-label,
[data-theme="gruvbox-light"] .fw-qc-label,
[data-theme="remote-lime"] .fw-qc-label { color: #8a6a1c; }

/* ============================================================
   ROUND 2 — Candy Land path nodes (shared by Projects & Path views)
   ============================================================ */

/* Subtle shadow token (fallback if not defined elsewhere) */
:root { --shadow-subtle: 0 2px 8px rgba(0,0,0,0.25); }
[data-theme="catppuccin-latte"],
[data-theme="solarized-light"],
[data-theme="rose-pine-dawn"],
[data-theme="gruvbox-light"],
[data-theme="remote-lime"] { --shadow-subtle: 0 2px 10px rgba(30,30,40,0.10); }

.candy-path {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-3);
  position: relative;
}

.candy-row {
  display: flex;
  width: 100%;
}
.candy-row--left  { justify-content: flex-start; }
.candy-row--right { justify-content: flex-end; }

.candy-node {
  --node-accent: var(--track-accent, var(--text-secondary));
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  width: min(100%, 420px);
  padding: var(--sp-4) var(--sp-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-subtle);
  cursor: pointer;
  transition: transform var(--t-fast), border-color var(--t-fast), background var(--t-fast), box-shadow var(--t-fast);
}
.candy-node:hover {
  background: var(--surface-hover);
  border-color: var(--node-accent);
  transform: translateY(-1px);
}

.candy-icon {
  flex: 0 0 auto;
  width: 38px; height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: color-mix(in srgb, var(--node-accent) 14%, var(--surface));
  color: var(--node-accent);
  border: 1px solid color-mix(in srgb, var(--node-accent) 30%, var(--border));
}
.candy-icon svg { display: block; }

.candy-body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}
.candy-title {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  flex-wrap: wrap;
}
.candy-title-text { display: inline-block; }
.candy-sub {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}
.candy-step-num {
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.candy-step-meta {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-wrap: wrap;
  margin-top: var(--sp-1);
}

.candy-due-row {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-wrap: wrap;
  margin-top: var(--sp-1);
}
.candy-due-input {
  background: var(--bg);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 2px 6px;
  font-size: var(--text-xs);
}

.candy-urgency {
  flex: 0 0 auto;
  align-self: flex-start;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 3px 8px;
  color: var(--text-muted);
  cursor: pointer;
  font-size: var(--text-xs);
  transition: border-color var(--t-fast), color var(--t-fast);
}
.candy-urgency:hover { border-color: var(--text-secondary); color: var(--text-secondary); }
.candy-urgency .u-critical { color: var(--c-bd2); }
.candy-urgency .u-important { color: var(--node-accent); }
.candy-urgency .u-flag { color: var(--text-muted); }

.candy-trophy {
  position: absolute;
  right: 10px;
  bottom: 8px;
  width: 18px; height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--c-gold);
  filter: drop-shadow(0 0 3px color-mix(in srgb, var(--c-gold) 50%, transparent));
}

/* Variants */
.candy-node--active {
  border-color: var(--node-accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--node-accent) 28%, transparent), var(--shadow-subtle);
  animation: step-pulse 2.8s ease-in-out infinite;
}

.candy-node--done {
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--c-gold) 18%, var(--surface)) 0%,
    color-mix(in srgb, var(--node-accent) 16%, var(--surface)) 100%);
  border-color: color-mix(in srgb, var(--c-gold) 40%, var(--border));
}
.candy-node--done .candy-title { color: var(--text-primary); }
.candy-node--done .candy-icon {
  background: color-mix(in srgb, var(--c-gold) 22%, var(--surface));
  border-color: color-mix(in srgb, var(--c-gold) 50%, var(--border));
  color: var(--c-gold);
}

.candy-node--locked {
  filter: saturate(0.4) brightness(0.92);
  opacity: 0.6;
  cursor: not-allowed;
}
.candy-node--locked:hover { transform: none; background: var(--surface); border-color: var(--border); }

.candy-node--qc .candy-icon {
  color: var(--c-gold);
  background: color-mix(in srgb, var(--c-gold) 14%, var(--surface));
  border-color: color-mix(in srgb, var(--c-gold) 30%, var(--border));
}
.candy-node--qc {
  border-color: color-mix(in srgb, var(--c-gold) 30%, var(--border));
}

/* Connectors between candy nodes — vertical dashed line, alternating soft curve via margin */
.candy-path-connector {
  height: 20px;
  width: 2px;
  margin: 0 auto;
  background-image: linear-gradient(var(--border) 60%, transparent 0);
  background-size: 2px 8px;
  background-repeat: repeat-y;
  opacity: 0.8;
}
.candy-path-connector--done {
  background-image: linear-gradient(var(--c-gold) 100%, transparent 0);
  width: 3px;
  opacity: 0.85;
}
.candy-path-connector--locked {
  opacity: 0.35;
}
/* Soft S-curve offset: connectors that go from left->right or right->left nudge slightly */
.candy-conn-left-to-right  { margin-left: 25%; margin-right: auto; }
.candy-conn-right-to-left  { margin-right: 25%; margin-left: auto; }
.candy-conn-left-to-left   { margin-left: 12%; margin-right: auto; }
.candy-conn-right-to-right { margin-right: 12%; margin-left: auto; }

/* Step variant tweaks */
.candy-node--step .candy-title { font-size: var(--text-base); }
.candy-node--step .step-block-dots { display: inline-flex; gap: 4px; }
.candy-node--step .done-check { color: var(--c-gold); display: inline-flex; align-items: center; }

/* Mobile: single column, vertical dotted connector */
@media (max-width: 640px) {
  .candy-row--left, .candy-row--right { justify-content: stretch; }
  .candy-node { width: 100%; padding: var(--sp-3) var(--sp-4); border-radius: 16px; }
  .candy-path-connector { margin-left: auto !important; margin-right: auto !important; }
  .candy-conn-left-to-right,
  .candy-conn-right-to-left,
  .candy-conn-left-to-left,
  .candy-conn-right-to-right { margin-left: auto; margin-right: auto; }
}

/* ============================================================
   ROUND 2 — Home planned block rows (per Task B)
   ============================================================ */
.planned-row-sub {
  display: block;
  font-size: var(--text-sm);
  color: var(--text-primary);
  margin-top: 2px;
  line-height: 1.35;
}
.planned-row-sub-muted {
  display: block;
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: 2px;
}
.planned-row-actions {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  margin-left: var(--sp-2);
}
.planned-row-details,
.planned-row-go {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  border-radius: var(--r-md);
  padding: 4px 10px;
  font-size: var(--text-xs);
  cursor: pointer;
  transition: border-color var(--t-fast), color var(--t-fast), background var(--t-fast);
}
.planned-row-details:hover,
.planned-row-go:hover {
  border-color: var(--text-secondary);
  color: var(--text-primary);
  background: var(--surface-hover);
}
.planned-row-go {
  border-color: color-mix(in srgb, var(--c-gold) 40%, var(--border));
  color: var(--c-gold);
}
.planned-row-go:hover {
  background: color-mix(in srgb, var(--c-gold) 14%, var(--surface));
  color: var(--c-gold);
}
.planned-row-complete {
  color: var(--text-secondary);
  font-style: normal;
}
.planned-cb-disabled {
  display: inline-block;
  width: 16px; height: 16px;
  border: 1px dashed var(--border);
  border-radius: 4px;
  opacity: 0.5;
}

/* Home hero "Start next block v2" */
.start-block-btn-v2 {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: var(--sp-3) var(--sp-5);
  text-align: left;
}
.start-block-btn-v2 .btn-label-sm {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.85;
}
.start-block-substep {
  font-size: var(--text-base);
  font-weight: 600;
  line-height: 1.3;
}
.start-block-context {
  font-size: var(--text-xs);
  opacity: 0.8;
}

/* Focus step description under H2 */
.focus-step-desc {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-top: 2px;
  margin-bottom: var(--sp-3);
  max-width: 520px;
  line-height: 1.45;
}

/* ============================================================
   ROUND 3 — Archive / Activate buttons on project cards
   ============================================================ */
.project-card { position: relative; }
.proj-archive-btn {
  font-family: var(--font); font-size: var(--text-xs); font-weight: 500;
  padding: 4px 10px; border-radius: var(--r-md);
  background: transparent; border: 1px solid var(--border);
  color: var(--text-muted); cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
  margin-left: var(--sp-2); white-space: nowrap;
}
.proj-archive-btn:hover {
  background: var(--surface-hover); color: var(--text-primary);
  border-color: var(--text-muted);
}
.proj-activate-btn {
  color: var(--text-secondary); border-color: var(--text-muted);
}
.proj-activate-btn:hover {
  color: var(--text-primary); border-color: var(--text-primary);
  background: var(--surface-hover);
}
.project-card-archived { opacity: 0.6; }
.project-card-archived:hover { opacity: 0.85; }

/* ============================================================
   ROUND 3 — Planned-row block dots (Home)
   ============================================================ */
.planned-row-dots {
  display: flex; align-items: center; gap: 4px;
  flex-shrink: 0;
  padding: 4px 2px;
}
.planned-row-dots .step-block-dot {
  width: 14px; height: 14px;
}
/* 30px minimum tap target via a transparent button wrapper */
.block-dot-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; min-width: 30px;
  padding: 0; background: transparent; border: none; cursor: pointer;
  border-radius: var(--r-md);
  transition: background var(--t-fast);
}
.block-dot-btn:hover { background: var(--surface-hover); }
.block-dot-btn:focus-visible { outline: 2px solid var(--text-secondary); outline-offset: 2px; }
.block-dot-btn .step-block-dot { pointer-events: none; }

/* Hero block-dots on START NEXT BLOCK button */
.start-block-dots {
  display: flex; gap: 4px; margin-top: 6px;
  align-items: center; justify-content: center;
}
.start-block-dots .step-block-dot { width: 10px; height: 10px; }

/* Focus page block-dots */
.focus-block-dots {
  display: flex; gap: 6px; justify-content: center;
  margin: var(--sp-2) 0 var(--sp-1);
}
.focus-block-dots .step-block-dot { width: 12px; height: 12px; }
.focus-block-caption {
  font-size: var(--text-xs); color: var(--text-muted);
  text-align: center; margin-top: 2px;
}

/* ============================================================
   ROUND 3 — Plan-week "?" help popover
   ============================================================ */
.plan-week-wrap { position: relative; }
.plan-week-help {
  position: absolute; top: 50%; right: var(--sp-3);
  transform: translateY(-50%);
  width: 22px; height: 22px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font); font-size: var(--text-xs); font-weight: 600;
  background: transparent; border: 1px solid var(--text-muted);
  color: var(--text-muted); cursor: pointer; padding: 0;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
  z-index: 2;
}
.plan-week-help:hover {
  color: var(--text-primary); border-color: var(--text-primary);
  background: var(--surface-hover);
}
.plan-week-popover {
  position: absolute; right: 0; top: calc(100% + 6px);
  width: min(320px, 92vw);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: var(--sp-3) var(--sp-4);
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
  z-index: 10;
  font-size: var(--text-sm); color: var(--text-secondary);
  line-height: 1.5;
}
.plan-week-popover[hidden] { display: none; }
.plan-week-popover ol {
  margin: 0; padding-left: 1.25em;
  display: flex; flex-direction: column; gap: 6px;
}
.plan-week-popover li { color: var(--text-secondary); }

/* ------------------------------------------------------------------ */
/* Round 4 — Weekly plan panel on Home                                 */
/* Per-project block allocation with +/- steppers, live totals, and a  */
/* progress bar showing done vs. planned blocks for this week.         */
/* ------------------------------------------------------------------ */
.week-plan-panel {
  margin: var(--sp-4) 0;
  padding: var(--sp-4) var(--sp-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-subtle, 0 1px 2px rgba(0,0,0,0.04));
}
.week-plan-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-bottom: var(--sp-3);
  flex-wrap: wrap;
}
.week-plan-title-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.week-plan-title {
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.week-plan-sub {
  font-size: var(--text-base, 14px);
  color: var(--text-primary);
  font-weight: 500;
}
.week-plan-edit-link {
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s;
}
.week-plan-edit-link:hover {
  color: var(--text-primary);
  text-decoration: underline;
}
.week-plan-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.week-plan-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: auto auto;
  grid-template-areas:
    "dot label stepper"
    "bar bar   bar";
  align-items: center;
  column-gap: var(--sp-3);
  row-gap: 8px;
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-md, 10px);
}
.week-plan-dot {
  grid-area: dot;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.week-plan-label {
  grid-area: label;
  font-size: var(--text-base, 14px);
  color: var(--text-primary);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.week-plan-stepper {
  grid-area: stepper;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px;
}
.week-plan-step-btn {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s, color 0.12s;
}
.week-plan-step-btn:hover {
  background: var(--surface-hover, var(--surface));
  color: var(--text-primary);
}
.week-plan-step-btn:active {
  transform: scale(0.94);
}
.week-plan-step-btn:focus-visible {
  outline: 2px solid var(--text-primary);
  outline-offset: 2px;
}
.week-plan-count {
  min-width: 56px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  color: var(--text-secondary);
}
.week-plan-done {
  color: var(--text-primary);
  font-weight: 600;
}
.week-plan-sep {
  color: var(--text-muted);
  padding: 0 2px;
}
.week-plan-planned {
  color: var(--text-secondary);
}
.week-plan-bar {
  grid-area: bar;
  height: 4px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
}
.week-plan-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.25s ease;
}
.week-plan-hint {
  margin-top: var(--sp-3);
  display: flex;
  justify-content: center;
}
.week-plan-autofill {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: 1px dashed var(--border);
  border-radius: var(--r-md, 10px);
  padding: 8px 14px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.week-plan-autofill:hover {
  color: var(--text-primary);
  border-color: var(--text-primary);
  background: var(--surface-hover, var(--surface));
}
.week-plan-hint-warn {
  padding: 10px 12px;
  border-radius: var(--r-md, 10px);
  background: var(--bg);
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-secondary);
  text-align: center;
}

@media (max-width: 520px) {
  .week-plan-row {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto auto;
    grid-template-areas:
      "dot label"
      "stepper stepper"
      "bar bar";
  }
  .week-plan-stepper { justify-self: stretch; justify-content: space-between; }
  .week-plan-count { flex: 1; }
}

/* ============================================================
   ROUND 5 — New UI components
   ============================================================ */

/* -- Task 3b: + New project card -- */
.project-new-card {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-4); margin-bottom: var(--sp-3);
  background: transparent;
  border: 1px dashed var(--border);
  border-radius: var(--r-lg);
  cursor: pointer; color: var(--text-secondary);
  transition: border-color var(--t-fast), color var(--t-fast), background var(--t-fast);
}
.project-new-card:hover {
  border-color: var(--text-muted);
  color: var(--text-primary);
  background: var(--surface);
}
.project-new-plus {
  font-size: 20px; font-weight: 400; line-height: 1;
  color: var(--text-muted); width: 24px; text-align: center;
}
.project-new-card:hover .project-new-plus { color: var(--text-primary); }
.project-new-label {
  font-size: var(--text-sm); font-weight: 500;
}

/* Edit button on active project cards */
.proj-edit-btn {
  font-family: var(--font); font-size: var(--text-xs); font-weight: 500;
  padding: 4px 10px; border-radius: var(--r-md);
  border: 1px solid var(--border); background: transparent;
  color: var(--text-muted); cursor: pointer;
  transition: color var(--t-fast), border-color var(--t-fast), background var(--t-fast);
  margin-left: var(--sp-2);
}
.proj-edit-btn:hover {
  color: var(--text-primary); border-color: var(--text-muted);
  background: var(--surface-hover);
}
.proj-restore-btn { color: var(--text-primary); }

/* -- Task 3b: project create/edit modal -- */
.project-modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,0.55);
  display: flex; align-items: center; justify-content: center;
  padding: var(--sp-4);
}
.project-modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: 0 10px 40px rgba(0,0,0,0.4);
  width: 100%; max-width: 420px;
  max-height: 90vh; overflow-y: auto;
  padding: var(--sp-5);
}
.project-modal-title {
  font-size: var(--text-md); font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--sp-4);
}
.project-modal-field {
  display: block; margin-bottom: var(--sp-4);
}
.project-modal-field > span {
  display: block; font-size: var(--text-xs); font-weight: 500;
  color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em;
  margin-bottom: var(--sp-2);
}
.project-modal-field input[type="text"],
.project-modal-field textarea {
  width: 100%; font-family: var(--font); font-size: var(--text-sm);
  color: var(--text-primary); background: var(--bg);
  border: 1px solid var(--border); border-radius: var(--r-md);
  padding: var(--sp-2) var(--sp-3); line-height: 1.4;
  transition: border-color var(--t-fast);
}
.project-modal-field input[type="text"]:focus,
.project-modal-field textarea:focus {
  outline: none; border-color: var(--text-muted);
}
.project-modal-field textarea { resize: vertical; min-height: 60px; }

.icon-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-2);
}
.icon-grid-cell {
  display: flex; align-items: center; justify-content: center;
  padding: var(--sp-2); border-radius: var(--r-md);
  border: 1px solid var(--border); background: var(--bg);
  color: var(--text-secondary); cursor: pointer; aspect-ratio: 1;
  transition: border-color var(--t-fast), color var(--t-fast), background var(--t-fast);
}
.icon-grid-cell:hover {
  color: var(--text-primary); border-color: var(--text-muted);
}
.icon-grid-cell-selected {
  border-color: var(--text-primary) !important;
  color: var(--text-primary);
  background: var(--surface-hover);
}

.color-swatches {
  display: grid;
  grid-template-columns: repeat(8, 32px);
  gap: var(--sp-2);
  justify-content: start;
}
@media (max-width: 480px) {
  .color-swatches { grid-template-columns: repeat(6, 32px); }
}
.color-swatch {
  width: 32px; height: 32px; border-radius: 50%;
  border: 2px solid transparent; cursor: pointer; padding: 0;
  transition: transform var(--t-fast), border-color var(--t-fast);
  /* subtle inner ring so white-ish swatches remain visible on light themes */
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}
.color-swatch:hover { transform: scale(1.08); }
.color-swatch-selected {
  border-color: var(--text-primary);
  transform: scale(1.08);
}

.project-modal-actions {
  display: flex; gap: var(--sp-2); justify-content: flex-end;
  margin-top: var(--sp-5); flex-wrap: wrap;
}
.project-modal-archive { margin-right: auto; }

/* -- Task 3b: candy path + Add milestone row -- */
.candy-add-milestone {
  font-family: var(--font); font-size: var(--text-sm); font-weight: 500;
  padding: var(--sp-2) var(--sp-4); margin: var(--sp-4) auto 0;
  border-radius: var(--r-lg); cursor: pointer;
  border: 1px dashed var(--border); background: transparent;
  color: var(--text-secondary);
  transition: color var(--t-fast), border-color var(--t-fast), background var(--t-fast);
}
.candy-add-milestone:hover {
  color: var(--text-primary); border-color: var(--text-muted);
  background: var(--surface);
}

/* -- Task 2: Weekly goal tracker -- */
.weekly-tracker-avg {
  font-size: var(--text-xs); color: var(--text-muted);
  margin-bottom: var(--sp-3);
}
.weekly-tracker-empty-text {
  font-size: var(--text-sm); color: var(--text-muted);
  padding: var(--sp-4) 0;
}
.weekly-tracker-rows {
  display: flex; flex-direction: column; gap: var(--sp-2);
}
.weekly-tracker-row {
  display: grid;
  grid-template-columns: 100px 1fr auto auto;
  gap: var(--sp-3); align-items: center;
  font-size: var(--text-xs);
}
.weekly-tracker-week {
  color: var(--text-secondary); font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.weekly-tracker-bar {
  height: 8px; background: var(--bg);
  border-radius: var(--r-sm); overflow: hidden;
  border: 1px solid var(--border);
}
.weekly-tracker-bar-fill {
  height: 100%; background: var(--text-muted);
  transition: width var(--t-normal);
}
.weekly-tracker-bar-current { background: var(--c-gold); }
.weekly-tracker-count {
  color: var(--text-secondary); font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.weekly-tracker-label {
  color: var(--text-muted);
  padding: 2px 8px; border-radius: var(--r-sm);
  white-space: nowrap;
}
.weekly-tracker-label-under { color: var(--text-muted); }
.weekly-tracker-label-over  { color: var(--c-gold); }
.weekly-tracker-label-on    { color: var(--text-primary); }
.weekly-tracker-label-progress { color: var(--text-secondary); font-style: normal; }

@media (max-width: 640px) {
  .weekly-tracker-row {
    grid-template-columns: 80px 1fr;
    grid-template-areas:
      "week bar"
      "count label";
    row-gap: var(--sp-1);
  }
  .weekly-tracker-week  { grid-area: week; }
  .weekly-tracker-bar   { grid-area: bar; }
  .weekly-tracker-count { grid-area: count; }
  .weekly-tracker-label { grid-area: label; text-align: right; }
}

/* -- Task 6/7/8/9: Week-plan collapsed summary -- */
.week-plan-panel-collapsed {
  display: flex; gap: var(--sp-3); align-items: center;
  padding: var(--sp-3) var(--sp-4); margin-bottom: var(--sp-4);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg);
  font-size: var(--text-sm);
}
.week-plan-collapsed-row {
  display: flex; gap: var(--sp-2); align-items: center;
  flex-wrap: wrap; flex: 1;
}
.week-plan-collapsed-label {
  font-weight: 500; color: var(--text-primary);
}
.week-plan-collapsed-range { color: var(--text-muted); }
.week-plan-collapsed-total {
  color: var(--text-secondary); font-variant-numeric: tabular-nums;
}
.week-plan-collapsed-sep { color: var(--text-muted); }
.week-plan-collapsed-breakdown {
  color: var(--text-muted); font-size: var(--text-xs);
}
.week-plan-collapsed-edit {
  font-family: var(--font); font-size: var(--text-xs); font-weight: 500;
  padding: 4px 10px; border-radius: var(--r-md);
  border: 1px solid var(--border); background: transparent;
  color: var(--text-muted); cursor: pointer;
  transition: color var(--t-fast), border-color var(--t-fast);
}
.week-plan-collapsed-edit:hover {
  color: var(--text-primary); border-color: var(--text-muted);
}

/* Title / range / goal button in expanded panel */
.week-plan-title-line {
  display: flex; gap: var(--sp-2); align-items: baseline;
  flex-wrap: wrap;
}
.week-plan-range {
  font-size: var(--text-xs); color: var(--text-muted); font-weight: 400;
}
.week-plan-goal-btn {
  font-family: var(--font); font-size: inherit; font-weight: 600;
  background: transparent; border: 1px solid transparent;
  border-radius: var(--r-sm); padding: 0 4px; cursor: pointer;
  color: var(--text-primary);
  transition: background var(--t-fast), border-color var(--t-fast);
}
.week-plan-goal-btn:hover {
  background: var(--surface-hover);
  border-color: var(--border);
}
.week-plan-goal-input {
  width: 3.5em; font-family: var(--font); font-size: inherit;
  font-weight: 600; text-align: center;
  background: var(--bg); border: 1px solid var(--text-muted);
  border-radius: var(--r-sm); padding: 0 4px;
  color: var(--text-primary);
}
.week-plan-actions {
  display: flex; gap: var(--sp-2); margin-top: var(--sp-3);
  flex-wrap: wrap;
}
.week-plan-approve-btn { flex: 1; min-width: 140px; }

/* -- Task 1: rollover pill + Sunday preview -- */
.week-plan-rollover {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: var(--text-xs); color: var(--text-muted);
  padding: 2px 8px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border);
  margin-left: var(--sp-2);
}
.sunday-rollover-preview {
  padding: var(--sp-3) var(--sp-4); margin-bottom: var(--sp-4);
  background: var(--surface); border: 1px dashed var(--border);
  border-radius: var(--r-lg);
  font-size: var(--text-sm); color: var(--text-secondary);
}
.sunday-rollover-preview strong { color: var(--text-primary); font-weight: 600; }

/* -- Task 10: simplified plan-grid slot -- */
.plan-slot-simple {
  display: flex; align-items: center; gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-3);
  min-height: 32px;
  font-size: var(--text-xs) !important;
  cursor: pointer;
  transition: background var(--t-fast);
}
.plan-slot-simple:hover { background: var(--surface-hover); }
.plan-slot-simple .dot {
  width: 8px; height: 8px; flex: 0 0 8px;
}
.plan-slot-simple .plan-slot-label {
  color: var(--text-secondary); font-weight: 400;
  white-space: nowrap;
}

/* -- Task 11 + Task 12: planned-row layout fix -- */
.planned-row {
  display: flex; gap: var(--sp-3); align-items: flex-start;
  padding: var(--sp-3) var(--sp-4);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); margin-bottom: var(--sp-2);
  flex-wrap: wrap;
}
.planned-row-main {
  flex: 1 1 auto; min-width: 0;
  display: flex; flex-direction: column; gap: 2px;
}
.planned-row-title {
  font-size: var(--text-sm); font-weight: 600; color: var(--text-primary);
  overflow-wrap: anywhere;
}
.planned-row-sub {
  font-size: var(--text-xs); color: var(--text-secondary);
  overflow-wrap: anywhere;
}
.planned-row-meta {
  font-size: var(--text-xs); color: var(--text-muted); margin-top: 2px;
  overflow-wrap: anywhere;
}
.planned-row-actions {
  display: flex; gap: var(--sp-2); flex: 0 0 auto;
  align-items: center; flex-wrap: wrap;
}
.planned-row-dots {
  flex: 0 0 auto; max-width: 40%;
  display: flex; gap: 4px; flex-wrap: wrap; align-items: center;
}
.planned-row-dots-wrapped {
  flex: 1 1 100%; margin-top: var(--sp-2);
  order: 99;
}

.planned-row-colordot {
  width: 10px; height: 10px; border-radius: 50%;
  flex: 0 0 10px; margin-top: 6px;
}

/* Task 12E: done state */
.planned-blocks-done {
  padding: var(--sp-5) var(--sp-4);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); text-align: center;
}
.planned-blocks-done-title {
  font-size: var(--text-sm); font-weight: 600; color: var(--text-primary);
  margin-bottom: 4px;
}
.planned-blocks-done-sub {
  font-size: var(--text-xs); color: var(--text-muted);
  margin-bottom: var(--sp-4);
}
.planned-blocks-done-btn { width: auto; padding: var(--sp-2) var(--sp-4); }

/* Mobile: stack actions under text */
@media (max-width: 560px) {
  .planned-row-actions {
    flex: 1 1 100%; justify-content: flex-start;
  }
  .planned-row-dots { max-width: 100%; }
}

/* ------------------------------------------------------------------ */
/* Round 5.1 — Calm Home (labels only show project + block duration)  */
/* Intent: Home never shows step/substep text. Specifics are visible  */
/* after clicking into Focus. Removes decision-making surface.        */
/* ------------------------------------------------------------------ */

/* Hero 'Start next block' button: calm variant */
.start-block-btn-calm {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 20px 22px;
  text-align: left;
  width: 100%;
  border-radius: var(--r-lg);
}
.start-block-btn-calm .btn-label-sm {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.85);
}
.start-block-btn-calm .start-block-calm-main {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-width: 0;
}
.start-block-btn-calm .start-block-calm-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex: 0 0 auto;
  border: 2px solid rgba(255,255,255,0.55);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.08);
}
.start-block-btn-calm .start-block-calm-text {
  font-size: 22px;
  font-weight: 600;
  color: #fff;
  line-height: 1.15;
  overflow-wrap: anywhere;
  word-break: break-word;
  min-width: 0;
  flex: 1 1 auto;
}

/* Planned-row: calm variant (overrides the 3-dot multiline layout) */
.planned-row-calm {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  min-width: 0;
}
.planned-row-calm .planned-row-colordot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex: 0 0 auto;
}
.planned-row-calm .planned-row-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1 1 auto;
  min-width: 0;
}
.planned-row-calm .planned-row-title-calm {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  overflow-wrap: anywhere;
  word-break: break-word;
}
.planned-row-calm .planned-row-meta {
  font-size: 13px;
  color: var(--text-muted);
  overflow-wrap: anywhere;
}
.planned-row-calm .planned-row-actions {
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* Stack buttons under text on narrow screens so nothing overlaps */
@media (max-width: 540px) {
  .planned-row-calm {
    flex-wrap: wrap;
  }
  .planned-row-calm .planned-row-main {
    flex: 1 1 100%;
  }
  .planned-row-calm .planned-row-actions {
    flex: 1 1 100%;
    justify-content: flex-start;
  }
}
