:root {
  --navy: #0f1f3d;
  --navy-2: #1c3561;
  --navy-soft: #e9edf5;
  --gold: #b8975a;
  --gold-deep: #9a7a40;
  --gold-soft: #f5efe3;
  --ink: #1a2233;
  --muted: #6b7385;
  --line: #e8e4db;
  --bg: #faf8f4;
  --card: #ffffff;
  --danger: #b3443a;
  --danger-soft: #fbecea;
  --warn: #c2801a;
  --ok: #2f7d55;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(15, 31, 61, .05), 0 4px 16px rgba(15, 31, 61, .06);
  --shadow-lg: 0 10px 40px rgba(15, 31, 61, .18);
  --tap: 48px;
  --serif: 'Cormorant Garamond', 'Iowan Old Style', Georgia, serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --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%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  padding-bottom: calc(84px + 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; }
.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; }

/* ---------- Top bar + capture ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: var(--navy);
  color: #fff;
  padding: calc(10px + var(--safe-t)) 16px 10px;
  box-shadow: 0 2px 18px rgba(15, 31, 61, .25);
}
.topbar-inner { max-width: var(--maxw); margin: 0 auto; }
.brand-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.brand {
  margin: 0; font-family: var(--serif); font-weight: 600; font-size: 23px; letter-spacing: .02em;
  color: #fff; white-space: nowrap;
}
.brand::after { content: ''; display: inline-block; width: 6px; height: 6px; margin-left: 6px; border-radius: 50%; background: var(--gold); vertical-align: middle; }
.date-label { color: #c9d1e2; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.capture { display: flex; gap: 8px; }
.capture input {
  flex: 1; min-width: 0; height: 52px; border: 1.5px solid transparent; border-radius: 14px;
  padding: 0 16px; font-size: 17px; background: #fff; color: var(--ink);
  outline: none; transition: border-color .15s, box-shadow .15s;
}
.capture input::placeholder { color: #98a0b0; }
.capture input:focus { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(184, 151, 90, .28); }
.capture-btn {
  width: 52px; height: 52px; flex: none; border: 0; border-radius: 14px;
  background: var(--gold); color: var(--navy); display: grid; place-items: center;
}
.capture-btn:active { transform: scale(.96); }

.capture-assist { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; }
.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: 1px solid rgba(255, 255, 255, .22); background: transparent; color: #dfe5f1; font-size: 13px;
}
.prefix-chips button.active { background: var(--gold); border-color: var(--gold); color: var(--navy); font-weight: 600; }
.capture-route { flex: none; font-size: 13px; color: var(--gold); font-weight: 600; min-width: 0; }

/* ---------- Layout ---------- */
.view { max-width: var(--maxw); margin: 0 auto; padding: 20px 16px 24px; }
.section { margin-bottom: 28px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.section-head h2 {
  margin: 0; font-family: var(--serif); font-weight: 600; font-size: 26px; color: var(--navy); letter-spacing: .01em;
}
.phase-note {
  background: var(--gold-soft); border: 1px solid #eadfc8; color: #6a5530;
  padding: 12px 14px; border-radius: var(--radius-sm); font-size: 14px; margin: 0 0 20px;
}

/* ---------- Top 3 ---------- */
.top-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.top-card {
  display: flex; align-items: center; gap: 12px; min-height: 76px;
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 12px 10px 12px 14px; border-left: 4px solid var(--gold);
}
.top-card.empty { min-height: 58px; padding-top: 4px; padding-bottom: 4px; background: transparent; box-shadow: none; border: 1.5px dashed #d8cfbd; border-left-width: 1.5px; padding-left: 14px; }
.top-card.empty .top-num { font-size: 28px; opacity: .7; }
.top-num {
  font-family: var(--serif); font-weight: 700; font-size: 34px; line-height: 1; color: var(--gold);
  width: 24px; text-align: center; flex: none;
}
.top-body { flex: 1; min-width: 0; cursor: pointer; }
.top-title { font-size: 18px; font-weight: 600; color: var(--navy); 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 { border-left-color: var(--ok); opacity: .8; }
.top-add {
  flex: 1; min-height: var(--tap); text-align: left; border: 0; background: transparent;
  color: var(--gold-deep); font-weight: 600; font-size: 16px;
}

/* ---------- Toolbar ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.select-wrap select {
  height: 40px; border-radius: 999px; border: 1px solid var(--line); background: var(--card);
  padding: 0 32px 0 14px; font-size: 14px; color: var(--navy); appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f1f3d' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 16px;
}
.btn {
  height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid transparent;
  font-size: 14px; font-weight: 600; white-space: nowrap;
}
.btn.small { height: 34px; padding: 0 12px; font-size: 13px; }
.btn.ghost { background: var(--card); border-color: var(--line); color: var(--navy); }
.btn.gold { background: var(--gold); color: var(--navy); }
.btn.navy { background: var(--navy); color: #fff; }
.btn.danger-ghost { background: transparent; border-color: #ecc9c5; color: var(--danger); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn:active:not(:disabled) { transform: scale(.97); }

/* ---------- Task list ---------- */
.task-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.task {
  display: flex; align-items: center; gap: 4px; min-height: 64px;
  background: var(--card); border-radius: var(--radius-sm); box-shadow: var(--shadow);
  padding: 6px 4px 6px 6px; position: relative; border-left: 3px solid var(--c, var(--line));
  transition: box-shadow .15s;
}
.task.dragging { z-index: 5; box-shadow: var(--shadow-lg); transition: none; }
.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: 500; color: var(--ink); 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: 3px; font-size: 12.5px; color: var(--muted); }
.area-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); display: inline-block; margin-right: -2px; 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: 50%; border: 2px solid #c6ccd8; padding: 3px;
  fill: none; stroke: transparent; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round;
  transition: all .15s;
}
.check:hover svg { border-color: var(--gold); }
.check[aria-pressed="true"] svg { background: var(--ok); border-color: var(--ok); stroke: #fff; }
.check.big svg { width: 30px; height: 30px; }

.icon-btn {
  width: 44px; height: 44px; flex: none; border: 0; background: transparent; border-radius: 10px;
  display: grid; place-items: center; color: #a3aab8;
}
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.icon-btn:hover { color: var(--navy); background: var(--navy-soft); }
.icon-btn.pin:hover { color: var(--gold-deep); background: var(--gold-soft); }

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

.score { font-weight: 600; font-size: 11.5px; padding: 2px 7px; border-radius: 999px; letter-spacing: .02em; }
.score.hot { background: #fbe6df; color: #a0381f; }
.score.warm { background: var(--gold-soft); color: #86672d; }
.score.cool { background: #eef1f6; color: #5b6478; }
.due { font-weight: 500; }
.due.overdue { color: var(--danger); font-weight: 600; }
.due.today { color: var(--warn); font-weight: 600; }
.due.soon { color: var(--gold-deep); }
.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: 28px 16px; color: var(--muted); border: 1.5px dashed var(--line);
  border-radius: var(--radius); background: rgba(255, 255, 255, .5);
}
.empty-state.small { padding: 16px; }
.empty-state p { margin: 0; }
.empty-state b, .phase-note b { color: var(--navy); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .92em; }

/* ---------- Inbox & simple lists ---------- */
.inbox-list, .simple-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.inbox-item { background: var(--card); border-radius: var(--radius-sm); box-shadow: var(--shadow); padding: 14px; }
.inbox-text { font-size: 16px; margin-bottom: 10px; word-break: break-word; }
.route-row { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--bg); color: var(--navy); font-size: 13.5px; font-weight: 500;
}
.chip:hover { border-color: var(--gold); background: var(--gold-soft); }
.chip.danger { color: var(--danger); margin-left: auto; }
.chip.danger:hover { background: var(--danger-soft); border-color: #ecc9c5; }

.simple-list li {
  display: flex; align-items: center; gap: 6px; min-height: 56px;
  background: var(--card); border-radius: var(--radius-sm); box-shadow: var(--shadow); padding: 4px 4px 4px 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; }
.simple-side { font-size: 14px; font-weight: 600; color: var(--navy); white-space: nowrap; display: flex; gap: 8px; align-items: center; }
.tag {
  display: inline-block; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em;
  padding: 2px 8px; border-radius: 999px; background: var(--navy-soft); color: var(--navy-2); white-space: nowrap;
}
.tag.personal { background: #f1e8f0; color: #8a4c7b; }
.tag.gold { background: var(--gold-soft); color: var(--gold-deep); }

/* ---------- Tab bar ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; justify-content: center; gap: 4px;
  background: rgba(255, 255, 255, .96); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  padding: 6px 8px calc(6px + var(--safe-b));
}
.tabbar button {
  flex: 1; max-width: 160px; min-height: 58px; border: 0; background: transparent; border-radius: 12px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: #8a92a3; font-size: 11.5px; font-weight: 600; position: relative;
}
.tabbar svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tabbar button.active { color: var(--navy); }
.tabbar button.active::before {
  content: ''; position: absolute; top: 0; width: 28px; height: 3px; border-radius: 0 0 3px 3px; background: var(--gold);
}
.badge {
  position: absolute; top: 6px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--gold); color: var(--navy); font-size: 11px; line-height: 18px; text-align: center;
}

/* ---------- 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(15, 31, 61, .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: 22px 22px 0 0; box-shadow: var(--shadow-lg);
  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: 40px; height: 5px; border-radius: 3px; background: #dcd7cc; margin: 4px auto 10px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; gap: 12px; }
.sheet-head h3 { margin: 0; font-family: var(--serif); font-size: 26px; font-weight: 600; color: var(--navy); }

.field { display: block; margin-bottom: 16px; }
.field > span { display: block; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 6px; }
.field textarea, .field input[type="date"], .inline-form input {
  width: 100%; border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px; font-size: 16px;
  background: #fff; outline: none; resize: vertical;
}
.field textarea:focus, .field input:focus, .inline-form input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(184, 151, 90, .2); }
.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: 6px; }
.area-chip {
  min-height: 38px; padding: 0 12px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff;
  font-size: 13.5px; color: var(--ink); display: inline-flex; align-items: center; gap: 6px;
}
.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%, #fff); font-weight: 600; }

.seg { display: grid; grid-template-columns: repeat(5, 1fr); border: 1.5px solid var(--line); border-radius: 12px; overflow: hidden; }
.seg button { height: 46px; border: 0; background: #fff; font-weight: 600; color: var(--muted); border-right: 1px solid var(--line); }
.seg button:last-child { border-right: 0; }
.seg button.active { background: var(--navy); color: #fff; }
.seg-labels { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); margin-top: 4px; }

.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: 8px 0 6px; }
.sheet-actions .btn { height: 46px; }

.inline-form { display: flex; gap: 8px; margin-bottom: 14px; }
.inline-form .btn { height: 48px; }
.pick-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.pick-list button {
  width: 100%; min-height: 52px; display: flex; align-items: center; gap: 10px; text-align: left;
  border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 8px 12px;
}
.pick-list button:hover { border-color: var(--gold); background: var(--gold-soft); }
.pick-title { flex: 1; min-width: 0; }

.eod-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 16px; }
.eod-stats div { background: var(--bg); border-radius: 12px; padding: 12px; text-align: center; }
.eod-stats b { display: block; font-family: var(--serif); font-size: 32px; color: var(--navy); line-height: 1.1; }
.eod-stats span { font-size: 12px; color: var(--muted); }
.eod-h { margin: 14px 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.eod-list { list-style: none; margin: 0; padding: 0; }
.eod-list li { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.eod-list li.ok { color: var(--ink); }

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

/* ---------- Desktop ---------- */
@media (min-width: 900px) {
  .view { padding-top: 28px; }
  .task-title { font-size: 15.5px; }
}

/* =========================================================
   Phase 2 — charts, view toggles, Idea Lab
   ========================================================= */
.view.wide { max-width: 1180px; }
.gold-text { color: var(--gold-deep); }

.view-toggle {
  display: inline-flex; background: var(--navy-soft); border-radius: 999px; padding: 4px; gap: 2px; margin-bottom: 12px;
}
.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(--navy); box-shadow: 0 1px 4px rgba(15, 31, 61, .12); }

/* bubble chart */
.chart-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px 12px 10px; margin-bottom: 14px; }
.bubble-chart { width: 100%; max-width: 520px; height: auto; display: block; margin: 0 auto; font-family: var(--sans); }
.bc-plot { fill: #fcfbf8; stroke: var(--line); }
.bc-grid { stroke: #eeeae2; stroke-width: 1; }
.bc-zone.hot { fill: rgba(184, 151, 90, .16); stroke: rgba(184, 151, 90, .55); stroke-width: 1.2; stroke-dasharray: 4 3; }
.bc-zone.soft { fill: transparent; }
.bc-zone-label { font-size: 10px; font-weight: 600; letter-spacing: .08em; fill: #b4b9c4; text-transform: uppercase; }
.bc-zone-label.hot { fill: var(--gold-deep); font-size: 11.5px; font-weight: 700; letter-spacing: .12em; }
.bc-tick { font-size: 10.5px; fill: var(--muted); }
.bc-axis { font-size: 11px; font-weight: 600; fill: var(--navy); letter-spacing: .04em; }
.bubble { cursor: pointer; outline: none; }
.bubble circle { fill-opacity: .88; stroke: #fff; stroke-width: 2; transition: transform .15s; transform-box: fill-box; transform-origin: center; }
.bubble text { fill: #fff; font-size: 11px; font-weight: 700; pointer-events: none; }
.bubble:hover circle, .bubble:focus circle { fill-opacity: 1; transform: scale(1.12); }
.bubble:focus-visible circle { stroke: var(--navy); 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(--gold-deep); }

.rank-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.rank-list li {
  display: flex; align-items: center; gap: 8px; min-height: 58px;
  background: var(--card); border-radius: var(--radius-sm); box-shadow: var(--shadow); padding: 4px 4px 4px 10px;
}
.rank {
  width: 28px; height: 28px; flex: none; border-radius: 50%; background: var(--c); color: #fff;
  display: grid; place-items: center; font-size: 12.5px; font-weight: 700;
}

/* idea cards */
.idea-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.idea-card {
  display: flex; align-items: center; gap: 10px; min-height: 72px;
  background: var(--card); border-radius: var(--radius-sm); box-shadow: var(--shadow);
  padding: 8px 4px 8px 10px; border-left: 3px solid var(--s);
}
.idea-score {
  width: 54px; flex: none; text-align: center; border-right: 1px solid var(--line); padding-right: 8px;
}
.idea-score b { display: block; font-family: var(--serif); font-size: 26px; line-height: 1; color: var(--navy); }
.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: 4px 0; }
.idea-title { font-weight: 600; color: var(--ink); word-break: break-word; }
.tag.app { background: var(--gold-soft); color: var(--gold-deep); text-transform: none; letter-spacing: 0; font-size: 11.5px; }
.tag.status { background: color-mix(in srgb, var(--s) 14%, #fff); color: color-mix(in srgb, var(--s) 75%, #000); }
.icon-btn.copy:hover { color: var(--gold-deep); background: var(--gold-soft); }
.icon-btn:disabled { opacity: .25; cursor: default; background: transparent; }

/* 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;
}
.board-col {
  scroll-snap-align: start; background: #f1eee8; border-radius: var(--radius); padding: 10px; min-height: 200px;
  border-top: 3px solid var(--s); transition: background .15s;
}
.board-col.drop-target { background: var(--gold-soft); outline: 2px dashed var(--gold); outline-offset: -2px; }
.board-col header {
  display: flex; justify-content: space-between; align-items: center; padding: 2px 4px 10px;
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--navy);
}
.board-col header b { background: var(--card); border-radius: 999px; padding: 1px 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: 44px; }
.board-card .idea-score b { font-size: 21px; }
.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: 2px; padding-top: 2px; }
.move-btns .icon-btn { width: 40px; height: 34px; }
.board-empty { font-size: 13px; color: #a7adb9; text-align: center; padding: 18px 8px; border: 1.5px dashed #ddd6c8; border-radius: 10px; }

/* idea sheet bits */
.select-wrap.block select { width: 100%; height: 46px; border-radius: 12px; font-size: 16px; }
.field em.opt { font-style: normal; text-transform: none; letter-spacing: 0; font-weight: 400; color: #a0a6b3; margin-left: 6px; }
.score-line { display: flex; align-items: baseline; gap: 8px; margin: -4px 0 16px; color: var(--navy); font-weight: 600; }
.score-line b { font-family: var(--serif); font-size: 28px; color: var(--gold-deep); }
#i-newapp { margin-top: 8px; }
.prompt-box {
  width: 100%; border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px; background: #fbfaf7;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; line-height: 1.5; resize: vertical; outline: none;
}
.prompt-box:focus { border-color: var(--gold); }
.idea-score b, .score-line b, .eod-stats b, .top-num { font-variant-numeric: lining-nums tabular-nums; }
.board { scroll-padding-left: 16px; }
@media (min-width: 1000px) { .board { grid-auto-columns: minmax(0, 1fr); overflow-x: visible; margin: 0; padding-left: 0; padding-right: 0; } }

/* =========================================================
   Capture screen (voice-first)
   ========================================================= */
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: 18px; padding-top: 4px; }

.cap-modes {
  display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px;
}
.cap-modes::-webkit-scrollbar { display: none; }
.cap-modes button {
  flex: none; height: 38px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--card); color: var(--navy); font-size: 14px; font-weight: 600;
}
.cap-modes button.active { background: var(--navy); border-color: var(--navy); color: #fff; }

.mic-wrap { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 18px 0 6px; }
.mic-btn {
  width: 148px; height: 148px; border-radius: 50%; border: 0; position: relative;
  background: radial-gradient(circle at 35% 30%, #d2b47c, var(--gold) 55%, var(--gold-deep));
  color: var(--navy); display: grid; place-items: center;
  box-shadow: 0 14px 36px rgba(154, 122, 64, .38), inset 0 -4px 10px rgba(0, 0, 0, .12);
  transition: transform .12s;
}
.mic-btn:active { transform: scale(.95); }
.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 { background: radial-gradient(circle at 35% 30%, #2a4a80, var(--navy)); color: #fff; }
.mic-wrap.listening .mic-btn svg { fill: currentColor; stroke: none; width: 42px; height: 42px; }
.mic-wrap.listening .mic-btn::before, .mic-wrap.listening .mic-btn::after {
  content: ''; position: absolute; inset: -10px; border-radius: 50%; border: 2px solid var(--gold);
  animation: mic-pulse 1.6s ease-out infinite; pointer-events: none;
}
.mic-wrap.listening .mic-btn::after { animation-delay: .8s; }
@keyframes mic-pulse { from { transform: scale(.92); opacity: .9; } to { transform: scale(1.35); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .mic-wrap.listening .mic-btn::before, .mic-wrap.listening .mic-btn::after { animation: none; opacity: .6; } }

.mic-status { font-family: var(--serif); font-size: 22px; font-weight: 600; color: var(--navy); text-align: center; }
.live-transcript { min-height: 24px; max-width: 520px; text-align: center; font-size: 18px; color: var(--ink); 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: 52px; border: 1.5px solid var(--line); border-radius: 14px; padding: 0 16px;
  font-size: 17px; background: #fff; outline: none;
}
.cap-form input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(184, 151, 90, .2); }
.cap-form .btn { height: 52px; border-radius: 14px; padding: 0 20px; }

.cap-last {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px;
  border-left: 4px solid var(--ok);
}
@keyframes cap-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.cap-last-head { display: flex; align-items: center; gap: 12px; }
.cap-last-head > div { flex: 1; min-width: 0; }
.cap-check { width: 32px; height: 32px; flex: none; border-radius: 50%; background: var(--ok); display: grid; place-items: center; }
.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: 13px; font-weight: 700; color: var(--ok); text-transform: uppercase; letter-spacing: .06em; }
.cap-last-text { font-size: 17px; font-weight: 500; color: var(--ink); word-break: break-word; }
.cap-last-hint { font-size: 13px; color: var(--muted); margin: 12px 0 8px; }
.recat-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.recat-chips .chip { height: 40px; padding: 0 15px; }
.recat-chips .chip.active { background: var(--navy); border-color: var(--navy); color: #fff; }
.cap-recent li .recat-chips { padding: 0 0 10px 54px; }

.cap-recent h3 { margin: 4px 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.cap-recent ul { list-style: none; margin: 0; padding: 0; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
.cap-recent li { border-bottom: 1px solid var(--line); padding: 0 12px; }
.cap-recent li:last-child { border-bottom: 0; }
.cap-row { display: flex; align-items: center; gap: 10px; min-height: 54px; }
.cap-time { width: 44px; flex: none; font-size: 12px; color: var(--muted); }
.cap-text { flex: 1; min-width: 0; font-size: 15px; word-break: break-word; }
.type-pill {
  flex: none; height: 32px; min-width: 64px; padding: 0 12px; border-radius: 999px; border: 0;
  font-size: 12.5px; font-weight: 700; background: var(--navy-soft); color: var(--navy-2);
}
.type-pill.t-work { background: #e6ecf7; color: #1f4e8c; }
.type-pill.t-idea { background: var(--gold-soft); color: var(--gold-deep); }
.type-pill.t-grocery { background: #e3f1ea; color: #2f7d55; }
.type-pill.t-bill { background: #fbe9e4; color: #a3452f; }
.type-pill.t-email { background: #efe9f7; color: #6b4fa0; }
.type-pill.t-inbox { background: #eef0f3; color: #5b6478; }

.cap-inbox-link {
  align-self: center; border: 0; background: transparent; color: var(--gold-deep); font-weight: 600; font-size: 15px;
  padding: 10px 14px; border-radius: 10px;
}
.cap-inbox-link:hover { background: var(--gold-soft); }
.cap-time { width: 58px; white-space: nowrap; font-size: 11.5px; }
.cap-last.fresh { animation: cap-in .25s ease-out; }
.brand-g { color: var(--gold); }
