:root {
  --bg: #f5f6f4;
  --surface: #ffffff;
  --surface-muted: #eef1ed;
  --line: #dfe4dd;
  --line-strong: #cbd4c9;
  --text: #1d2722;
  --text-muted: #69766d;
  --accent: #177b68;
  --accent-soft: #dcefe9;
  --warning: #a26e1e;
  --warning-soft: #f6ead3;
  --paused: #69737b;
  --paused-soft: #e7eaec;
  --danger: #a1433c;
  --danger-soft: #f5e0de;
  --shadow: 0 10px 30px rgba(30, 43, 35, 0.06);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 320px; background: var(--bg); }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.app-shell { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; }
.sidebar { display: flex; flex-direction: column; gap: 34px; padding: 28px 18px 18px; border-right: 1px solid var(--line); background: #f8faf7; }
.brand-lockup { display: flex; align-items: center; gap: 12px; padding: 0 10px; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; color: white; background: var(--accent); font-weight: 800; font-size: 19px; }
.eyebrow { margin: 0 0 5px; color: var(--text-muted); font-size: 11px; line-height: 1.3; letter-spacing: 0; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: 15px; letter-spacing: 0; }
h2 { margin-bottom: 0; font-size: 25px; line-height: 1.2; letter-spacing: 0; }
h3 { margin-bottom: 0; font-size: 16px; line-height: 1.35; letter-spacing: 0; }
.nav-list { display: grid; gap: 5px; }
.nav-item { display: grid; grid-template-columns: 24px 1fr auto; align-items: center; gap: 7px; min-height: 42px; padding: 0 12px; border: 0; border-radius: 7px; color: var(--text-muted); background: transparent; text-align: left; }
.nav-item:hover { color: var(--text); background: var(--surface-muted); }
.nav-item.is-active { color: var(--accent); background: var(--accent-soft); font-weight: 700; }
.nav-icon { color: currentColor; font-size: 19px; line-height: 1; text-align: center; }
.nav-count { color: inherit; font-size: 12px; font-weight: 700; }
.sidebar-note { display: flex; gap: 9px; margin: auto 10px 0; padding: 13px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.note-dot { flex: 0 0 8px; width: 8px; height: 8px; margin-top: 5px; border-radius: 50%; background: var(--accent); }
.sidebar-note strong { display: block; margin-bottom: 4px; font-size: 12px; }
.sidebar-note p { margin: 0; color: var(--text-muted); font-size: 11px; line-height: 1.5; }
.sidebar-footer { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 0 10px; color: var(--text-muted); font-size: 11px; }
.text-button { padding: 3px 0; border: 0; color: var(--accent); background: transparent; font-size: 11px; }
.text-button:hover { text-decoration: underline; }

.main-content { min-width: 0; padding: 32px clamp(20px, 4vw, 60px) 48px; }
.topbar { display: flex; justify-content: space-between; align-items: end; gap: 20px; max-width: 1380px; margin: 0 auto 30px; }
.primary-button, .save-button { display: inline-flex; justify-content: center; align-items: center; gap: 7px; min-height: 40px; padding: 0 16px; border: 1px solid var(--accent); border-radius: 7px; color: white; background: var(--accent); font-weight: 700; }
.primary-button:hover, .save-button:hover { background: #116452; }
.stats-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: 1380px; margin: 0 auto 24px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat-block { display: grid; gap: 8px; min-height: 100px; padding: 18px 22px; border-right: 1px solid var(--line); }
.stat-block:first-child { padding-left: 0; }
.stat-block:last-child { border-right: 0; }
.stat-label { color: var(--text-muted); font-size: 12px; }
.stat-block strong { font-size: 24px; font-weight: 700; }
.stat-accent strong { color: var(--accent); }
.stat-suffix { color: var(--text-muted); font-size: 14px; font-weight: 500; }

.toolbar { display: flex; align-items: center; gap: 9px; max-width: 1380px; margin: 0 auto 15px; }
.search-field { display: flex; flex: 1; align-items: center; gap: 8px; min-width: 180px; height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); }
.search-field:focus-within, .form-field input:focus, .form-field textarea:focus, .form-field select:focus, .select-field select:focus, .sort-field select:focus { outline: 2px solid rgba(23, 123, 104, 0.2); outline-offset: 1px; border-color: var(--accent); }
.search-icon { color: var(--text-muted); font-size: 20px; line-height: 1; }
.search-field input { width: 100%; border: 0; outline: 0; color: var(--text); background: transparent; font-size: 13px; }
.search-field input::placeholder { color: #9aa49d; }
.select-field select, .secondary-button { height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 7px; color: var(--text); background: var(--surface); font-size: 12px; }
.secondary-button:hover { border-color: var(--line-strong); background: var(--surface-muted); }
.content-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(340px, 0.85fr); gap: 20px; max-width: 1380px; margin: 0 auto; align-items: start; }
.idea-list-panel, .detail-panel { min-width: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); box-shadow: var(--shadow); }
.list-header { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 51px; padding: 0 18px; border-bottom: 1px solid var(--line); color: var(--text-muted); font-size: 12px; }
.sort-field { display: flex; align-items: center; gap: 6px; }
.sort-field select { padding: 4px 2px; border: 0; color: var(--text); background: transparent; font-size: 12px; }
.idea-list { display: grid; }
.idea-item { display: grid; width: 100%; gap: 10px; padding: 17px 18px; border: 0; border-bottom: 1px solid var(--line); color: inherit; background: var(--surface); text-align: left; transition: background 120ms ease; }
.idea-item:last-child { border-bottom: 0; }
.idea-item:hover { background: #fbfcfb; }
.idea-item.is-selected { box-shadow: inset 3px 0 0 var(--accent); background: #f7fbf9; }
.idea-item-top { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.idea-title { margin: 0; color: var(--text); font-size: 15px; line-height: 1.45; font-weight: 700; }
.idea-preview { display: -webkit-box; margin: 0; overflow: hidden; color: var(--text-muted); font-size: 12px; line-height: 1.6; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.idea-item-bottom { display: flex; align-items: center; flex-wrap: wrap; gap: 7px 12px; color: var(--text-muted); font-size: 11px; }
.status-chip, .topic-chip, .route-chip { display: inline-flex; align-items: center; min-height: 22px; padding: 0 7px; border-radius: 4px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.status-chip.pending { color: var(--warning); background: var(--warning-soft); }
.status-chip.deepening { color: var(--accent); background: var(--accent-soft); }
.status-chip.paused { color: var(--paused); background: var(--paused-soft); }
.topic-chip { color: var(--text-muted); background: var(--surface-muted); font-weight: 500; }
.route-chip { color: var(--accent); background: transparent; border: 1px solid #b8d9d0; font-weight: 600; }
.empty-state { padding: 70px 20px; text-align: center; }
.empty-mark { color: var(--line-strong); font-size: 34px; }
.empty-state h3 { margin: 10px 0 6px; }
.empty-state p, .detail-empty p { margin: 0; color: var(--text-muted); font-size: 12px; line-height: 1.6; }

.detail-panel { position: sticky; top: 20px; min-height: 540px; }
.detail-empty { display: grid; place-items: center; align-content: center; min-height: 540px; padding: 32px; text-align: center; }
.detail-empty-icon { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 15px; border: 1px solid var(--line); border-radius: 50%; color: var(--accent); font-size: 22px; }
.detail-empty h3 { margin-bottom: 8px; }
.idea-form { padding: 22px; }
.detail-heading { display: flex; justify-content: space-between; align-items: start; gap: 16px; margin-bottom: 23px; }
.detail-heading h3 { max-width: 300px; font-size: 19px; }
.icon-button { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 1px solid var(--line); border-radius: 6px; color: var(--text-muted); background: var(--surface); font-size: 20px; line-height: 1; }
.icon-button:hover { border-color: var(--line-strong); background: var(--surface-muted); }
.danger-button:hover { color: var(--danger); border-color: #e5b7b2; background: var(--danger-soft); }
.form-field { display: grid; gap: 6px; margin-bottom: 16px; }
.form-field > span, .section-label { color: var(--text-muted); font-size: 11px; font-weight: 700; }
.form-field small { margin-left: 4px; color: #a0aaa3; font-weight: 400; }
.form-field input, .form-field textarea, .form-field select { width: 100%; padding: 10px 11px; border: 1px solid var(--line); border-radius: 6px; color: var(--text); background: #fcfdfc; outline: 0; font-size: 13px; }
.form-field textarea { min-height: 42px; resize: vertical; line-height: 1.55; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.deepening-fields { margin-top: 21px; padding-top: 18px; border-top: 1px solid var(--line); }
.section-label { margin-bottom: 14px; color: var(--accent); text-transform: uppercase; letter-spacing: 0; }
.form-meta { display: flex; justify-content: space-between; gap: 12px; margin: 23px 0 14px; color: var(--text-muted); font-size: 11px; }
.save-button { width: 100%; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 5; max-width: min(360px, calc(100vw - 48px)); padding: 11px 14px; border: 1px solid #b8d9d0; border-radius: 6px; color: var(--accent); background: #f4fbf8; box-shadow: var(--shadow); font-size: 12px; opacity: 0; pointer-events: none; transform: translateY(8px); transition: opacity 160ms ease, transform 160ms ease; }
.toast.is-visible { opacity: 1; transform: translateY(0); }

@media (max-width: 980px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { display: block; padding: 15px 18px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand-lockup { padding: 0 2px 14px; }
  .nav-list { display: flex; gap: 4px; overflow-x: auto; padding-bottom: 10px; }
  .nav-item { flex: 0 0 auto; grid-template-columns: 19px auto auto; min-height: 34px; padding: 0 10px; }
  .nav-icon { font-size: 15px; }
  .sidebar-note, .sidebar-footer { display: none; }
  .main-content { padding-top: 25px; }
  .detail-panel { position: static; }
}
@media (max-width: 700px) {
  .main-content { padding: 22px 14px 30px; }
  .topbar { align-items: start; margin-bottom: 22px; }
  h2 { font-size: 22px; }
  .primary-button { min-height: 36px; padding: 0 11px; font-size: 12px; }
  .stats-row { grid-template-columns: repeat(2, 1fr); margin-bottom: 18px; }
  .stat-block, .stat-block:first-child { min-height: 78px; padding: 13px 14px; border-bottom: 1px solid var(--line); }
  .stat-block:nth-child(2) { border-right: 0; }
  .stat-block:nth-child(3), .stat-block:nth-child(4) { border-bottom: 0; }
  .stat-block strong { font-size: 20px; }
  .toolbar { align-items: stretch; flex-wrap: wrap; }
  .search-field { flex-basis: 100%; }
  .select-field { flex: 1; }
  .select-field select, .secondary-button { width: 100%; }
  .content-grid { grid-template-columns: 1fr; gap: 14px; }
  .detail-panel { min-height: auto; }
  .detail-empty { min-height: 300px; }
  .idea-form { padding: 18px; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
}
