:root {
  color-scheme: dark;
  --page-bg: #0f1117;
  --sidebar-bg: #12151c;
  --card-bg: #181c24;
  --input-bg: #141820;
  --border: #2a303b;
  --text: #e7e5e1;
  --muted: #9ba1ab;
  --accent: #b49a64;
  --accent-soft: rgba(180, 154, 100, 0.12);
  --success: #658b72;
  --warning: #b17d4a;
  --danger: #a45f5f;
  --sidebar-width: 232px;
  --sidebar-collapsed-width: 72px;
  --radius-sm: 8px;
  --radius-md: 10px;
  --transition: 150ms ease;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--page-bg);
  color: var(--text);
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  background: var(--page-bg);
  color: var(--text);
}

button, input, select, textarea { font: inherit; }

button, a { -webkit-tap-highlight-color: transparent; }

button:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.app-shell { min-height: 100vh; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 10;
  display: flex;
  width: var(--sidebar-width);
  flex-direction: column;
  overflow: hidden;
  border-right: 1px solid var(--border);
  background: var(--sidebar-bg);
  transition: width var(--transition);
}

.brand-row {
  display: flex;
  height: 72px;
  align-items: center;
  gap: 8px;
  padding: 16px;
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  min-width: 0;
  flex: 1;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  place-items: center;
  border: 1px solid var(--accent);
  border-radius: 50%;
  color: var(--accent);
  font: 600 19px Georgia, serif;
}

.brand-copy { min-width: 0; line-height: 1.15; }
.brand-copy strong { display: block; font: 600 16px Georgia, serif; white-space: nowrap; }
.brand-copy small { color: var(--muted); font-size: 9px; letter-spacing: 0.12em; white-space: nowrap; }

.icon-button {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition), background var(--transition);
}

.icon-button:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }

.nav-list { padding: 16px 12px 8px; }

.nav-item {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--transition), background var(--transition), border-color var(--transition);
}

a.nav-item:hover { background: var(--card-bg); color: var(--text); }
.nav-item.is-active { border-color: rgba(180, 154, 100, 0.32); background: var(--accent-soft); color: var(--accent); }

.nav-icon {
  display: grid;
  width: 22px;
  flex: 0 0 22px;
  place-items: center;
  color: currentColor;
  font-size: 17px;
}

.nav-label { overflow: hidden; text-overflow: ellipsis; }

.future-section {
  margin-top: 4px;
  padding: 12px;
  border-top: 1px solid var(--border);
}

.section-label {
  margin: 0 12px 8px;
  color: #6f7681;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav-item.is-disabled { color: #626874; cursor: not-allowed; }
.nav-item.is-disabled .nav-icon { opacity: 0.7; }

.future-badge {
  margin-left: auto;
  padding: 2px 5px;
  border: 1px solid #343945;
  border-radius: 4px;
  color: #747b86;
  font-size: 9px;
}

.settings-link { margin: auto 12px 16px; border-top: 1px solid transparent; }

.main-content {
  min-height: 100vh;
  margin-left: var(--sidebar-width);
  padding: 40px 48px 64px;
  transition: margin-left var(--transition);
}

.content-wrap { width: min(100%, 1200px); margin: 0 auto; }

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
}

.eyebrow { margin: 0 0 8px; color: var(--accent); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; }

h1, h2, p { margin-top: 0; }

h1 { margin-bottom: 8px; font: 500 clamp(30px, 3vw, 42px)/1.15 Georgia, "Times New Roman", serif; letter-spacing: -0.02em; }
h2 { margin-bottom: 8px; font-size: 17px; }

.page-subtitle { max-width: 680px; margin-bottom: 0; color: var(--muted); line-height: 1.65; }

.date-block { min-width: 160px; padding-top: 4px; color: var(--muted); text-align: right; }
.date-block strong { display: block; margin-top: 4px; color: var(--text); font-size: 17px; font-weight: 500; }

.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }

.card {
  min-height: 184px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--card-bg);
}

.card-kicker { margin-bottom: 16px; color: var(--accent); font-size: 12px; letter-spacing: 0.08em; }
.card p { color: var(--muted); line-height: 1.65; }

.empty-state {
  display: grid;
  min-height: 320px;
  place-items: center;
  padding: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--card-bg);
  text-align: center;
}

.empty-state-content { max-width: 460px; }
.empty-symbol { display: block; margin-bottom: 20px; color: var(--accent); font: 400 32px Georgia, serif; }
.empty-state p { color: var(--muted); line-height: 1.7; }
.phase-note { display: inline-block; margin-top: 8px; padding: 5px 8px; border: 1px solid var(--border); border-radius: 6px; color: var(--muted); font-size: 12px; }

.settings-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 16px; }
.settings-card { min-height: 0; }
.settings-card + .settings-card { margin-top: 16px; }

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 0;
  border-top: 1px solid var(--border);
}

.setting-row:first-of-type { margin-top: 20px; }
.setting-row:last-child { padding-bottom: 0; }
.setting-copy h2 { margin-bottom: 6px; }
.setting-copy p { margin-bottom: 0; color: var(--muted); font-size: 14px; }

.button {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #111318;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}

.button:hover { background: #c2aa79; border-color: #c2aa79; }
.button:disabled { cursor: wait; opacity: 0.55; }
.button-secondary { border-color: var(--border); background: transparent; color: var(--text); }
.button-secondary:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }
.button-danger { border-color: var(--danger); background: transparent; color: #d89191; }
.button-danger:hover { border-color: #b66f6f; background: rgba(164, 95, 95, 0.12); color: #e0a0a0; }

.meta-list { margin: 20px 0 0; }
.meta-list div { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-top: 1px solid var(--border); }
.meta-list dt { color: var(--muted); }
.meta-list dd { margin: 0; color: var(--text); text-align: right; }

.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;
}

/* 阶段二：塔罗记录列表与详情/编辑面板 */
.oracle-page { max-width: 1200px; }
.oracle-page-header { align-items: center; margin-bottom: 24px; }

.oracle-workspace {
  display: grid;
  grid-template-columns: minmax(290px, 34%) minmax(0, 1fr);
  min-height: calc(100vh - 190px);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--card-bg);
}

.oracle-list-pane {
  min-width: 0;
  border-right: 1px solid var(--border);
  background: #151922;
}

.oracle-filters { padding: 16px; border-bottom: 1px solid var(--border); }
.search-field { display: block; }

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  outline: 0;
  background: var(--input-bg);
  color: var(--text);
  transition: border-color var(--transition), background var(--transition);
}

textarea { min-height: 112px; padding: 11px 12px; resize: vertical; line-height: 1.6; }

input::placeholder { color: #6f7681; }
input:hover, select:hover, textarea:hover { border-color: #3a424f; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); }

.filter-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.single-filter { display: block; margin-top: 8px; }
.filter-reset { width: 100%; margin-top: 8px; padding: 5px 0; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 11px; text-align: right; }
.filter-reset:hover { color: var(--accent); }
.oracle-list-meta { display: flex; min-height: 40px; align-items: center; padding: 0 16px; border-bottom: 1px solid var(--border); color: var(--muted); font-size: 12px; }
.oracle-record-list { max-height: calc(100vh - 320px); overflow-y: auto; }

.oracle-list-item {
  display: block;
  width: 100%;
  padding: 16px;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: background var(--transition);
}

.oracle-list-item:hover { background: #1a1f28; }
.oracle-list-item.is-selected { box-shadow: inset 3px 0 var(--accent); background: var(--accent-soft); }
.oracle-list-item > strong { display: block; margin: 10px 0 7px; overflow: hidden; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }

.record-list-top,
.record-list-bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 11px; }
.record-list-bottom { margin-top: 12px; }
.record-list-bottom span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.record-summary { display: -webkit-box; overflow: hidden; color: var(--muted); font-size: 13px; line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }

.status-badge { display: inline-flex; align-items: center; min-height: 23px; padding: 0 8px; border: 1px solid var(--border); border-radius: 999px; font-size: 11px; font-weight: 600; }
.status-pending { border-color: rgba(177, 125, 74, 0.5); color: #d2a06e; }
.status-reviewed { border-color: rgba(101, 139, 114, 0.55); color: #8eb19a; }
.status-archived { color: var(--muted); }
.decision-status-considering { border-color: rgba(177, 125, 74, 0.5); color: #d2a06e; }
.decision-status-decided { border-color: rgba(180, 154, 100, 0.55); color: #cdb37e; }
.decision-status-reviewed { border-color: rgba(101, 139, 114, 0.55); color: #8eb19a; }
.record-kind { display: inline-flex; min-height: 23px; align-items: center; padding: 0 8px; border: 1px solid rgba(180, 154, 100, 0.45); border-radius: 999px; color: var(--accent); font-size: 11px; font-weight: 600; }

.list-empty { display: grid; min-height: 220px; place-items: center; align-content: center; gap: 12px; margin: 12px; padding: 24px; border: 1px dashed var(--border); border-radius: var(--radius-sm); color: var(--muted); text-align: center; }
.list-empty span { color: var(--accent); font: 28px Georgia, serif; }
.list-empty p { margin: 0; }

.oracle-panel { min-width: 0; max-height: calc(100vh - 190px); overflow-y: auto; background: var(--card-bg); }
.panel-placeholder { display: grid; min-height: 100%; place-items: center; align-content: center; padding: 48px; color: var(--muted); text-align: center; }
.panel-placeholder h2 { color: var(--text); }
.panel-placeholder p { max-width: 360px; }

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 28px;
  border-bottom: 1px solid var(--border);
  background: var(--card-bg);
}

.sticky-panel-header { position: sticky; z-index: 4; top: 0; }
.panel-header h2 { margin: 6px 0 0; font: 500 25px/1.25 Georgia, serif; }
.panel-heading-meta { display: flex; align-items: center; gap: 10px; margin: 0; color: var(--muted); font-size: 11px; letter-spacing: 0.08em; }
.panel-header-actions { display: flex; align-items: center; gap: 8px; }
.panel-close { font-size: 20px; font-weight: 300; }

.detail-date-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin: 24px 28px 0; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--border); }
.detail-date-grid div { padding: 14px; background: var(--input-bg); }
.detail-date-grid span, .relation-list span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 11px; }
.detail-date-grid strong { font-size: 13px; font-weight: 500; }

.detail-section { margin: 0 28px; padding: 28px 0; border-bottom: 1px solid var(--border); }
.detail-label { margin-bottom: 13px; color: var(--accent); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; }
.detail-empty { color: var(--muted); font-size: 13px; font-style: italic; }
.prose { color: var(--text); font-size: 14px; line-height: 1.78; overflow-wrap: anywhere; }
.prose p:last-child, .prose blockquote:last-child, .prose ul:last-child, .prose ol:last-child { margin-bottom: 0; }
.prose blockquote { margin-left: 0; padding: 4px 0 4px 16px; border-left: 2px solid var(--accent); color: #c7c3bb; }
.prose ul, .prose ol { padding-left: 24px; }

.review-detail-section { margin: 24px 28px 0; padding: 24px; border: 1px solid rgba(180, 154, 100, 0.35); border-radius: var(--radius-md); background: var(--accent-soft); }
.section-heading-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.section-heading-row h3 { margin: 0; font-size: 16px; }
.review-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 24px; }
.review-detail-grid > div > span { display: block; margin-bottom: 10px; color: var(--muted); font-size: 12px; }
.quick-review-actions { display: flex; gap: 18px; margin-top: 20px; padding-top: 16px; border-top: 1px solid rgba(180, 154, 100, 0.22); }
.compact-detail-section { border-bottom: 0; }
.detail-chip-group { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-chip { padding: 5px 8px; border: 1px solid var(--border); border-radius: 6px; color: var(--muted); font-size: 12px; }
.relation-list { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 20px; }
.relation-list strong { font-size: 13px; font-weight: 500; line-height: 1.5; }
.relation-link { display: block; margin-top: 5px; color: var(--text); text-decoration: none; }
.relation-link:hover { color: var(--accent); }
.linked-record-groups { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.linked-record-groups > div { padding: 16px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--input-bg); }
.linked-record-groups span { display: block; margin-bottom: 10px; color: var(--muted); font-size: 11px; }
.linked-record-groups strong { display: block; margin-top: 7px; font-size: 13px; font-weight: 500; }
.linked-record-groups em { color: var(--muted); font-size: 12px; font-weight: 400; }
.insight-content-detail { min-height: 240px; }
.detail-footer { display: flex; align-items: center; justify-content: space-between; padding: 16px 28px 28px; color: var(--muted); font-size: 11px; }

.text-button { padding: 0; border: 0; background: transparent; color: var(--accent); cursor: pointer; font: inherit; }
.text-button:hover { color: #c8af7b; text-decoration: underline; }
.text-button.is-danger { color: #cf8181; }

.oracle-form { min-height: 100%; }
.form-section { padding: 28px; border-bottom: 1px solid var(--border); }
.form-field { margin-bottom: 20px; }
.form-field:last-child { margin-bottom: 0; }
.form-field > label, .association-picker > label { display: block; margin-bottom: 8px; color: var(--text); font-size: 13px; font-weight: 600; }
.form-field > small { display: block; margin-top: 7px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.required-mark { color: #d18a8a; }
.form-grid { display: grid; gap: 12px; }
.form-grid-three { grid-template-columns: repeat(3, 1fr); }
.form-grid-two { grid-template-columns: repeat(2, 1fr); }
.decision-analysis-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.decision-analysis-grid > div { min-width: 0; }
.decision-edit-grid { align-items: start; }
.decision-date-grid { grid-template-columns: repeat(2, 1fr); }
.section-title-block { margin-bottom: 24px; }
.section-title-block h3 { margin: 0; font-size: 18px; }
.section-title-block > p:last-child { margin: 8px 0 0; color: var(--muted); font-size: 13px; }

.rich-editor { overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--input-bg); transition: border-color var(--transition); }
.rich-editor:focus-within { border-color: var(--accent); }
.rich-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 3px; min-height: 40px; padding: 5px 7px; border-bottom: 1px solid var(--border); }
.rich-toolbar button { min-width: 30px; min-height: 28px; padding: 0 7px; border: 0; border-radius: 5px; background: transparent; color: var(--muted); cursor: pointer; font-size: 12px; }
.rich-toolbar button:hover { background: #242a34; color: var(--text); }
.toolbar-divider { width: 1px; height: 18px; margin: 0 3px; background: var(--border); }
.rich-editor-content { padding: 13px 14px; outline: 0; color: var(--text); font-size: 14px; line-height: 1.7; overflow-wrap: anywhere; }
.rich-editor-content:empty::before { content: attr(data-placeholder); color: #6f7681; pointer-events: none; }
.rich-editor-content blockquote { margin-left: 0; padding-left: 14px; border-left: 2px solid var(--accent); color: #c7c3bb; }
.rich-editor-content ul, .rich-editor-content ol { padding-left: 24px; }

.association-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.association-input-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px; }
.association-chips { display: flex; min-height: 34px; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 9px; }
.association-chip { display: inline-flex; max-width: 100%; align-items: center; gap: 5px; padding: 5px 7px 5px 9px; border: 1px solid var(--border); border-radius: 999px; color: var(--muted); font-size: 12px; }
.association-chip button { display: grid; width: 18px; height: 18px; place-items: center; padding: 0; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.association-empty { color: var(--muted); font-size: 12px; }

.review-form-section { background: #171b22; }
.review-shortcuts { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding: 14px 0; border-top: 1px solid var(--border); color: var(--muted); font-size: 12px; }
.quick-insight-form { margin-top: 10px; padding: 20px; border: 1px solid rgba(180, 154, 100, 0.35); border-radius: var(--radius-md); background: var(--card-bg); }
.quick-insight-heading { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.quick-insight-heading p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.review-save-row { display: flex; justify-content: flex-end; margin-top: 24px; }

.form-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 28px; border-top: 1px solid var(--border); background: var(--card-bg); }
.form-footer > div { display: flex; gap: 8px; margin-left: auto; }
.sticky-form-footer { position: sticky; z-index: 4; bottom: 0; }

.home-record-list { display: grid; margin-top: -5px; }
.home-record-list a { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--border); color: var(--text); text-decoration: none; }
.home-record-list a:first-child { border-top: 0; }
.home-record-list a:hover span { color: var(--accent); }
.home-record-list span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: color var(--transition); }
.home-record-list span small { display: inline-block; min-width: 34px; margin-right: 8px; color: var(--accent); font-size: 10px; }
.home-record-list time { flex: 0 0 auto; color: var(--muted); font-size: 12px; }

.tag-create-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin: 4px 0 16px; }
.tag-management-list { display: grid; gap: 6px; }
.tag-management-item { display: flex; min-height: 40px; align-items: center; justify-content: space-between; gap: 16px; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--input-bg); }
.tag-management-item span { overflow: hidden; color: var(--muted); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }

.quick-create-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--card-bg);
}
.quick-create-bar > span { margin-right: 4px; color: var(--muted); font-size: 12px; }
.quick-create-bar a { padding: 8px 11px; border: 1px solid var(--border); border-radius: 7px; color: var(--text); font-size: 12px; text-decoration: none; transition: border-color var(--transition), background var(--transition), color var(--transition); }
.quick-create-bar a:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }

/* 阶段四：极简项目与任务 */
.task-workspace { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: calc(100vh - 190px); overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--card-bg); }
.project-pane { min-width: 0; border-right: 1px solid var(--border); background: #151922; }
.project-pane-header { display: flex; min-height: 76px; align-items: center; justify-content: space-between; gap: 16px; padding: 16px; border-bottom: 1px solid var(--border); }
.project-pane-header .eyebrow { margin-bottom: 4px; }
.project-pane-header h2 { margin: 0; }
.project-list { padding: 10px; }
.project-item-wrap { position: relative; margin-bottom: 5px; border: 1px solid transparent; border-radius: var(--radius-sm); }
.project-item-wrap:hover { border-color: var(--border); background: var(--card-bg); }
.project-item-wrap.is-selected { border-color: rgba(180, 154, 100, 0.38); background: var(--accent-soft); }
.project-item { display: block; width: 100%; min-height: 42px; padding: 10px 12px; border: 1px solid transparent; border-radius: var(--radius-sm); background: transparent; color: var(--muted); text-align: left; cursor: pointer; }
.project-list > .project-item.is-selected { border-color: rgba(180, 154, 100, 0.38); background: var(--accent-soft); color: var(--accent); }
.project-item strong { display: block; padding-right: 72px; overflow: hidden; color: var(--text); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.project-item small { display: -webkit-box; margin-top: 5px; overflow: hidden; color: var(--muted); font-size: 11px; line-height: 1.4; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.project-actions { position: absolute; top: 8px; right: 8px; display: none; gap: 5px; }
.project-item-wrap:hover .project-actions, .project-item-wrap:focus-within .project-actions { display: flex; }
.project-actions button { padding: 3px; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 10px; }
.project-actions button:hover { color: var(--accent); }

.task-main { min-width: 0; padding: 20px 24px 40px; }
.task-filters { display: grid; grid-template-columns: minmax(220px, 1fr) 160px 140px auto; gap: 8px; margin-bottom: 24px; }
.task-filters .filter-reset { width: auto; min-height: 42px; margin: 0; padding: 0 8px; }
.task-section + .task-section { margin-top: 32px; }
.task-section-heading { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
.task-section-heading h2 { margin: 0; font-size: 16px; }
.task-section-heading span { display: grid; min-width: 23px; height: 23px; place-items: center; border: 1px solid var(--border); border-radius: 999px; color: var(--muted); font-size: 11px; }
.completed-task-section { padding-top: 24px; border-top: 1px solid var(--border); }
.task-list { display: grid; gap: 8px; }
.task-empty, .inline-empty-state { padding: 28px 16px; border: 1px dashed var(--border); border-radius: var(--radius-sm); color: var(--muted); text-align: center; font-size: 13px; }
.inline-empty-state strong { display: block; margin-bottom: 7px; color: var(--text); font-size: 14px; }
.inline-empty-state p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.task-item { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 72px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--input-bg); transition: border-color var(--transition), background var(--transition); }
.task-item:hover { border-color: #3b4350; background: #181d25; }
.task-item.is-completed { opacity: 0.72; }
.task-check-area { display: grid; place-items: center; }
.task-complete-button, .task-complete-mark { display: grid; width: 20px; height: 20px; place-items: center; border: 1px solid var(--muted); border-radius: 50%; background: transparent; color: var(--success); }
.task-complete-button { cursor: pointer; }
.task-complete-button:hover { border-color: var(--success); background: rgba(101, 139, 114, 0.13); }
.task-complete-mark { border-color: var(--success); font-size: 12px; }
.task-item-body { min-width: 0; padding: 0; border: 0; background: transparent; color: var(--text); text-align: left; cursor: pointer; }
.task-item-top { display: flex; align-items: center; gap: 8px; }
.task-item-top strong { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.task-item.is-completed .task-item-top strong { color: var(--muted); text-decoration: line-through; }
.priority-badge { display: inline-flex; flex: 0 0 auto; padding: 2px 6px; border: 1px solid var(--border); border-radius: 5px; color: var(--muted); font-size: 10px; }
.priority-high { border-color: rgba(164, 95, 95, 0.55); color: #d18a8a; }
.priority-normal { border-color: rgba(180, 154, 100, 0.45); color: #c9ae78; }
.priority-low { color: var(--muted); }
.task-item-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 7px; color: var(--muted); font-size: 11px; }
.task-item-meta .due-overdue { color: #d18a8a; }
.task-item-meta .due-today { color: #d2a06e; }
.task-notes { display: block; margin-top: 7px; overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.task-delete-button { padding: 5px; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 11px; }
.task-delete-button:hover { color: #d18a8a; }

.task-drawer[hidden] { display: none; }
.task-drawer { position: fixed; z-index: 20; inset: 0; }
.task-drawer-backdrop { position: absolute; inset: 0; background: rgba(5, 7, 10, 0.7); }
.task-drawer-panel { position: absolute; top: 0; right: 0; display: flex; width: min(540px, calc(100% - 72px)); height: 100%; flex-direction: column; overflow-y: auto; border-left: 1px solid var(--border); background: var(--card-bg); animation: drawer-in 150ms ease; }
.task-drawer-panel .form-section { flex: 1; }
.project-drawer-panel { top: 50%; right: 32px; width: min(480px, calc(100% - 96px)); height: auto; max-height: calc(100% - 64px); border: 1px solid var(--border); border-radius: var(--radius-md); transform: translateY(-50%); animation: panel-in 150ms ease; }
@keyframes drawer-in { from { transform: translateX(18px); opacity: 0; } }
@keyframes panel-in { from { transform: translateY(calc(-50% + 8px)); opacity: 0; } }

.loading-state { color: var(--muted); }

.toast-region { position: fixed; z-index: 30; right: 24px; bottom: 24px; display: grid; gap: 8px; }
.toast { max-width: 360px; padding: 12px 16px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: #20252e; color: var(--text); animation: toast-in 150ms ease; }
.toast.is-success { border-color: rgba(101, 139, 114, 0.72); }
.toast.is-warning { border-color: rgba(177, 125, 74, 0.78); }
.toast.is-error { border-color: rgba(164, 95, 95, 0.78); }

@keyframes toast-in { from { transform: translateY(6px); opacity: 0; } }

.confirm-dialog { width: min(440px, calc(100% - 32px)); padding: 0; border: 0; border-radius: var(--radius-md); background: transparent; color: var(--text); }
.confirm-dialog::backdrop { background: rgba(5, 7, 10, 0.76); }
.dialog-card { display: grid; grid-template-columns: 40px 1fr; gap: 16px; padding: 24px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--card-bg); }
.dialog-icon { display: grid; width: 36px; height: 36px; place-items: center; border: 1px solid var(--warning); border-radius: 50%; color: var(--warning); font-weight: 700; }
.dialog-card p { margin-bottom: 0; color: var(--muted); line-height: 1.6; }
.dialog-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }

.app-shell.is-collapsed .sidebar { width: var(--sidebar-collapsed-width); }
.app-shell.is-collapsed .main-content { margin-left: var(--sidebar-collapsed-width); }
.app-shell.is-collapsed .brand-copy,
.app-shell.is-collapsed .nav-label,
.app-shell.is-collapsed .future-badge,
.app-shell.is-collapsed .section-label { display: none; }
.app-shell.is-collapsed .brand-row { padding-inline: 17px; }
.app-shell.is-collapsed .brand { flex: 0; }
.app-shell.is-collapsed .sidebar-toggle { position: absolute; top: 56px; right: -1px; background: var(--sidebar-bg); transform: rotate(180deg); }
.app-shell.is-collapsed .nav-item { justify-content: center; padding-inline: 12px; }

@media (max-width: 1100px) {
  .main-content { padding-inline: 32px; }
  .card-grid { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
  .oracle-workspace { grid-template-columns: minmax(270px, 36%) minmax(0, 1fr); }
  .form-grid-three { grid-template-columns: 1fr 1fr; }
  .association-grid, .review-detail-grid, .decision-analysis-grid { grid-template-columns: 1fr; }
  .task-workspace { grid-template-columns: 220px minmax(0, 1fr); }
  .task-filters { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .sidebar { width: var(--sidebar-collapsed-width); }
  .main-content { margin-left: var(--sidebar-collapsed-width); padding: 28px 20px 48px; }
  .brand-copy, .nav-label, .future-badge, .section-label { display: none; }
  .brand-row { padding-inline: 17px; }
  .brand { flex: 0; }
  .sidebar-toggle { display: none; }
  .nav-item { justify-content: center; padding-inline: 12px; }
  .page-header { display: block; }
  .date-block { margin-top: 20px; text-align: left; }
  .setting-row { align-items: flex-start; flex-direction: column; }
  .oracle-page-header { display: flex; }
  .oracle-workspace { grid-template-columns: 1fr; overflow: visible; }
  .oracle-list-pane { border-right: 0; border-bottom: 1px solid var(--border); }
  .oracle-record-list, .oracle-panel { max-height: none; }
  .oracle-record-list { max-height: 380px; }
  .oracle-panel { min-height: 520px; }
  .form-grid-three, .form-grid-two, .detail-date-grid, .relation-list, .linked-record-groups { grid-template-columns: 1fr; }
  .panel-header, .form-section, .detail-section { padding-inline: 20px; }
  .detail-date-grid, .review-detail-section { margin-inline: 20px; }
  .detail-footer, .form-footer { padding-inline: 20px; }
  .quick-create-bar { align-items: stretch; flex-direction: column; }
  .task-workspace { grid-template-columns: 1fr; overflow: visible; }
  .project-pane { border-right: 0; border-bottom: 1px solid var(--border); }
  .task-filters { grid-template-columns: 1fr; }
  .task-filters .filter-reset { width: 100%; text-align: right; }
  .task-main { padding-inline: 16px; }
  .project-drawer-panel { right: 16px; width: calc(100% - 104px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
