/* =========================================================
   VoiceGanizer — Charcoal theme
   Charcoal panels on near-black, warm orange → pink → purple gradients.
   Depth: every card has a border + layered shadow; every input sits in a
   filled, bordered well; buttons are raised; sections are clearly spaced.
   ========================================================= */
:root {
  color-scheme: dark;

  --bg: #121317;
  --card: #1e1f25;
  --tile: #26272e;          /* stat tiles / secondary surfaces */
  --field: #15161b;         /* input wells */
  --bar: #17181d;           /* top & bottom bars */
  --line: rgba(255, 255, 255, .07);
  --line-strong: rgba(255, 255, 255, .15);

  --text: #f2f2f6;
  --ink: #f2f2f6;
  --muted: #9a9cad;
  --dim: #63657a;

  --red: #ff4d7e;           /* primary (warm pink) */
  --red-dark: #e8366a;
  --red-soft: rgba(255, 77, 126, .15);
  --lav: #a78bfa;
  --lav-soft: rgba(167, 139, 250, .15);
  --grad-warm: linear-gradient(135deg, #ffb23e 0%, #ff5b7f 52%, #a855f7 100%);
  --hero: var(--grad-warm);

  --cyan: var(--red);
  --magenta: var(--red);
  --violet: var(--lav);
  --blue: #4f9dff;
  --yellow: #ffcc33;

  --ok: #34d399;
  --warn: #ffcc33;
  --danger: #ff5a6a;

  --radius: 18px;
  --radius-sm: 14px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .45);
  --shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 1px 2px rgba(0, 0, 0, .5), 0 10px 24px -8px rgba(0, 0, 0, .65);
  --shadow-lg: inset 0 1px 0 rgba(255, 255, 255, .06), 0 2px 6px rgba(0, 0, 0, .5), 0 22px 44px -14px rgba(0, 0, 0, .8);
  --well: inset 0 2px 5px rgba(0, 0, 0, .5);
  --tap: 48px;

  --display: 'Poppins', 'Inter', -apple-system, sans-serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  --maxw: 760px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0; min-height: 100vh;
  background: var(--bg); color: var(--text);
  font-family: var(--sans); font-size: 16px; line-height: 1.45;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
  padding-bottom: calc(96px + var(--safe-b));
}
body.sheet-open { overflow: hidden; }
body.is-dragging { user-select: none; -webkit-user-select: none; cursor: grabbing; }
button { font: inherit; color: inherit; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
svg { display: block; }
::selection { background: var(--red-soft); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.muted { color: var(--muted); font-size: 14px; }
.small { font-size: 13px; }
.gold-text { color: var(--red); }

/* ---------- Shared: cards ---------- */
.top-card, .task, .inbox-item, .simple-list li, .rank-list li, .idea-card, .chart-card,
.cap-recent ul, .pick-list button {
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow);
}

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(23, 24, 29, .92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  padding: calc(10px + var(--safe-t)) 16px 12px;
  border-bottom: 1px solid var(--line); box-shadow: 0 4px 16px -8px rgba(18, 20, 38, .18);
}
.topbar-inner { max-width: var(--maxw); margin: 0 auto; }
.brand-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.brand {
  margin: 0; font-family: var(--display); font-weight: 700; font-size: 24px; letter-spacing: -.01em;
  color: var(--text); white-space: nowrap; display: flex; align-items: center;
}
.brand::before {
  content: ''; width: 30px; height: 30px; margin-right: 10px; flex: none; border-radius: 50%;
  background: var(--red) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round'%3E%3Crect x='9' y='3.5' width='6' height='10' rx='3'/%3E%3Cpath d='M6 11a6 6 0 0 0 12 0M12 17v3'/%3E%3C/svg%3E") center / 17px no-repeat;
  box-shadow: 0 4px 10px -2px rgba(227, 25, 75, .45);
}
.brand-g { color: var(--red); }
.date-label { color: var(--muted); font-size: 13px; font-weight: 500; white-space: nowrap; }
.brand-right { display: flex; align-items: center; gap: 2px; margin-right: -10px; }
.bar-btn { position: relative; color: var(--muted); }
@media (max-width: 420px) { .date-label { display: none; } }
.backup-dot { position: absolute; top: 10px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 2px var(--bar); }

/* Backup sheet */
.backup-status { background: var(--tile); border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin-bottom: 14px; }
.backup-status b { display: block; font-family: var(--display); font-size: 17px; color: var(--text); }
.backup-status b.stale { color: var(--warn); }
.backup-status span { display: block; margin-top: 4px; color: var(--muted); font-size: 13.5px; line-height: 1.45; }
.backup-actions { display: grid; gap: 10px; }
.backup-actions .btn.block { margin-top: 0; }
.backup-help { margin: 14px 2px 4px; line-height: 1.5; }

.capture { display: flex; gap: 8px; }
.capture input {
  flex: 1; min-width: 0; height: 50px; border: 1.5px solid var(--line-strong); border-radius: 14px;
  padding: 0 16px; font-size: 16px; background: var(--field); color: var(--text); outline: none;
  box-shadow: var(--well); transition: border-color .15s, box-shadow .15s, background .15s;
}
.capture input::placeholder { color: var(--dim); }
.capture input:focus { background: var(--card); border-color: var(--red); box-shadow: 0 0 0 4px var(--red-soft); }
.capture-btn {
  width: 50px; height: 50px; flex: none; border: 0; border-radius: 14px;
  background: var(--red); color: #fff; display: grid; place-items: center;
  box-shadow: 0 6px 14px -4px rgba(227, 25, 75, .55);
}
.capture-btn:active { transform: scale(.96); }
.capture-assist { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
.prefix-chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; }
.prefix-chips::-webkit-scrollbar { display: none; }
.prefix-chips button {
  flex: none; height: 32px; padding: 0 12px; border-radius: 999px;
  border: 1.5px solid var(--line-strong); background: var(--card); color: var(--text); font-size: 13px; font-weight: 500;
  box-shadow: var(--shadow-sm);
}
.prefix-chips button.active { background: var(--red); border-color: var(--red); color: #fff; }
.capture-route { flex: none; font-size: 13px; color: var(--red); font-weight: 600; }

/* ---------- Layout ---------- */
.view { max-width: var(--maxw); margin: 0 auto; padding: 22px 16px 24px; }
.section { margin-bottom: 32px; }
.section + .section { padding-top: 24px; border-top: 1px solid var(--line); }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-head h2 {
  margin: 0; font-family: var(--display); font-weight: 700; font-size: 22px; letter-spacing: -.01em; color: var(--text);
  display: flex; align-items: center; gap: 10px;
}
.section-head h2.custom-h::before { content: ''; width: 12px; height: 12px; border-radius: 50%; background: var(--c); flex: none; }
.phase-note {
  background: var(--lav-soft); border: 1px solid rgba(167, 139, 250, .3); color: #d9d0ff;
  padding: 12px 14px; border-radius: var(--radius-sm); font-size: 14px; margin: 0 0 22px;
}

.progress { height: 8px; border-radius: 4px; background: #0f1014; box-shadow: var(--well); overflow: hidden; margin: -4px 0 16px; }
.progress > span { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #ff4f7b, var(--red)); transition: width .3s; }

/* ---------- Top 3 ---------- */
.top-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.top-card {
  display: flex; align-items: center; gap: 12px; min-height: 78px;
  border-radius: var(--radius); padding: 12px 10px 12px 16px; position: relative; overflow: hidden;
}
.top-card:not(.empty)::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--red); }
.top-card.empty {
  min-height: 60px; padding-top: 4px; padding-bottom: 4px; background: transparent;
  border: 1.5px dashed var(--line-strong); box-shadow: none;
}
.top-card.empty .top-num { color: var(--dim); }
.top-num {
  font-family: var(--display); font-weight: 700; font-size: 30px; line-height: 1; width: 26px; text-align: center; flex: none;
  color: var(--red); font-variant-numeric: lining-nums tabular-nums;
}
.top-body { flex: 1; min-width: 0; cursor: pointer; }
.top-title { font-size: 17px; font-weight: 600; color: var(--text); line-height: 1.3; word-break: break-word; }
.top-card.is-done .top-title { text-decoration: line-through; color: var(--muted); }
.top-card.is-done { opacity: .75; }
.top-card.is-done::before { background: var(--ok); }
.top-add { flex: 1; min-height: var(--tap); text-align: left; border: 0; background: transparent; color: var(--red); font-weight: 600; font-size: 15px; }

/* ---------- Toolbar & buttons ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.select-wrap select {
  height: 42px; border-radius: 999px; border: 1.5px solid var(--line-strong); background-color: var(--card);
  padding: 0 34px 0 16px; font-size: 14px; font-weight: 500; color: var(--text); appearance: none; -webkit-appearance: none;
  box-shadow: var(--shadow-sm);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f2f2f6' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 16px;
}
.select-wrap select:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 4px var(--red-soft); }
.btn {
  height: 42px; padding: 0 18px; border-radius: 999px; border: 1.5px solid transparent;
  font-size: 14px; font-weight: 600; white-space: nowrap; transition: transform .1s, box-shadow .15s, background .15s;
}
.btn.small { height: 34px; padding: 0 12px; font-size: 13px; }
.btn.block { width: 100%; height: 50px; border-radius: 14px; font-size: 15px; margin-top: 4px; }
.btn.gold, .btn.navy { background: var(--red); color: #fff; box-shadow: 0 6px 14px -4px rgba(227, 25, 75, .5); }
.btn.gold:hover, .btn.navy:hover { background: var(--red-dark); }
.btn.ghost { background: var(--card); border-color: var(--line-strong); color: var(--text); box-shadow: var(--shadow-sm); }
.btn.ghost:hover { border-color: var(--text); }
.btn.danger-ghost { background: var(--card); border-color: rgba(255, 90, 106, .4); color: var(--danger); }
.btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.btn:active:not(:disabled) { transform: scale(.97); }

/* ---------- Task list ---------- */
.task-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.task {
  display: flex; align-items: center; gap: 4px; min-height: 66px;
  border-radius: var(--radius-sm); padding: 6px 4px 6px 8px; position: relative; overflow: hidden;
}
.task::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--c, var(--lav)); }
.task.dragging { z-index: 5; box-shadow: var(--shadow-lg); }
.task.is-done { opacity: .6; }
.task.is-done .task-title { text-decoration: line-through; color: var(--muted); }
.task-main { flex: 1; min-width: 0; padding: 6px 4px; cursor: pointer; }
.task-title { font-size: 16px; font-weight: 600; color: var(--text); word-break: break-word; }
.task-title:empty::before { content: 'Untitled task'; color: var(--muted); font-style: italic; }
.task-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 4px; font-size: 12.5px; color: var(--muted); }
.area-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); display: inline-block; flex: none; }

.check { width: var(--tap); height: var(--tap); flex: none; border: 0; background: transparent; display: grid; place-items: center; padding: 0; }
.check svg {
  width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--line-strong); padding: 3px; background: var(--field);
  fill: none; stroke: transparent; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round;
  box-shadow: var(--well); transition: all .15s;
}
.check:hover svg { border-color: var(--red); }
.check[aria-pressed="true"] svg { background: var(--red); border-color: var(--red); stroke: #fff; box-shadow: 0 3px 8px -2px rgba(227, 25, 75, .5); }
.check.big svg { width: 30px; height: 30px; }

.icon-btn { width: 44px; height: 44px; flex: none; border: 0; background: transparent; border-radius: 12px; display: grid; place-items: center; color: var(--dim); }
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linejoin: round; stroke-linecap: round; }
.icon-btn:hover { color: var(--text); background: var(--tile); }
.icon-btn.pin:hover, .icon-btn.copy:hover { color: var(--red); background: var(--red-soft); }
.icon-btn:disabled { opacity: .3; cursor: default; background: transparent; }

.drag-handle { width: 36px; height: 48px; flex: none; display: grid; place-items: center; color: var(--dim); cursor: grab; touch-action: none; }
.drag-handle svg { width: 20px; height: 20px; fill: currentColor; }
.drag-handle:active { cursor: grabbing; color: var(--text); }

.score { font-weight: 700; font-size: 11px; padding: 2px 8px; border-radius: 999px; letter-spacing: .02em; }
.score.hot { background: var(--red-soft); color: var(--red-dark); }
.score.warm { background: rgba(255, 204, 51, .14); color: #ffcc33; }
.score.cool { background: var(--tile); color: var(--muted); }
.due { font-weight: 500; }
.due.overdue { color: var(--danger); font-weight: 700; }
.due.today { color: var(--warn); font-weight: 600; }
.due.soon { color: var(--lav); font-weight: 600; }
.rolled { color: var(--warn); font-weight: 600; font-size: 12px; }
.has-notes { color: var(--muted); }

.done-block { margin-top: 18px; }
.done-block summary { cursor: pointer; color: var(--muted); font-size: 14px; font-weight: 600; padding: 8px 2px; list-style: none; }
.done-block summary::-webkit-details-marker { display: none; }
.done-block summary::before { content: '▸ '; }
.done-block[open] summary::before { content: '▾ '; }

.empty-state {
  text-align: center; padding: 26px 16px; color: var(--muted); border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius); background: rgba(255, 255, 255, .02);
}
.empty-state.small { padding: 16px; }
.empty-state p { margin: 0; }
.empty-state b, .phase-note b { color: var(--red); font-family: var(--mono); font-size: .92em; font-weight: 600; }

/* ---------- Inbox & simple lists ---------- */
.inbox-list, .simple-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.inbox-item { border-radius: var(--radius-sm); padding: 14px; }
.inbox-text { font-size: 16px; font-weight: 600; margin-bottom: 12px; word-break: break-word; }
.route-row { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  height: 36px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--line-strong);
  background: var(--card); color: var(--text); font-size: 13.5px; font-weight: 500; box-shadow: var(--shadow-sm);
}
.chip:hover { border-color: var(--text); }
.chip.danger { color: var(--danger); margin-left: auto; border-color: rgba(255, 90, 106, .4); }
.chip.danger:hover { background: rgba(255, 90, 106, .12); }
.chip.custom { display: inline-flex; align-items: center; gap: 7px; }
.chip.custom::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }

.simple-list li { display: flex; align-items: center; gap: 6px; min-height: 58px; border-radius: var(--radius-sm); padding: 4px; }
.simple-list li.is-done .simple-text { text-decoration: line-through; color: var(--muted); }
.simple-text { flex: 1; min-width: 0; word-break: break-word; font-weight: 500; }
.simple-side { font-size: 14px; font-weight: 700; color: var(--text); white-space: nowrap; display: flex; gap: 8px; align-items: center; }
.tag {
  display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  padding: 2px 8px; border-radius: 999px; background: var(--lav-soft); color: #c4b5fd; white-space: nowrap;
}
.tag.personal { background: rgba(255, 95, 174, .15); color: #ff8cc6; }
.tag.gold { background: var(--red-soft); color: var(--red-dark); }

/* ---------- Tab bar ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; justify-content: center; align-items: flex-end; gap: 2px;
  background: rgba(23, 24, 29, .95); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line); box-shadow: 0 -6px 20px -8px rgba(18, 20, 38, .18);
  padding: 6px 8px calc(6px + var(--safe-b));
}
.tabbar button {
  flex: 1; max-width: 150px; min-height: 58px; border: 0; background: transparent; border-radius: 12px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  color: #9a9db2; font-size: 11px; font-weight: 600; position: relative;
}
.tabbar svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tabbar button.active { color: var(--red); }
.tabbar button.tab-center { color: var(--muted); }
.tabbar button.tab-center.active { color: var(--text); }
.diamond {
  width: 54px; height: 54px; margin-top: -26px; margin-bottom: 2px; display: grid; place-items: center;
  background: var(--red); border-radius: 50%;
  box-shadow: 0 0 0 5px var(--bar), 0 10px 22px -4px rgba(227, 25, 75, .55);
  transition: transform .15s, background .15s;
}
.diamond svg { stroke: #fff !important; stroke-width: 2.1 !important; width: 24px !important; height: 24px !important; }
.tabbar button.tab-center:active .diamond { transform: scale(.94); }
body:has(.mic-wrap.listening) .tabbar button.tab-center .diamond { background: var(--lav); box-shadow: 0 0 0 5px var(--bar), 0 10px 22px -4px rgba(143, 124, 246, .6); }
.badge {
  position: absolute; top: 4px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--red); color: #fff; font-size: 11px; line-height: 18px; text-align: center; font-weight: 700;
  box-shadow: 0 0 0 2px var(--bar);
}

/* ---------- Bottom sheet ---------- */
#sheet-root { position: fixed; inset: 0; z-index: 50; pointer-events: none; }
#sheet-root:empty { display: none; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(18, 20, 38, .4); opacity: 0; transition: opacity .2s; }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; margin: 0 auto; max-width: 620px;
  max-height: 92vh; overflow-y: auto; overscroll-behavior: contain;
  background: var(--card); border-radius: 26px 26px 0 0; box-shadow: 0 -12px 40px rgba(18, 20, 38, .25);
  padding: 8px 18px calc(22px + var(--safe-b));
  transform: translateY(100%); transition: transform .22s cubic-bezier(.2, .8, .2, 1);
}
#sheet-root.show { pointer-events: auto; }
#sheet-root.show .sheet-backdrop { opacity: 1; }
#sheet-root.show .sheet { transform: none; }
.sheet-grip { width: 42px; height: 5px; border-radius: 3px; background: var(--line-strong); margin: 4px auto 12px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 12px; }
.sheet-head h3 { margin: 0; font-family: var(--display); font-size: 24px; font-weight: 700; letter-spacing: -.01em; color: var(--text); }

.field { display: block; margin-bottom: 18px; }
.field > span { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 7px; }
.field textarea, .field input[type="date"], .field input[type="text"], .inline-form input {
  width: 100%; border: 1.5px solid var(--line-strong); border-radius: 14px; padding: 12px 14px; font-size: 16px;
  background: var(--field); color: var(--text); outline: none; resize: vertical; box-shadow: var(--well);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.field textarea::placeholder, .field input::placeholder, .inline-form input::placeholder { color: var(--dim); }
.field textarea:focus, .field input:focus, .inline-form input:focus { background: var(--card); border-color: var(--red); box-shadow: 0 0 0 4px var(--red-soft); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 420px) { .field-row { grid-template-columns: 1fr; gap: 0; } }

.area-grid { display: flex; flex-wrap: wrap; gap: 7px; }
.area-chip {
  min-height: 38px; padding: 0 13px; border-radius: 999px; border: 1.5px solid var(--line-strong); background: var(--card);
  font-size: 13.5px; font-weight: 500; color: var(--text); display: inline-flex; align-items: center; gap: 7px; box-shadow: var(--shadow-sm);
}
.area-chip::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.area-chip.active { border-color: var(--c); background: color-mix(in srgb, var(--c) 12%, var(--card)); font-weight: 700; box-shadow: 0 0 0 2px color-mix(in srgb, var(--c) 25%, transparent); }

.seg { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; padding: 5px; border-radius: 14px; background: var(--tile); border: 1px solid var(--line); box-shadow: var(--well); }
.seg button { height: 42px; border: 0; border-radius: 10px; background: transparent; font-weight: 700; color: var(--muted); font-family: var(--display); font-size: 16px; }
.seg button.active { background: var(--red); color: #fff; box-shadow: 0 4px 10px -3px rgba(227, 25, 75, .55); }
.seg-labels { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 5px; }

.due-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.due-row input { flex: 1 1 160px; width: auto; }
.sheet-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 6px; }
.sheet-actions .btn { height: 48px; }
.inline-form { display: flex; gap: 8px; margin-bottom: 14px; }
.inline-form .btn { height: 50px; }
.pick-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.pick-list button { width: 100%; min-height: 54px; display: flex; align-items: center; gap: 10px; text-align: left; border-radius: 14px; padding: 8px 12px; }
.pick-list button:hover { border-color: var(--red); }
.pick-title { flex: 1; min-width: 0; font-weight: 600; }

/* stat tiles (like Distance / Time / Elevation) */
.eod-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 18px; }
.eod-stats div { background: var(--tile); border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.eod-stats span { display: block; font-size: 12.5px; color: var(--muted); }
.eod-stats b { display: block; font-family: var(--display); font-size: 26px; line-height: 1.1; color: var(--text); font-variant-numeric: lining-nums tabular-nums; }
.eod-stats div:first-child b { color: var(--red); }
.eod-h { margin: 18px 0 6px; font-family: var(--display); font-size: 16px; font-weight: 700; color: var(--text); }
.eod-list { list-style: none; margin: 0; padding: 0; }
.eod-list li { display: flex; align-items: center; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(100px + var(--safe-b)); z-index: 60;
  transform: translate(-50%, 12px); opacity: 0; transition: all .2s;
  background: var(--text); color: #fff; border-radius: 14px; box-shadow: var(--shadow-lg);
  display: flex; align-items: center; gap: 14px; padding: 11px 10px 11px 16px; font-size: 14.5px;
  width: max-content; max-width: calc(100vw - 32px);
}
.toast button { flex: none; white-space: nowrap; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast button { border: 0; background: transparent; color: #ffb23e; font-weight: 700; padding: 8px 10px; border-radius: 8px; }
.toast button:hover { background: rgba(255, 255, 255, .1); }

@media (min-width: 900px) { .view { padding-top: 30px; } }

/* ---------- View toggle (tabs like Progress / Activities) ---------- */
.view.wide { max-width: 1180px; }
.view-toggle { display: inline-flex; gap: 4px; padding: 4px; margin-bottom: 14px; border-radius: 999px; background: var(--tile); border: 1px solid var(--line); box-shadow: var(--well); }
.view-toggle button { height: 36px; padding: 0 16px; border: 0; border-radius: 999px; background: transparent; font-size: 14px; font-weight: 600; color: var(--muted); }
.view-toggle button.active { background: var(--card); color: var(--red); box-shadow: var(--shadow); }

/* ---------- Bubble chart ---------- */
.chart-card { border-radius: var(--radius); padding: 14px 12px 10px; margin-bottom: 16px; }
.bubble-chart { width: 100%; max-width: 520px; height: auto; display: block; margin: 0 auto; font-family: var(--sans); }
.bc-plot { fill: #17181d; stroke: var(--line); }
.bc-grid { stroke: rgba(255, 255, 255, .07); stroke-width: 1; }
.bc-zone.hot { fill: rgba(227, 25, 75, .06); stroke: rgba(227, 25, 75, .5); stroke-width: 1.2; stroke-dasharray: 4 3; }
.bc-zone.soft { fill: transparent; }
.bc-zone-label { font-size: 10px; font-weight: 600; letter-spacing: .06em; fill: var(--dim); text-transform: uppercase; }
.bc-zone-label.hot { fill: var(--red); font-size: 11px; font-weight: 800; letter-spacing: .1em; }
.bc-tick { font-size: 10.5px; fill: var(--muted); }
.bc-axis { font-size: 11px; font-weight: 700; fill: var(--text); letter-spacing: .04em; text-transform: uppercase; }
.bubble { cursor: pointer; outline: none; }
.bubble circle { fill-opacity: .92; stroke: #fff; stroke-width: 2.5; filter: drop-shadow(0 2px 3px rgba(18, 20, 38, .2)); transition: transform .15s; transform-box: fill-box; transform-origin: center; }
.bubble text { fill: #fff; font-size: 11px; font-weight: 800; pointer-events: none; }
.bubble:hover circle, .bubble:focus circle { fill-opacity: 1; transform: scale(1.12); }
.bubble:focus-visible circle { stroke: var(--text); stroke-width: 3; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: center; margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.chart-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.chart-hint { font-size: 13px; color: var(--muted); margin: 8px 2px 12px; text-align: center; }
.chart-hint b { color: var(--red); }

.rank-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rank-list li { display: flex; align-items: center; gap: 10px; min-height: 60px; border-radius: var(--radius-sm); padding: 4px 4px 4px 12px; }
.rank { width: 30px; height: 30px; flex: none; border-radius: 50%; background: var(--c); color: #fff; display: grid; place-items: center; font-size: 13px; font-weight: 800; box-shadow: 0 3px 8px -2px rgba(18, 20, 38, .35); }

/* ---------- Idea Lab ---------- */
.idea-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.idea-card { display: flex; align-items: center; gap: 12px; min-height: 76px; border-radius: var(--radius-sm); padding: 10px 4px 10px 14px; position: relative; overflow: hidden; }
.idea-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--s); }
.idea-score { width: 58px; flex: none; text-align: center; padding: 8px 4px; border-radius: 12px; background: var(--tile); border: 1px solid var(--line); }
.idea-score b { display: block; font-family: var(--display); font-size: 22px; line-height: 1; font-weight: 700; color: var(--text); font-variant-numeric: lining-nums tabular-nums; }
.idea-score span { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.idea-main { flex: 1; min-width: 0; cursor: pointer; padding: 2px 0; }
.idea-title { font-weight: 700; color: var(--text); word-break: break-word; }
.tag.app { background: var(--red-soft); color: var(--red-dark); text-transform: none; letter-spacing: 0; font-size: 11.5px; }
.tag.status { background: color-mix(in srgb, var(--s) 14%, var(--card)); color: color-mix(in srgb, var(--s) 70%, #fff); }

/* kanban */
.board {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 12px;
  overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; margin: 0 -16px; padding-left: 16px; padding-right: 16px; scroll-padding-left: 16px;
}
.board-col { scroll-snap-align: start; background: #18191e; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; min-height: 200px; position: relative; box-shadow: var(--well); }
.board-col::before { content: ''; position: absolute; left: 14px; right: 14px; top: 0; height: 3px; border-radius: 0 0 3px 3px; background: var(--s); }
.board-col.drop-target { background: var(--red-soft); box-shadow: 0 0 0 2px var(--red); }
.board-col header { display: flex; justify-content: space-between; align-items: center; padding: 4px 4px 10px; font-size: 13px; font-weight: 700; color: var(--text); }
.board-col header b { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 0 8px; font-size: 12px; color: var(--muted); }
.board-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.board-card { flex-wrap: wrap; padding-right: 6px; cursor: grab; }
.board-card.dragging { opacity: .4; }
.board-card .idea-score { width: 48px; }
.board-card .idea-score b { font-size: 18px; }
.board-card .idea-main { flex: 1 1 120px; }
.move-btns { display: flex; width: 100%; justify-content: space-between; border-top: 1px solid var(--line); margin-top: 4px; padding-top: 2px; }
.move-btns .icon-btn { width: 40px; height: 34px; }
.board-empty { font-size: 13px; color: var(--muted); text-align: center; padding: 18px 8px; border: 1.5px dashed var(--line-strong); border-radius: 12px; background: rgba(255, 255, 255, .02); }
@media (min-width: 1000px) { .board { grid-auto-columns: minmax(0, 1fr); overflow-x: visible; margin: 0; padding-left: 0; padding-right: 0; } }

/* idea sheet bits */
.select-wrap.block select { width: 100%; height: 48px; border-radius: 14px; font-size: 16px; background-color: var(--field); box-shadow: var(--well); }
.field em.opt { font-style: normal; font-weight: 400; color: var(--dim); margin-left: 6px; }
.score-line { display: flex; align-items: baseline; gap: 8px; margin: -4px 0 18px; color: var(--text); font-weight: 600; }
.score-line b { font-family: var(--display); font-size: 28px; color: var(--red); font-variant-numeric: lining-nums tabular-nums; }
#i-newapp { margin-top: 8px; }
.prompt-box {
  width: 100%; border: 1.5px solid var(--line-strong); border-radius: 14px; padding: 12px 14px; background: #111216; color: var(--text);
  font-family: var(--mono); font-size: 13px; line-height: 1.55; resize: vertical; outline: none; box-shadow: var(--well);
}
.prompt-box:focus { border-color: var(--red); box-shadow: 0 0 0 4px var(--red-soft); }

/* =========================================================
   Capture screen
   ========================================================= */
body[data-tab="capture"] .capture,
body[data-tab="capture"] .capture-assist { display: none; }
body[data-tab="capture"] .brand-row { margin-bottom: 0; }

.cap-screen { display: flex; flex-direction: column; align-items: stretch; gap: 20px; padding-top: 2px; }

/* category pills (like Run / Walk / Ride) with a pinned + */
.cap-modes-row { display: flex; align-items: center; gap: 8px; margin-right: -16px; }
.cap-modes {
  flex: 1; min-width: 0; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 4px 8px 6px 2px;
  mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent);
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent);
}
.cap-modes::-webkit-scrollbar { display: none; }
.cap-modes button {
  flex: none; height: 38px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--line-strong);
  background: var(--card); color: var(--text); font-size: 14px; font-weight: 600; box-shadow: var(--shadow-sm);
}
.cap-modes button.active { background: var(--red); border-color: var(--red); color: #fff; box-shadow: 0 6px 12px -4px rgba(227, 25, 75, .55); }
.cap-modes button.custom { display: inline-flex; align-items: center; gap: 7px; }
.cap-modes button.custom::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.cap-modes button.custom.active { background: var(--c); border-color: var(--c); }
.cap-modes button.custom.active::before { background: var(--card); }
.cap-add {
  flex: none; width: 40px; height: 40px; margin-right: 16px; border-radius: 50%; display: grid; place-items: center;
  border: 1.5px solid var(--line-strong); background: var(--card); color: var(--text); box-shadow: var(--shadow);
}
.cap-add svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.3; stroke-linecap: round; }
.cap-add:hover { color: var(--red); border-color: var(--red); }
.cap-add:active { transform: scale(.94); }

/* mic: white disc in a red progress-style ring */
.mic-wrap { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 18px 0 4px; }
.mic-btn {
  width: 160px; height: 160px; border-radius: 50%; position: relative; padding: 0;
  display: grid; place-items: center; color: var(--red);
  background: radial-gradient(circle at 50% 35%, #2a2b33, #1a1b20 75%) padding-box,
              conic-gradient(var(--red) 0 70%, rgba(255, 255, 255, .07) 70% 100%) border-box;
  border: 10px solid transparent;
  box-shadow: 0 2px 6px rgba(18, 20, 38, .08), 0 22px 44px -14px rgba(227, 25, 75, .4), inset 0 -4px 10px rgba(18, 20, 38, .05);
  transition: transform .12s, box-shadow .2s;
}
.mic-btn:active { transform: scale(.96); }
.mic-btn svg { width: 58px; height: 58px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.mic-wrap.listening .mic-btn {
  color: #fff;
  background: radial-gradient(circle at 50% 35%, #ff4f7b, var(--red) 75%) padding-box,
              conic-gradient(var(--lav) 0 100%) border-box;
  box-shadow: 0 22px 44px -12px rgba(227, 25, 75, .55);
}
.mic-wrap.listening .mic-btn svg { fill: currentColor; stroke: none; width: 40px; height: 40px; }
.mic-wrap.listening .mic-btn::after {
  content: ''; position: absolute; inset: -14px; border-radius: 50%; border: 3px solid var(--lav);
  animation: mic-pulse 1.4s ease-out infinite; pointer-events: none;
}
@keyframes mic-pulse { from { transform: scale(.95); opacity: .9; } to { transform: scale(1.3); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .mic-wrap.listening .mic-btn::after { animation: none; opacity: .6; } }

.mic-status { font-family: var(--display); font-size: 20px; font-weight: 700; color: var(--text); text-align: center; letter-spacing: -.01em; }
.mic-wrap.listening .mic-status { color: var(--red); }
.live-transcript { min-height: 24px; max-width: 520px; text-align: center; font-size: 18px; color: var(--text); line-height: 1.4; padding: 0 8px; }
.live-transcript:empty { display: none; }

.cap-form { display: flex; gap: 8px; }
.cap-form input {
  flex: 1; min-width: 0; height: 54px; border: 1.5px solid var(--line-strong); border-radius: 16px; padding: 0 16px;
  font-size: 17px; background: var(--card); color: var(--text); outline: none; box-shadow: var(--shadow);
}
.cap-form input::placeholder { color: var(--dim); }
.cap-form input:focus { border-color: var(--red); box-shadow: 0 0 0 4px var(--red-soft); }
.cap-form .btn { height: 54px; border-radius: 16px; padding: 0 22px; }

/* "Saved" card: lavender hero like the leaderboard banner */
.cap-last {
  border-radius: var(--radius); padding: 16px; background: var(--hero); border: 1px solid transparent;
  box-shadow: 0 2px 6px rgba(18, 20, 38, .06), 0 18px 36px -16px rgba(91, 72, 214, .45);
}
@keyframes cap-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.cap-last.fresh { animation: cap-in .25s ease-out; }
.cap-last-head { display: flex; align-items: center; gap: 12px; }
.cap-last-head > div { flex: 1; min-width: 0; }
.cap-check { width: 34px; height: 34px; flex: none; border-radius: 50%; background: var(--ok); display: grid; place-items: center; box-shadow: 0 0 0 3px var(--card), 0 4px 10px -2px rgba(18, 164, 107, .5); }
.cap-check svg { width: 20px; height: 20px; fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.cap-last-label { font-size: 12px; font-weight: 700; color: rgba(255, 255, 255, .85); text-transform: uppercase; letter-spacing: .08em; }
.cap-last-text { font-size: 17px; font-weight: 700; color: var(--text); word-break: break-word; }
.cap-last .btn.ghost { background: var(--card); }
.cap-last-hint { font-size: 13px; color: rgba(255, 255, 255, .88); margin: 12px 0 8px; font-weight: 500; }
.recat-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.recat-chips .chip { height: 38px; padding: 0 14px; }
.recat-chips .chip.active { background: var(--red); border-color: var(--red); color: #fff; }
.recat-chips .chip.custom.active { background: var(--c); border-color: var(--c); color: #fff; }
.recat-chips .chip.custom.active::before { background: var(--card); }
.cap-recent li .recat-chips { padding: 0 0 12px 68px; }

.cap-recent h3 { margin: 4px 0 10px; font-family: var(--display); font-size: 18px; font-weight: 700; color: var(--text); }
.cap-recent ul { list-style: none; margin: 0; padding: 0 4px; border-radius: var(--radius); }
.cap-recent li { border-bottom: 1px solid var(--line); padding: 0 10px; }
.cap-recent li:last-child { border-bottom: 0; }
.cap-row { display: flex; align-items: center; gap: 10px; min-height: 58px; }
.cap-time { width: 58px; flex: none; font-size: 12px; color: var(--muted); white-space: nowrap; }
.cap-text { flex: 1; min-width: 0; font-size: 15px; font-weight: 600; word-break: break-word; }
.type-pill { flex: none; height: 30px; min-width: 64px; padding: 0 12px; border-radius: 999px; border: 0; font-size: 12px; font-weight: 700; }
.type-pill.t-work    { background: rgba(79, 157, 255, .15); color: #8cc0ff; }
.type-pill.t-idea    { background: var(--lav-soft); color: #c4b5fd; }
.type-pill.t-grocery { background: rgba(52, 211, 153, .14); color: #5eead4; }
.type-pill.t-bill    { background: var(--red-soft); color: var(--red-dark); }
.type-pill.t-email   { background: rgba(255, 95, 174, .15); color: #ff8cc6; }
.type-pill.t-inbox   { background: var(--tile); color: var(--muted); border: 1px solid var(--line); }
.type-pill.t-list    { background: color-mix(in srgb, var(--c) 13%, var(--card)); color: color-mix(in srgb, var(--c) 70%, #fff); }

.cap-inbox-link {
  align-self: center; border: 1.5px solid var(--line-strong); background: var(--card); color: var(--text);
  font-weight: 600; font-size: 14px; padding: 10px 18px; border-radius: 999px; box-shadow: var(--shadow-sm);
}
.cap-inbox-link:hover { border-color: var(--red); color: var(--red); }

/* ---------- Today at a glance (Capture screen) ---------- */
.glance { background: linear-gradient(180deg, #25262e 0%, #1c1d23 100%); border: 1px solid rgba(255, 255, 255, .08); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 14px 8px; }
.glance-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.glance-head h3 { margin: 0; font-family: var(--display); font-size: 18px; font-weight: 700; color: var(--text); }
.glance-link, .glance-more { border: 0; background: transparent; color: var(--red); font-weight: 600; font-size: 13.5px; padding: 8px 0; }
.glance-more { display: block; padding: 4px 0 8px 48px; }
.glance-sub { margin: 10px 0 0; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.glance-list { list-style: none; margin: 0; padding: 0; }
.glance-row { display: flex; align-items: center; gap: 4px; min-height: 52px; border-bottom: 1px solid var(--line); }
.glance-row:last-child { border-bottom: 0; }
.glance-row .check { margin-left: -6px; }
.glance-main { flex: 1; min-width: 0; padding: 6px 0; cursor: pointer; }
.glance-title { font-size: 15.5px; font-weight: 600; color: var(--text); word-break: break-word; }
.glance-row.is-done .glance-title { color: var(--dim); text-decoration: line-through; }
.glance-empty { display: block; width: 100%; margin: 8px 0 8px; height: 46px; border-radius: 14px; border: 1.5px dashed var(--line-strong); background: transparent; color: var(--muted); font-weight: 600; font-size: 14.5px; }
.glance-empty:hover { border-color: var(--red); color: var(--red); }

.glance-date { font-family: var(--sans); font-size: 13px; font-weight: 500; color: var(--muted); margin-left: 6px; }
.glance-review { padding-left: 0; }

/* ---------- Task extras: @people, repeats, reminders ---------- */
.tag.person { background: rgba(79, 157, 255, .15); color: #8cc0ff; text-transform: none; letter-spacing: 0; font-size: 11.5px; }
.tag.repeat { background: rgba(52, 211, 153, .14); color: #5eead4; text-transform: none; letter-spacing: 0; font-size: 11.5px; }
.tag.remind { background: rgba(255, 204, 51, .14); color: var(--warn); text-transform: none; letter-spacing: 0; font-size: 11.5px; }
.task-meta .tag { margin-left: 2px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-row .chip.active, .reuse-chip.active { background: var(--red); border-color: var(--red); color: #fff; }
.field input[type="datetime-local"] {
  flex: 1 1 200px; width: auto; min-width: 0; height: 46px; border-radius: 14px; padding: 0 12px; font-size: 16px; color: var(--text);
  background: linear-gradient(180deg, #08090b 0%, #111217 100%); border: 1.5px solid rgba(255, 255, 255, .17);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, .7); color-scheme: dark; outline: none;
}
.field input[type="datetime-local"]:focus { border-color: #ff7a8f; }
.field > small { display: block; margin-top: 6px; }
.cal-btn { margin-top: 8px; height: auto; min-height: 38px; padding: 8px 12px; white-space: normal; text-align: left; }
.toggle-row { display: flex; gap: 10px; align-items: flex-start; margin: 0 2px 14px; font-size: 14px; color: var(--muted); line-height: 1.45; cursor: pointer; }
.toggle-row input { width: 20px; height: 20px; margin-top: 1px; accent-color: var(--red); flex: none; }
.toggle-row b { color: var(--text); }
.reuse-chip { height: 30px; padding: 0 10px; font-size: 12px; }

/* ---------- Search ---------- */
.search-input {
  width: 100%; height: 50px; border-radius: 14px; padding: 0 16px; font-size: 16px; color: var(--text); outline: none;
  background: linear-gradient(180deg, #08090b 0%, #111217 100%); border: 1.5px solid rgba(255, 255, 255, .17);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, .7);
}
.search-input:focus { border-color: #ff7a8f; box-shadow: inset 0 2px 6px rgba(0, 0, 0, .6), 0 0 0 4px rgba(255, 91, 127, .22); }
.search-results { list-style: none; margin: 12px 0 4px; padding: 0; min-height: 40vh; }
.search-results button {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 52px; padding: 8px 4px; text-align: left;
  border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--text);
}
.search-results button.is-done .search-title { color: var(--dim); text-decoration: line-through; }
.search-results .tag { flex: none; min-width: 64px; text-align: center; }
.search-title { flex: 1; min-width: 0; font-size: 15px; font-weight: 600; word-break: break-word; }
.search-hint { padding: 10px 4px; }

/* ---------- Weekly review ---------- */
.review-areas { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: -6px 0 4px; font-size: 13.5px; color: var(--muted); }
.review-areas span { display: inline-flex; align-items: center; gap: 6px; }
.review-areas b { color: var(--text); }
.review-stuck li { display: flex; flex-direction: column; align-items: stretch; gap: 8px; padding: 10px 0; }
.review-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.review-acts { display: flex; gap: 6px; flex-wrap: wrap; }
.review-acts .chip { height: 34px; }
.review-acts .chip.danger { margin-left: 0; }

/* ---------- Settings ---------- */
.accent-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.accent-opt {
  display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 12px; border-radius: 14px; font-weight: 600; font-size: 14.5px;
  background: var(--card); color: var(--text); border: 1.5px solid var(--line-strong);
}
.accent-opt i { width: 26px; height: 26px; border-radius: 50%; flex: none; }
.accent-opt.active { border-color: var(--text); box-shadow: 0 0 0 2px var(--red-soft); }
.set-note { margin: 0 0 8px; line-height: 1.5; }
.set-note b { color: var(--text); }

/* Text size: scales the main view and sheets; the top and bottom bars stay put. */
#view, .sheet { zoom: var(--zoom, 1); }

/* Color themes (Sunset is the default in :root) */
:root[data-accent="ocean"] {
  --red: #38bdf8; --red-dark: #0ea5e9; --red-soft: rgba(56, 189, 248, .16); --lav: #34d399; --lav-soft: rgba(52, 211, 153, .15);
  --grad-warm: linear-gradient(135deg, #34d399 0%, #38bdf8 52%, #6366f1 100%);
}
:root[data-accent="violet"] {
  --red: #c084fc; --red-dark: #a855f7; --red-soft: rgba(192, 132, 252, .16); --lav: #f472b6; --lav-soft: rgba(244, 114, 182, .15);
  --grad-warm: linear-gradient(135deg, #f472b6 0%, #a855f7 52%, #6366f1 100%);
}
:root[data-accent="ember"] {
  --red: #fb923c; --red-dark: #f97316; --red-soft: rgba(251, 146, 60, .16); --lav: #fde047; --lav-soft: rgba(253, 224, 71, .14);
  --grad-warm: linear-gradient(135deg, #fde047 0%, #fb923c 52%, #ef4444 100%);
}

/* ---------- Custom category sheet ---------- */
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { width: 38px; height: 38px; border-radius: 50%; border: 3px solid var(--card); background: var(--c); padding: 0; box-shadow: 0 0 0 1px var(--line-strong), var(--shadow-sm); }
.swatch.active { box-shadow: 0 0 0 2px var(--c), 0 4px 10px -2px color-mix(in srgb, var(--c) 60%, transparent); }
.cat-help { margin: 12px 2px 4px; line-height: 1.5; }
.cat-help b { color: var(--red); font-weight: 600; }
.cat-list { list-style: none; margin: 0; padding: 0; }
.cat-list li { display: flex; align-items: center; gap: 10px; min-height: 50px; border-bottom: 1px solid var(--line); }
.cat-list .cat-name { flex: 1; min-width: 0; font-weight: 600; }


/* =========================================================
   Charcoal theme accents: warm gradients on primary actions,
   vivid donut-style mic ring, dark text on vivid fills.
   ========================================================= */
.topbar, .tabbar { background: rgba(23, 24, 29, .94); }
.topbar { box-shadow: 0 1px 0 rgba(255, 255, 255, .04), 0 10px 24px -10px rgba(0, 0, 0, .8); }
.tabbar { box-shadow: 0 -1px 0 rgba(255, 255, 255, .04), 0 -10px 24px -10px rgba(0, 0, 0, .8); }
.brand::before { background-color: transparent; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round'%3E%3Crect x='9' y='3.5' width='6' height='10' rx='3'/%3E%3Cpath d='M6 11a6 6 0 0 0 12 0M12 17v3'/%3E%3C/svg%3E"), var(--grad-warm);
  background-repeat: no-repeat; background-position: center, center; background-size: 17px, cover; box-shadow: 0 4px 12px -2px rgba(255, 91, 127, .55); }
.brand-g { background: var(--grad-warm); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* primary actions + selected states: warm gradient */
.btn.gold, .btn.navy, .capture-btn, .diamond,
.cap-modes button.active, .prefix-chips button.active, .recat-chips .chip.active,
.seg button.active, .check[aria-pressed="true"] svg {
  background: var(--grad-warm); border-color: transparent; color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 8px 18px -6px rgba(255, 91, 127, .6);
}
.btn.gold:hover, .btn.navy:hover { background: var(--grad-warm); filter: brightness(1.08); }
.diamond { box-shadow: 0 0 0 5px var(--bar), 0 10px 24px -4px rgba(255, 91, 127, .6); }
.cap-modes button.custom.active, .recat-chips .chip.custom.active { background: var(--c); color: #121317; }
.cap-modes button.custom.active::before, .recat-chips .chip.custom.active::before { background: #121317; }
.view-toggle button.active { background: var(--tile); color: var(--text); box-shadow: var(--shadow); }
.view-toggle button.active { border-bottom: 0; }
.top-num, .score-line b, .eod-stats div:first-child b {
  background: var(--grad-warm); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.top-card:not(.empty)::before { background: var(--grad-warm); }
.progress > span { background: var(--grad-warm); box-shadow: 0 0 10px rgba(255, 91, 127, .45); }

/* mic: donut ring in the warm gradient */
.mic-btn {
  color: #ff8a5c;
  background: radial-gradient(circle at 50% 35%, #2a2b33, #18191e 75%) padding-box,
              conic-gradient(from 200deg, #ffb23e, #ff5b7f, #a855f7, #4f9dff, #ffb23e) border-box;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .5), 0 24px 50px -14px rgba(255, 91, 127, .45), inset 0 4px 12px rgba(0, 0, 0, .55);
}
.mic-wrap.listening .mic-btn {
  color: #fff;
  background: radial-gradient(circle at 50% 35%, #ff6f8f, #c13a8f 75%) padding-box,
              conic-gradient(#ffcc33 0 100%) border-box;
}
.mic-wrap.listening .mic-btn::after { border-color: #ffcc33; }
.mic-wrap.listening .mic-status { color: #ff8a5c; }
body:has(.mic-wrap.listening) .tabbar button.tab-center .diamond { background: linear-gradient(135deg, #ffcc33, #ff5b7f); }

/* "Saved" card: the vivid gradient hero */
.cap-last { box-shadow: 0 2px 6px rgba(0, 0, 0, .5), 0 22px 44px -16px rgba(255, 91, 127, .55); }
.cap-last .chip { background: rgba(18, 19, 23, .35); border-color: rgba(255, 255, 255, .25); color: #fff; box-shadow: none; }
.cap-last .chip.active { background: #fff; color: #c13a5f; }
.cap-last .btn.ghost { background: rgba(18, 19, 23, .35); border-color: rgba(255, 255, 255, .3); color: #fff; }
.cap-check { box-shadow: 0 0 0 3px rgba(255, 255, 255, .9); }

/* vivid fills get dark text */
.bubble text { fill: #121317; }
.rank { color: #121317; }
.bubble circle { stroke: var(--card); }
.toast { background: #2b2c34; color: var(--text); border: 1px solid var(--line-strong); }

/* bubble-chart hot zone + labels in the warm accent */
.bc-zone.hot { fill: rgba(255, 91, 127, .08); stroke: rgba(255, 138, 92, .6); }
.bc-zone-label.hot { fill: #ff8a5c; }

/* =========================================================
   Background fade + higher-contrast input wells
   ========================================================= */
/* Page: warm purple/orange glow at the top, fading to near-black below */
html { background: #0c0d10; }
body {
  background:
    radial-gradient(900px 520px at 85% -12%, rgba(168, 85, 247, .22), transparent 60%),
    radial-gradient(700px 460px at -15% 4%, rgba(255, 138, 60, .14), transparent 60%),
    radial-gradient(800px 600px at 50% 110%, rgba(255, 91, 127, .07), transparent 60%),
    linear-gradient(180deg, #1b1c23 0%, #121317 45%, #0c0d10 100%);
  background-attachment: fixed;
}

/* Raised surfaces: gentle top-lit gradient so they read above the wells */
.top-card, .task, .inbox-item, .simple-list li, .rank-list li, .idea-card, .chart-card,
.cap-recent ul, .pick-list button {
  background: linear-gradient(180deg, #25262e 0%, #1c1d23 100%);
  border-color: rgba(255, 255, 255, .08);
}
.sheet { background: linear-gradient(180deg, #24252d 0%, #1a1b21 220px); border-top: 1px solid rgba(255, 255, 255, .1); }

/* Wells: darker fill, lighter rim, top inner shadow + bottom highlight = cut into the surface */
.capture input, .cap-form input, .field textarea, .field input[type="date"], .field input[type="text"],
.inline-form input, .select-wrap select, .prompt-box {
  background-color: #0b0c0f;
  background-image: linear-gradient(180deg, #08090b 0%, #111217 100%);
  border: 1.5px solid rgba(255, 255, 255, .17);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, .7), 0 1px 0 rgba(255, 255, 255, .06);
  color: var(--text);
}
.select-wrap select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f2f2f6' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"),
                    linear-gradient(180deg, #08090b 0%, #111217 100%);
  background-repeat: no-repeat, no-repeat; background-position: right 12px center, 0 0; background-size: 16px, 100% 100%;
}
.capture input::placeholder, .cap-form input::placeholder, .field textarea::placeholder,
.field input::placeholder, .inline-form input::placeholder { color: #80839a; }

/* Focus: warm rim + glow */
.capture input:focus, .cap-form input:focus, .field textarea:focus, .field input:focus,
.inline-form input:focus, .select-wrap select:focus, .prompt-box:focus {
  border-color: #ff7a8f;
  background-image: linear-gradient(180deg, #0d0e12 0%, #15161c 100%);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, .6), 0 0 0 4px rgba(255, 91, 127, .22), 0 0 18px rgba(255, 91, 127, .18);
}
.select-wrap select:focus {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f2f2f6' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"),
                    linear-gradient(180deg, #0d0e12 0%, #15161c 100%);
}

/* Segmented controls & toggles share the well look */
.seg, .view-toggle {
  background: linear-gradient(180deg, #08090b 0%, #111217 100%);
  border: 1.5px solid rgba(255, 255, 255, .14);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, .7), 0 1px 0 rgba(255, 255, 255, .06);
}
.seg button:not(.active) { color: #a4a7b8; }
.check svg { background: #0b0c0f; border-color: rgba(255, 255, 255, .25); box-shadow: inset 0 2px 4px rgba(0, 0, 0, .7); }

/* Field labels a touch brighter so each input has a clear heading */
.field > span { color: #b4b6c6; }

/* ---------- Life Lists: larger, easier-to-read text ---------- */
body[data-tab="lists"] .section-head h2 { font-size: 25px; }
body[data-tab="lists"] .simple-list li { min-height: 64px; padding: 6px 6px 6px 4px; }
body[data-tab="lists"] .simple-text { font-size: 18px; line-height: 1.35; }
body[data-tab="lists"] .simple-side { font-size: 16px; }
body[data-tab="lists"] .simple-side .due { font-size: 15px; }
body[data-tab="lists"] .tag { font-size: 12px; padding: 3px 9px; }
body[data-tab="lists"] .check svg { width: 28px; height: 28px; }
body[data-tab="lists"] .phase-note { font-size: 15px; }
body[data-tab="lists"] .empty-state p { font-size: 15px; }
body[data-tab="lists"] .btn.small { height: 38px; font-size: 14px; }
