/* idea. — 想法孵化器 · 本地样例 */

:root {
  color-scheme: light;
  --bg: #f6f6f3;
  --surface: #ffffff;
  --surface-2: #fbfbf9;
  --ink: #1c1c1f;
  --muted: #6b6b73;
  --faint: #98989f;
  --border: #e5e4df;
  --border-strong: #d3d2cb;
  --accent: #5b5bd6;
  --accent-soft: #ececfb;
  --accent-ink: #4444c7;
  --green: #2f9e70;
  --green-soft: #e7f5ee;
  --amber: #b47a12;
  --amber-soft: #fbf1dd;
  --rose: #c44d6a;
  --rose-soft: #fbe9ee;
  --blue: #336fc4;
  --blue-soft: #e8f0fb;
  --violet: #7a5af8;
  --violet-soft: #efeafd;
  --gray-soft: #f0f0ec;
  --shadow: 0 1px 2px rgba(20, 20, 25, .04);
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #141418;
  --surface: #1b1b20;
  --surface-2: #17171b;
  --ink: #e9e9ec;
  --muted: #9a9aa4;
  --faint: #6e6e78;
  --border: #2a2a31;
  --border-strong: #3a3a43;
  --accent: #8b8bf0;
  --accent-soft: #232338;
  --accent-ink: #b4b4ff;
  --green: #4cc38a;
  --green-soft: #1b2e25;
  --amber: #d9a441;
  --amber-soft: #2e2617;
  --rose: #e0708c;
  --rose-soft: #2f1d24;
  --blue: #6aa6f5;
  --blue-soft: #1a2536;
  --violet: #a78bfa;
  --violet-soft: #251f3d;
  --gray-soft: #202026;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
[id] { scroll-margin-top: 80px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 14.5px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; }

.shell { display: flex; min-height: 100vh; }

/* ---------- 侧栏 ---------- */
.side {
  width: 232px;
  flex: 0 0 232px;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 26px 14px 18px;
  background: var(--surface-2);
  border-right: 1px solid var(--border);
}

.brand {
  font: 700 23px/1 "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  color: var(--ink);
  letter-spacing: -1px;
  padding: 0 10px;
}
.brand span { color: var(--accent); }
.brand:hover { text-decoration: none; }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 7px;
  color: var(--muted);
  font-size: 13.5px;
}
.nav-item:hover { background: var(--gray-soft); color: var(--ink); text-decoration: none; }
.nav-item.active { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.nav-item .n {
  font: 11px/1 ui-monospace, Menlo, monospace;
  color: var(--faint);
  background: var(--gray-soft);
  border-radius: 999px;
  padding: 3px 7px;
}
.nav-item.active .n { background: var(--surface); color: var(--accent-ink); }

.side-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
}
.demo-tag { font-size: 10.5px; color: var(--faint); line-height: 1.4; }

#themeBtn {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 999px;
  width: 28px;
  height: 28px;
  cursor: pointer;
  font-size: 12px;
  padding: 0;
}
#themeBtn:hover { border-color: var(--accent); }

/* ---------- 主区 ---------- */
.main {
  flex: 1;
  min-width: 0;
  max-width: 1180px;
  margin: 0 auto;
  padding: 38px 42px 90px;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}
.page-head h1 { margin: 0; font-size: 27px; letter-spacing: -0.6px; }
.sub { margin: 4px 0 0; color: var(--muted); font-size: 13.5px; }
.count { font: 12px/1 ui-monospace, Menlo, monospace; color: var(--faint); white-space: nowrap; }

.section {
  font-size: 13px;
  font-weight: 500;
  color: var(--faint);
  letter-spacing: .04em;
  margin: 30px 0 10px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--border);
}

/* ---------- 捕获 ---------- */
.capture {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: var(--shadow);
  transition: border-color .15s, box-shadow .15s;
}
.capture:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.capture-row { display: flex; gap: 10px; align-items: center; }
.capture input[name="title"] {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--ink);
  font-size: 16px;
  padding: 6px 2px;
}
.capture input::placeholder { color: var(--faint); }
.capture-row button {
  flex: 0 0 auto;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  border-radius: 7px;
  padding: 7px 16px;
  font-size: 13px;
  cursor: pointer;
}
.capture-row button:hover { filter: brightness(1.08); }
.capture textarea {
  width: 100%;
  margin-top: 4px;
  border: 0;
  outline: none;
  resize: vertical;
  background: transparent;
  color: var(--muted);
  font: 13px/1.6 inherit;
  padding: 4px 2px;
}

/* ---------- 列表 ---------- */
.list { display: flex; flex-direction: column; gap: 8px; }
.row {
  display: flex;
  gap: 12px;
  align-items: stretch;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0;
  overflow: hidden;
  color: var(--ink);
  box-shadow: var(--shadow);
  transition: border-color .15s;
}
.row:hover { border-color: var(--border-strong); text-decoration: none; }
.stage-bar { flex: 0 0 4px; background: var(--gray-soft); }
.stage-bar.stage-inbox { background: var(--faint); }
.stage-bar.stage-0 { background: var(--faint); }
.stage-bar.stage-1 { background: var(--amber); }
.stage-bar.stage-2 { background: var(--blue); }
.stage-bar.stage-3 { background: var(--violet); }
.stage-bar.stage-4 { background: var(--rose); }
.stage-bar.stage-5 { background: var(--green); }
.stage-bar.stage-parked { background: var(--border-strong); }
.row-main { flex: 1; min-width: 0; padding: 11px 12px 11px 2px; }
.row-title { font-size: 15px; font-weight: 600; letter-spacing: -0.1px; }
.row-raw {
  color: var(--muted);
  font-size: 12.5px;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.row-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  gap: 6px;
  padding: 11px 12px;
}
.time { color: var(--faint); font-size: 11.5px; white-space: nowrap; }

/* 最近动态 */
.recent-list { display: flex; flex-direction: column; }
.recent-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 2px;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
}
.recent-row:last-child { border-bottom: 0; }
.recent-row:hover { color: var(--ink); text-decoration: none; }
.recent-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- 阶段 chip ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .02em;
  white-space: nowrap;
}
.stage-0 { background: var(--gray-soft); color: var(--muted); }
.stage-1 { background: var(--amber-soft); color: var(--amber); }
.stage-2 { background: var(--blue-soft); color: var(--blue); }
.stage-3 { background: var(--violet-soft); color: var(--violet); }
.stage-4 { background: var(--rose-soft); color: var(--rose); }
.stage-5 { background: var(--green-soft); color: var(--green); }

/* ---------- 进行中卡片 ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 12px;
}
.idea-card {
  display: flex;
  flex-direction: column;
  gap: 9px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 15px 16px;
  color: var(--ink);
  box-shadow: var(--shadow);
  transition: border-color .15s, transform .1s;
}
.idea-card:hover { border-color: var(--accent); text-decoration: none; }
.idea-card.stale { border-left: 3px solid var(--amber); }
.card-top { display: flex; align-items: center; justify-content: space-between; }
.updated { font-size: 11px; color: var(--faint); }
.idea-card h3 { margin: 0; font-size: 15.5px; letter-spacing: -0.2px; }
.problem {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.next {
  display: flex;
  align-items: baseline;
  gap: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12.5px;
}
.next .label {
  font: 10px/1.4 ui-monospace, Menlo, monospace;
  color: var(--faint);
  letter-spacing: .08em;
  flex: 0 0 auto;
}
.next .text { flex: 1; min-width: 0; }
.next .due { flex: 0 0 auto; color: var(--faint); font-size: 11px; }
.next.overdue { border-color: color-mix(in srgb, var(--rose) 40%, var(--border)); }
.next.overdue .due { color: var(--rose); }
.next.due .due { color: var(--amber); }
.review-line { font-size: 11.5px; color: var(--faint); }
.review-line .date.overdue { color: var(--rose); }
.review-line .date.soon { color: var(--amber); }

/* ---------- 详情 ---------- */
.crumbs { font-size: 12.5px; margin-bottom: 12px; }
.crumbs a { color: var(--muted); }
.idea-head { margin-bottom: 22px; }
.idea-title-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.idea-title-row h1 { margin: 0; font-size: 27px; letter-spacing: -0.6px; line-height: 1.3; }
.status {
  font-size: 11px;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--gray-soft);
  color: var(--muted);
}
.status.active { background: var(--accent-soft); color: var(--accent-ink); }
.status.parked { background: var(--amber-soft); color: var(--amber); }
.status.done { background: var(--green-soft); color: var(--green); }
.status.killed { background: var(--gray-soft); color: var(--faint); }

.stepper {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 16px;
  overflow-x: auto;
  padding-bottom: 2px;
}
.step-form { margin: 0; flex: 0 0 auto; }
.step {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--faint);
  border-radius: 999px;
  padding: 4px 11px 4px 5px;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
}
.step:hover { text-decoration: none; border-color: var(--accent); color: var(--accent-ink); }
.step-hint { margin: 7px 0 0; font-size: 11.5px; color: var(--faint); }
.step .dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--gray-soft);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: 10px/1 ui-monospace, Menlo, monospace;
}
.step.done { color: var(--muted); border-color: var(--border); }
.step.done .dot { background: var(--green-soft); color: var(--green); }
.step.current { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.step.current .dot { background: var(--accent); color: #fff; }
.step:hover { border-color: var(--accent); }

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 296px;
  gap: 18px;
  align-items: start;
}
.detail-side { position: sticky; top: 22px; display: flex; flex-direction: column; gap: 12px; }

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}
.side-panel { margin-bottom: 0; }
.panel-label {
  font: 10.5px/1.4 ui-monospace, Menlo, monospace;
  color: var(--faint);
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.panel-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 10px;
}
.panel-head h2 { margin: 0; font-size: 15px; letter-spacing: -0.1px; }
.hint { color: var(--faint); font-size: 11.5px; }
.mini {
  font: 10.5px/1 ui-monospace, Menlo, monospace;
  color: var(--faint);
  margin-left: 4px;
}
.raw-panel blockquote {
  margin: 0;
  padding: 2px 0 2px 14px;
  border-left: 3px solid var(--accent);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}

/* 表单 */
.field-form { display: flex; flex-direction: column; gap: 11px; }
.field-form label, .next-dates label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12px;
  color: var(--muted);
}
.field-form textarea, .field-form input,
.next-form input, .inline-add input, .update-form textarea,
.update-form input, .update-form select, .exp-close textarea, .exp-close select {
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface-2);
  color: var(--ink);
  padding: 8px 10px;
  font: 13.5px/1.6 inherit;
  outline: none;
  resize: vertical;
}
.field-form textarea:focus, .next-form input:focus, .inline-add input:focus,
.update-form textarea:focus, .update-form input:focus {
  border-color: var(--accent);
}
.form-actions { display: flex; justify-content: flex-end; }
.form-actions button, .next-dates button, .inline-add button,
.update-form button, .exp-close button {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  border-radius: 6px;
  padding: 6px 14px;
  font-size: 12.5px;
  cursor: pointer;
  white-space: nowrap;
}
.form-actions button:hover, .next-dates button:hover,
.inline-add button:hover, .update-form button:hover, .exp-close button:hover {
  filter: brightness(1.08);
}

.next-form { display: flex; flex-direction: column; gap: 8px; }
.next-form > input { width: 100%; }
.next-dates { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.next-dates label { flex: 0 1 150px; }
.next-dates input { width: 100%; }

.inline-add { display: flex; gap: 6px; margin-top: 10px; }
.inline-add input[name="title"] { flex: 1; }
.inline-add input[name="url"] { flex: 1.4; }
.inline-add input[name="question"] { flex: 1; }

/* 问题 */
.questions { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.q { display: flex; align-items: flex-start; gap: 9px; font-size: 13.5px; }
.q form { margin: 0; }
.q-check {
  width: 19px;
  height: 19px;
  border-radius: 5px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--green);
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.q.answered span { color: var(--faint); text-decoration: line-through; }
.q.answered .q-check { background: var(--green-soft); border-color: var(--green); }
.q-empty { color: var(--faint); font-size: 13px; }

/* 实验 */
.exp {
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 11px 13px;
  margin-bottom: 9px;
  background: var(--surface-2);
}
.exp.closed { opacity: .82; }
.exp-head { display: flex; justify-content: space-between; margin-bottom: 7px; }
.exp-status { font-size: 11px; color: var(--accent-ink); font-weight: 600; }
.exp.closed .exp-status { color: var(--green); }
.exp-h { font-size: 13px; margin: 3px 0; line-height: 1.55; }
.exp-h .label {
  font: 10px/1 ui-monospace, Menlo, monospace;
  color: var(--faint);
  margin-right: 6px;
  letter-spacing: .06em;
}
.exp-result {
  margin-top: 7px;
  font-size: 12px;
  color: var(--green);
  font-weight: 600;
}
.exp-close { display: flex; gap: 6px; margin-top: 9px; flex-wrap: wrap; }
.exp-close textarea { flex: 1 1 220px; }
.exp-close select { flex: 0 0 auto; }
.add-exp { margin-top: 6px; }
.add-exp summary {
  cursor: pointer;
  font-size: 12.5px;
  color: var(--muted);
  padding: 5px 0;
}
.add-exp summary:hover { color: var(--accent-ink); }
.add-exp .field-form { margin-top: 8px; }

/* 时间线 */
.update-form {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 7px;
  margin-bottom: 14px;
}
.update-form select { grid-row: span 2; align-self: start; }
.update-form textarea { grid-column: 2; }
.update-form input, .update-form button { grid-column: 2; }
.update-form button { justify-self: start; }

.timeline { display: flex; flex-direction: column; }
.tl-item {
  padding: 9px 0 9px 13px;
  border-left: 2px solid var(--border);
  position: relative;
}
.tl-item::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 15px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--border-strong);
}
.tl-item:first-child::before { border-color: var(--accent); }
.tl-head { display: flex; align-items: center; gap: 8px; margin-bottom: 3px; }
.tl-body { font-size: 13.5px; line-height: 1.65; }
.tl-link { font-size: 11.5px; }
.kind {
  font-size: 10.5px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--gray-soft);
  color: var(--muted);
}
.k-research { background: var(--blue-soft); color: var(--blue); }
.k-feedback { background: var(--green-soft); color: var(--green); }
.k-experiment { background: var(--violet-soft); color: var(--violet); }
.k-decision { background: var(--rose-soft); color: var(--rose); }
.k-capture { background: var(--gray-soft); color: var(--faint); }

/* 侧栏操作 */
/* 侧栏里的“添加来源”表单竖排，避免横向溢出 */
.detail-side .inline-add { flex-direction: column; }
.detail-side .inline-add input { width: 100%; }
.detail-side .inline-add button { align-self: flex-start; }

.wip-warn {
  background: var(--amber-soft);
  border: 1px solid color-mix(in srgb, var(--amber) 30%, var(--border));
  color: var(--amber);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12.5px;
  margin: -8px 0 14px;
}
.wip-warn strong { margin-right: 6px; }

.stage-actions, .status-actions { display: flex; flex-wrap: wrap; gap: 5px; }
.inline-form { margin: 0; }
.mini-btn {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 11.5px;
  cursor: pointer;
}
.mini-btn:hover { border-color: var(--accent); color: var(--accent-ink); }

.status-actions.big { gap: 8px; }
.status-actions.big .mini-btn {
  padding: 7px 16px;
  font-size: 13px;
  border-radius: 7px;
}
.status-actions.big .mini-btn:hover { background: var(--accent-soft); }
.decision-hint { margin: 10px 0 0; font-size: 12px; color: var(--faint); }

.k-mini {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 12px;
  margin-bottom: 8px;
  background: var(--surface-2);
}
.k-mini-title { font-size: 13.5px; font-weight: 600; margin-bottom: 3px; }
.k-mini p { margin: 0 0 4px; font-size: 12.5px; color: var(--muted); line-height: 1.6; }
.k-mini .time { font-size: 11px; }

.meta { margin: 0; display: grid; grid-template-columns: 62px 1fr; gap: 5px 8px; font-size: 12.5px; }
.meta dt { color: var(--faint); }
.meta dd { margin: 0; color: var(--muted); }

.source-link {
  display: block;
  font-size: 12.5px;
  padding: 5px 0;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
}
.source-link:last-of-type { border-bottom: 0; }
.source-link:hover { color: var(--accent-ink); }

/* ---------- 复盘 ---------- */
.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 8px;
}
.metric {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  box-shadow: var(--shadow);
}
.metric .num { font: 600 27px/1.1 "JetBrains Mono", ui-monospace, monospace; letter-spacing: -1px; }
.metric .lab { font-size: 12px; color: var(--muted); }

.tl-item.compact { text-decoration: none; color: var(--ink); display: block; }
.tl-item.compact:hover { background: var(--surface-2); text-decoration: none; }
.tl-title { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.tl-item.compact .time { margin-left: auto; }

/* ---------- 知识库 ---------- */
.knowledge {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
}
.kcard {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  box-shadow: var(--shadow);
}
.kcard h3 { margin: 0 0 7px; font-size: 15px; letter-spacing: -0.1px; }
.kcard p { margin: 0 0 12px; font-size: 13.5px; color: var(--muted); line-height: 1.65; }
.kmeta { font-size: 11.5px; color: var(--faint); }

.empty { color: var(--faint); font-size: 13px; padding: 14px 2px; }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .shell { display: block; }
  .side {
    width: auto;
    height: auto;
    position: sticky;
    z-index: 20;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
    background: var(--surface-2);
  }
  .brand { font-size: 18px; padding: 0; }
  .nav {
    flex-direction: row;
    gap: 0;
    overflow-x: auto;
    min-width: 0;
    scrollbar-width: none;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav-item { padding: 5px 7px; white-space: nowrap; font-size: 12.5px; }
  .nav-item .n { display: none; }
  .side-foot { margin: 0 0 0 auto; padding: 0; flex: 0 0 auto; }
  .demo-tag { display: none; }
  .main { padding: 22px 16px 70px; }
  .metric { padding: 11px 13px; }
  .metric .num { font-size: 22px; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-side { position: static; }
  .idea-title-row h1 { font-size: 22px; }
  .page-head h1 { font-size: 23px; }
  .capture input[name="title"] { font-size: 15px; }
  .cards { grid-template-columns: 1fr; }
  .row-meta { padding: 9px 10px; }
  .update-form { grid-template-columns: 1fr; }
  .update-form select, .update-form textarea, .update-form input, .update-form button { grid-column: 1; }
  .update-form select { grid-row: auto; }
  .field-form textarea, .field-form input, .next-form input, .inline-add input,
  .update-form textarea, .update-form input, .update-form select { font-size: 16px; }
  .q { font-size: 14px; }
  .q-check { width: 24px; height: 24px; }
  .step { padding: 5px 12px 5px 5px; }
}

@media (max-width: 480px) {
  .main { padding: 18px 12px 60px; }
  .page-head { flex-direction: column; align-items: flex-start; gap: 4px; }
  .capture-row { flex-direction: column; align-items: stretch; }
  .capture-row button { width: 100%; padding: 9px; }
  .next-dates label { flex: 1 1 100%; }
  .inline-add { flex-direction: column; }
  .inline-add button { align-self: flex-start; }
  .stepper { gap: 3px; }
}
/* ---------- 登录 ---------- */
.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--bg);
}
.login {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 276px;
  padding: 32px 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 10px 40px rgba(20, 20, 25, .08);
}
.login h1 {
  margin: 0;
  font: 700 26px/1 "JetBrains Mono", ui-monospace, Menlo, monospace;
  letter-spacing: -1px;
}
.login h1 span { color: var(--accent); }
.login-sub { margin: -4px 0 12px; color: var(--faint); font-size: 12px; }
.login input {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--ink);
  padding: 10px 12px;
  font-size: 14px;
  outline: none;
}
.login input:focus { border-color: var(--accent); }
.login button {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  padding: 9px;
  font-size: 14px;
  cursor: pointer;
}
.login button:hover { filter: brightness(1.08); }
.login-err { margin: 2px 0 0; color: var(--rose); font-size: 12.5px; }
.demo-tag a { color: var(--faint); }
.demo-tag a:hover { color: var(--accent-ink); }
