:root {
  --bg: #f3f5f8;
  --surface: rgba(255, 255, 255, 0.94);
  --surface-solid: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --line: #e7eaf0;
  --brand: #181f2d;
  --brand-2: #2e3b53;
  --accent: #f2b84b;
  --accent-soft: #fff5da;
  --success: #1f9d68;
  --danger: #d64d4d;
  --shadow: 0 14px 36px rgba(27, 36, 51, 0.08);
  --radius-xl: 26px;
  --radius-lg: 20px;
  --radius-md: 15px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  background:
    radial-gradient(circle at 100% 0%, rgba(242,184,75,.16), transparent 28%),
    linear-gradient(180deg, #f8fafc 0%, var(--bg) 26%, var(--bg) 100%);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

.app-shell {
  width: min(100%, 560px);
  min-height: 100vh;
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) 18px calc(112px + var(--safe-bottom));
}

.topbar, .section-head, .sheet-header, .range-label, .form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.topbar { margin-bottom: 20px; }
.topbar h1, .section-head h2, .sheet-header h2 { margin: 2px 0 0; letter-spacing: -0.03em; }
.topbar h1 { font-size: 28px; }
.eyebrow { margin: 0; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }

.icon-button, .mini-icon-button {
  border: 0;
  color: var(--text);
  background: rgba(255,255,255,.8);
  box-shadow: 0 7px 20px rgba(24,31,45,.08);
  display: inline-grid;
  place-items: center;
}
.icon-button { width: 44px; height: 44px; border-radius: 16px; }
.mini-icon-button { width: 40px; height: 40px; border-radius: 13px; box-shadow: none; background: #f0f2f6; }
.icon-button:active, .mini-icon-button:active { transform: scale(.96); }


.topbar-actions { display: flex; align-items: center; gap: 9px; }
.connection-pill {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 30px; padding: 0 10px; border-radius: 999px;
  color: #177b55; background: #e9f8f1; font-size: 11px; font-weight: 800;
}
.connection-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #1f9d68; }
.connection-pill.offline { color: #9a6420; background: #fff4dd; }
.connection-pill.offline::before { background: #e3a02d; }

.search-card {
  margin-top: 12px; min-height: 48px; padding: 0 14px;
  display: flex; align-items: center; gap: 10px;
}
.search-card svg { width: 19px; height: 19px; color: #8d95a3; }
.search-card input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); }
.search-card input::-webkit-search-cancel-button { opacity: .55; }

.task-next, .task-blocker {
  margin: 0 0 9px; padding: 8px 10px; border-radius: 10px;
  font-size: 12px; line-height: 1.45;
}
.task-next { color: #3f4a59; background: #f5f7fa; }
.task-blocker { color: #9c3d3d; background: #fff1f1; }
.task-next span, .task-blocker span { margin-right: 7px; font-size: 10px; font-weight: 900; }
.mode-row { cursor: default; }

.card { background: var(--surface); border: 1px solid rgba(255,255,255,.7); border-radius: var(--radius-lg); box-shadow: var(--shadow); }

.hero-card {
  position: relative;
  overflow: hidden;
  min-height: 154px;
  padding: 24px;
  color: #fff;
  background:
    radial-gradient(circle at 84% 12%, rgba(242,184,75,.45), transparent 28%),
    linear-gradient(135deg, var(--brand), var(--brand-2));
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 20px 42px rgba(24,31,45,.23);
}
.hero-card::after {
  content: "";
  position: absolute;
  width: 190px;
  height: 190px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 50%;
  right: -76px;
  bottom: -106px;
}
.hero-copy { position: relative; z-index: 1; max-width: 68%; }
.hero-copy strong { display: block; margin: 13px 0 8px; font-size: 20px; line-height: 1.35; }
.hero-copy p { margin: 0; color: rgba(255,255,255,.65); font-size: 13px; }
.status-pill { display: inline-flex; padding: 6px 10px; color: #1b2434; background: var(--accent); border-radius: 999px; font-size: 11px; font-weight: 800; }
.progress-ring {
  --progress: 0;
  position: relative;
  z-index: 1;
  width: 78px;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--accent) calc(var(--progress) * 1%), rgba(255,255,255,.12) 0);
}
.progress-ring::after { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: #222c3d; }
.progress-ring span { position: relative; z-index: 1; font-size: 17px; font-weight: 800; }

.quick-add { margin-top: 16px; padding: 11px; display: flex; gap: 10px; }
.quick-input-wrap { min-width: 0; flex: 1; display: flex; align-items: center; gap: 6px; }
.quick-input-wrap input { width: 100%; border: 0; outline: 0; background: transparent; padding: 0 6px; color: var(--text); }
.quick-input-wrap input::placeholder { color: #9aa1ad; }
.primary-button, .danger-button {
  min-height: 46px;
  border: 0;
  border-radius: 15px;
  padding: 0 18px;
  font-weight: 800;
}
.primary-button { color: #fff; background: var(--brand); box-shadow: 0 10px 18px rgba(24,31,45,.15); }
.primary-button:active, .danger-button:active { transform: translateY(1px); }
.danger-button { color: var(--danger); background: #fff0f0; }
.grow { flex: 1; }

.filter-row { margin: 18px -18px 0; padding: 0 18px 3px; display: flex; gap: 9px; overflow-x: auto; scrollbar-width: none; }
.filter-row::-webkit-scrollbar { display: none; }
.filter-chip { white-space: nowrap; border: 1px solid var(--line); color: var(--muted); background: rgba(255,255,255,.75); border-radius: 999px; padding: 9px 14px; font-size: 13px; font-weight: 700; }
.filter-chip.active { color: #fff; border-color: var(--brand); background: var(--brand); }

.section-head { margin: 25px 2px 12px; }
.section-head h2 { font-size: 22px; }
.text-button { border: 0; color: var(--muted); background: transparent; font-size: 12px; font-weight: 700; }

.task-list { display: grid; gap: 11px; }
.task-card {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  align-items: start;
  gap: 12px;
  padding: 16px;
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: 19px;
  box-shadow: 0 8px 25px rgba(24,31,45,.045);
}
.task-card.priority-high::before, .task-card.priority-medium::before, .task-card.priority-low::before {
  content: "";
  position: absolute;
  left: 0;
  top: 17px;
  bottom: 17px;
  width: 3px;
  border-radius: 0 4px 4px 0;
}
.task-card.priority-high::before { background: var(--danger); }
.task-card.priority-medium::before { background: var(--accent); }
.task-card.priority-low::before { background: #a8b0bd; }
.task-card.completed { opacity: .68; }
.task-card.completed .task-title { text-decoration: line-through; color: var(--muted); }
.task-check {
  width: 25px;
  height: 25px;
  border: 2px solid #cbd0d9;
  border-radius: 9px;
  background: #fff;
  display: grid;
  place-items: center;
  padding: 0;
  color: #fff;
}
.task-check svg { width: 15px; height: 15px; stroke-width: 2.6; opacity: 0; }
.task-check.checked { border-color: var(--success); background: var(--success); }
.task-check.checked svg { opacity: 1; }
.task-content { min-width: 0; }
.task-title { margin: 0 0 7px; font-size: 16px; line-height: 1.35; font-weight: 800; overflow-wrap: anywhere; }
.task-note { margin: 0 0 10px; color: var(--muted); font-size: 13px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.task-meta { display: flex; flex-wrap: wrap; gap: 7px; }
.meta-tag { display: inline-flex; align-items: center; gap: 4px; padding: 5px 7px; border-radius: 8px; color: #606876; background: #f4f5f7; font-size: 10px; font-weight: 700; }
.meta-tag.due-now { color: #ad3030; background: #fff0f0; }
.task-action { border: 0; background: transparent; color: #9aa1ad; padding: 3px; }
.task-progress { grid-column: 2 / 4; height: 5px; margin-top: 2px; border-radius: 999px; overflow: hidden; background: #eceff3; }
.task-progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), #e99d27); }
.attachment-count { display: inline-flex; align-items: center; gap: 4px; }
.attachment-count svg { width: 13px; height: 13px; }

.empty-state { padding: 34px 24px; text-align: center; }
.empty-icon { width: 58px; height: 58px; margin: 0 auto 13px; display: grid; place-items: center; border-radius: 19px; color: var(--brand); background: var(--accent-soft); }
.empty-icon svg { width: 28px; height: 28px; }
.empty-state strong { font-size: 17px; }
.empty-state p { margin: 8px auto 0; max-width: 260px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.hidden { display: none !important; }

.bottom-nav {
  position: fixed;
  z-index: 30;
  left: 50%;
  bottom: 0;
  width: min(100%, 560px);
  transform: translateX(-50%);
  padding: 10px 13px calc(10px + var(--safe-bottom));
  display: grid;
  grid-template-columns: 1fr 1fr 72px 1fr 1fr;
  align-items: end;
  background: rgba(255,255,255,.92);
  border-top: 1px solid rgba(215,219,226,.8);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.nav-item { min-height: 52px; border: 0; background: transparent; color: #89919f; display: grid; place-items: center; align-content: center; gap: 3px; font-size: 10px; font-weight: 700; }
.nav-item svg { width: 21px; height: 21px; }
.nav-item.active { color: var(--brand); }
.fab { width: 58px; height: 58px; margin: -30px auto 0; border: 5px solid var(--bg); border-radius: 20px; display: grid; place-items: center; color: #111827; background: var(--accent); box-shadow: 0 13px 24px rgba(164,109,11,.24); }
.fab svg { width: 26px; height: 26px; stroke-width: 2.2; }

.sheet-backdrop { position: fixed; z-index: 50; inset: 0; background: rgba(10,14,22,.46); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.bottom-sheet {
  position: fixed;
  z-index: 60;
  left: 50%;
  bottom: 0;
  width: min(100%, 560px);
  max-height: 94vh;
  overflow-y: auto;
  transform: translateX(-50%);
  padding: 9px 18px calc(24px + var(--safe-bottom));
  background: #f9fafb;
  border-radius: 28px 28px 0 0;
  box-shadow: 0 -20px 50px rgba(10,14,22,.18);
  animation: slideUp .22s ease-out;
}
.bottom-sheet.compact { max-height: 75vh; }
@keyframes slideUp { from { transform: translate(-50%, 28px); opacity: 0; } to { transform: translate(-50%,0); opacity: 1; } }
.sheet-handle { width: 44px; height: 5px; margin: 0 auto 16px; border-radius: 999px; background: #d8dce3; }
.sheet-header { margin-bottom: 18px; }
.sheet-header h2 { font-size: 22px; }
.field { display: grid; gap: 7px; margin-bottom: 14px; }
.field > span, .range-label span { color: #596171; font-size: 12px; font-weight: 800; }
.field input, .field textarea, .field select {
  width: 100%;
  border: 1px solid #e1e5eb;
  outline: 0;
  border-radius: 14px;
  padding: 13px 14px;
  color: var(--text);
  background: #fff;
  box-shadow: 0 4px 12px rgba(24,31,45,.025);
}
.field textarea { resize: vertical; min-height: 88px; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: #a9b1bf; box-shadow: 0 0 0 3px rgba(24,31,45,.06); }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.range-field { padding: 13px 14px; background: #fff; border: 1px solid #e1e5eb; border-radius: 14px; }
.range-field input { padding: 0; box-shadow: none; }
.range-label strong { font-size: 13px; }

.attachment-tools { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 5px 0 13px; }
.attachment-button { min-height: 76px; border: 1px solid #e1e5eb; border-radius: 15px; color: #4e5665; background: #fff; display: grid; place-items: center; align-content: center; gap: 7px; font-size: 11px; font-weight: 800; text-align: center; }
.attachment-button svg { width: 23px; height: 23px; }
.attachment-button.recording { color: #fff; border-color: var(--danger); background: var(--danger); animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { transform: scale(.97); opacity: .86; } }
.record-dot { fill: currentColor; stroke: none; }
.attachment-preview { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-bottom: 15px; }
.preview-item { position: relative; min-height: 88px; overflow: hidden; border: 1px solid #e1e5eb; border-radius: 13px; background: #fff; }
.preview-item img { width: 100%; height: 88px; object-fit: cover; display: block; }
.preview-item.audio { grid-column: span 3; padding: 10px 38px 10px 10px; display: flex; align-items: center; }
.preview-item audio { width: 100%; height: 38px; }
.remove-attachment { position: absolute; top: 5px; right: 5px; width: 26px; height: 26px; border: 0; border-radius: 9px; color: #fff; background: rgba(17,24,39,.75); display: grid; place-items: center; }
.remove-attachment svg { width: 14px; height: 14px; }
.form-actions { gap: 9px; margin-top: 9px; }

.settings-list { display: grid; gap: 8px; }
.settings-row { width: 100%; min-height: 70px; border: 1px solid #e5e8ed; border-radius: 16px; padding: 12px; color: var(--text); background: #fff; display: grid; grid-template-columns: 42px 1fr; align-items: center; gap: 11px; text-align: left; }
.settings-icon { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; color: var(--brand); background: #f1f3f6; }
.settings-row span:last-child { display: grid; gap: 4px; }
.settings-row strong { font-size: 14px; }
.settings-row small { color: var(--muted); font-size: 11px; line-height: 1.4; }
.danger-row { color: var(--danger); }
.file-row { cursor: pointer; }

.toast {
  position: fixed;
  z-index: 100;
  left: 50%;
  bottom: calc(92px + var(--safe-bottom));
  max-width: calc(100% - 38px);
  transform: translate(-50%, 18px);
  padding: 11px 15px;
  border-radius: 13px;
  color: #fff;
  background: rgba(17,24,39,.93);
  box-shadow: 0 12px 28px rgba(17,24,39,.2);
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: .2s ease;
}
.toast.show { opacity: 1; transform: translate(-50%,0); }

@media (min-width: 700px) {
  body { padding: 18px 0; }
  .app-shell { min-height: calc(100vh - 36px); border-radius: 32px; box-shadow: 0 28px 70px rgba(24,31,45,.1); }
  .bottom-nav { bottom: 18px; border-radius: 0 0 30px 30px; }
  .bottom-sheet { bottom: 18px; border-radius: 28px; }
}

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

@media (max-width: 370px) {
  .app-shell { padding-left: 14px; padding-right: 14px; }
  .filter-row { margin-left: -14px; margin-right: -14px; padding-left: 14px; padding-right: 14px; }
  .connection-pill { display: none; }
  .hero-card { padding: 20px; }
  .hero-copy strong { font-size: 18px; }
}

/* Voice input fallback */
.voice-sheet { z-index: 70; }
#voiceBackdrop { z-index: 65; }
.voice-guide {
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid #e4e7ec;
  border-radius: 15px;
  background: #fff;
}
.voice-guide strong { display: block; margin-bottom: 6px; font-size: 14px; }
.voice-guide p, .voice-note { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.voice-draft-field textarea { min-height: 112px; font-size: 16px; }
.voice-mode-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-bottom: 12px; }
.secondary-button {
  min-height: 46px;
  border: 1px solid #dfe3e9;
  border-radius: 15px;
  padding: 0 14px;
  color: #424b5a;
  background: #fff;
  font-weight: 800;
}
.secondary-button:disabled { opacity: .45; }
.voice-note { margin-bottom: 16px; }
.voice-listening { color: #b33b3b !important; }
.voice-listening::after { content: "…"; animation: voiceDots 1s steps(4,end) infinite; }
@keyframes voiceDots { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75%,100% { content: "..."; } }

@media (max-width: 370px) {
  .voice-mode-actions { grid-template-columns: 1fr; }
}

/* ===== v1.2 任务中心升级 ===== */
.task-card {
  grid-template-columns: auto minmax(0, 1fr) 52px;
  gap: 11px;
  padding: 15px 13px 13px 16px;
}
.task-content { cursor: pointer; }
.task-title-row { display: flex; align-items: flex-start; gap: 7px; margin-bottom: 7px; }
.task-title-row .task-title { flex: 1; margin: 0; }
.status-badge {
  flex: none;
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: 0 7px;
  border-radius: 8px;
  font-size: 9px;
  font-weight: 900;
  white-space: nowrap;
}
.status-todo { color: #687181; background: #eef0f3; }
.status-doing { color: #9a641d; background: #fff2d3; }
.status-waiting { color: #7054aa; background: #f2edff; }
.status-done { color: #177b55; background: #e9f8f1; }
.task-card-actions { display: grid; gap: 5px; align-self: stretch; }
.task-card-actions button {
  width: 48px;
  min-height: 39px;
  padding: 4px 2px;
  border: 1px solid #e7eaf0;
  border-radius: 11px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 1px;
  color: #596171;
  background: #f8f9fb;
  font-size: 9px;
  font-weight: 800;
}
.task-card-actions button:active { transform: scale(.96); background: #eef1f5; }
.task-card-actions svg { width: 16px; height: 16px; }
.task-progress-wrap { grid-column: 2 / 4; margin-top: 2px; }
.task-progress-label { display: flex; justify-content: space-between; margin-bottom: 5px; color: #858d9a; font-size: 9px; font-weight: 700; }
.task-progress-label strong { color: #515a68; }
.task-progress { height: 5px; margin: 0; border-radius: 999px; overflow: hidden; background: #eceff3; }
.checklist-count { color: #506078; background: #eef3f8; }
.task-note { -webkit-line-clamp: 1; }

.card-lite {
  margin: 2px 0 14px;
  padding: 14px;
  border: 1px solid #e1e5eb;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(24,31,45,.025);
}
.subtask-head, .detail-section-head, .detail-progress-head, .update-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.subtask-head > div { display: grid; gap: 4px; }
.section-label { color: #4f5867; font-size: 12px; font-weight: 900; }
.subtask-head small { color: var(--muted); font-size: 10px; line-height: 1.4; }
.subtask-head strong, .detail-section-head strong { color: #6b7280; font-size: 11px; }
.subtask-add-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; margin-top: 12px; }
.subtask-add-row input {
  width: 100%;
  min-width: 0;
  border: 1px solid #e1e5eb;
  outline: 0;
  border-radius: 12px;
  padding: 11px 12px;
  background: #f8f9fb;
}
.compact-button { min-height: 42px; padding: 0 15px; }
.subtask-editor-list { display: grid; gap: 7px; margin-top: 10px; }
.subtask-edit-item { display: grid; grid-template-columns: 30px minmax(0,1fr) 34px; align-items: center; gap: 7px; }
.subtask-edit-item input {
  width: 100%;
  min-width: 0;
  border: 0;
  border-bottom: 1px solid #edf0f3;
  outline: 0;
  padding: 9px 3px;
  color: var(--text);
  background: transparent;
  font-size: 13px;
}
.subtask-check {
  width: 27px;
  height: 27px;
  padding: 0;
  border: 2px solid #cbd0d9;
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: #fff;
  background: #fff;
}
.subtask-check svg { width: 15px; height: 15px; opacity: 0; stroke-width: 2.6; }
.subtask-check.checked { border-color: var(--success); background: var(--success); }
.subtask-check.checked svg { opacity: 1; }
.subtask-remove { width: 32px; height: 32px; padding: 0; border: 0; border-radius: 10px; display: grid; place-items: center; color: #a0a7b2; background: #f5f6f8; }
.subtask-remove svg { width: 16px; height: 16px; }
.subtask-empty, .detail-empty { margin: 9px 0 0; color: #9299a5; font-size: 11px; line-height: 1.5; }
.range-field input:disabled { opacity: .5; }
.range-field.auto-progress::after { content: "由具体任务清单自动计算"; margin-top: 6px; color: #8b93a0; font-size: 10px; }

.attachment-section { margin: 2px 0 15px; }
.attachment-tools.four-tools { grid-template-columns: repeat(4, 1fr); }
.attachment-tools.four-tools .attachment-button { min-height: 72px; padding: 4px; border: 1px solid #e1e5eb; }
.preview-image-button { width: 100%; height: 100%; padding: 0; border: 0; background: transparent; }
.attachment-preview:empty { display: none; }

.detail-sheet { padding-bottom: calc(12px + var(--safe-bottom)); }
.detail-meta { display: flex; flex-wrap: wrap; gap: 7px; margin: -4px 0 14px; }
.detail-progress-card {
  padding: 15px;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 12px 24px rgba(24,31,45,.16);
}
.detail-progress-head { margin-bottom: 10px; font-size: 12px; }
.detail-progress-head strong { font-size: 18px; }
.detail-progress-track { height: 7px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.16); }
.detail-progress-track span { display: block; height: 100%; border-radius: inherit; background: var(--accent); transition: width .2s ease; }
.detail-block { margin-top: 12px; padding: 14px; border: 1px solid #e5e8ed; border-radius: 16px; background: #fff; }
.detail-block p { margin: 8px 0 0; color: #4f5867; font-size: 13px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.accent-block { border-color: #f1dfb9; background: #fffaf0; }
.danger-block { border-color: #f2d1d1; background: #fff5f5; }
.view-subtasks { display: grid; gap: 7px; margin-top: 10px; }
.view-subtask-item {
  width: 100%;
  min-height: 45px;
  padding: 8px 10px;
  border: 1px solid #e7eaf0;
  border-radius: 12px;
  display: grid;
  grid-template-columns: 29px minmax(0,1fr);
  align-items: center;
  gap: 9px;
  color: var(--text);
  background: #fafbfc;
  text-align: left;
  font-size: 13px;
}
.view-subtask-item.completed > span:last-child { color: #8a929f; text-decoration: line-through; }
.view-attachments { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.view-image { aspect-ratio: 1; padding: 0; border: 0; border-radius: 12px; overflow: hidden; background: #edf0f3; }
.view-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.view-audio { grid-column: 1 / -1; padding: 8px; border-radius: 12px; background: #f5f6f8; }
.view-audio audio { width: 100%; height: 38px; }
.update-timeline { display: grid; gap: 0; margin-top: 11px; }
.update-item { position: relative; display: grid; grid-template-columns: 18px minmax(0,1fr); gap: 8px; padding-bottom: 14px; }
.update-item:not(:last-child)::before { content: ""; position: absolute; left: 5px; top: 12px; bottom: -1px; width: 1px; background: #dde2e8; }
.update-dot { position: relative; z-index: 1; width: 11px; height: 11px; margin-top: 3px; border: 3px solid #fff; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 1px #d7dce3; }
.update-head strong { font-size: 11px; }
.update-head time { color: #8d95a2; font-size: 10px; }
.update-item p { margin: 5px 0 0; color: #5f6877; font-size: 12px; line-height: 1.55; }
.sticky-actions { position: sticky; bottom: calc(-12px - var(--safe-bottom)); margin: 15px -18px -12px; padding: 12px 18px calc(12px + var(--safe-bottom)); background: rgba(249,250,251,.96); border-top: 1px solid #e7eaf0; backdrop-filter: blur(12px); }
.progress-subtasks-wrap { margin-bottom: 14px; padding: 13px; border: 1px solid #e1e5eb; border-radius: 15px; background: #fff; }

.image-lightbox {
  position: fixed;
  z-index: 120;
  inset: 0;
  display: grid;
  place-items: center;
  padding: max(56px, env(safe-area-inset-top)) 44px max(58px, env(safe-area-inset-bottom));
  background: rgba(7,10,16,.94);
}
.image-lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; box-shadow: 0 16px 50px rgba(0,0,0,.4); }
.lightbox-close, .lightbox-nav {
  position: absolute;
  border: 0;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(255,255,255,.13);
  backdrop-filter: blur(10px);
}
.lightbox-close { top: max(14px, env(safe-area-inset-top)); right: 14px; width: 44px; height: 44px; border-radius: 15px; }
.lightbox-nav { top: 50%; width: 42px; height: 54px; transform: translateY(-50%); border-radius: 14px; }
.lightbox-nav.prev { left: 8px; }
.lightbox-nav.next { right: 8px; }
.lightbox-caption { position: absolute; bottom: max(18px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); color: rgba(255,255,255,.8); font-size: 12px; font-weight: 800; }

@media (max-width: 430px) {
  .attachment-tools.four-tools { grid-template-columns: repeat(2, 1fr); }
  .attachment-tools.four-tools .attachment-button { min-height: 64px; }
}

@media (max-width: 370px) {
  .task-card { grid-template-columns: auto minmax(0,1fr) 45px; gap: 8px; padding-right: 9px; }
  .task-card-actions button { width: 43px; font-size: 8px; }
  .status-badge { display: none; }
  .subtask-add-row { grid-template-columns: 1fr; }
  .compact-button { width: 100%; }
}


/* ==================== 笔记与收藏 ==================== */
.vault-sheet { max-height: 96vh; }
.vault-sheet { z-index: 72; }
#vaultBackdrop { z-index: 70; }
.vault-entry-sheet, .vault-detail-sheet { z-index: 92; }
#vaultEntryBackdrop, #vaultDetailBackdrop { z-index: 90; }
.vault-main-header { align-items: flex-start; }
.check-row { display: flex; align-items: flex-start; gap: 9px; margin: 3px 0 15px; color: #525b69; font-size: 12px; line-height: 1.45; }
.check-row input { width: 18px; height: 18px; margin: 0; accent-color: var(--brand); }
.full-button { width: 100%; }
.vault-tabs { display: grid; grid-template-columns: repeat(2,1fr); gap: 7px; padding: 5px; border-radius: 15px; background: #eceff3; }
.vault-tab { min-height: 42px; border: 0; border-radius: 11px; color: #6b7280; background: transparent; font-size: 13px; font-weight: 800; }
.vault-tab.active { color: var(--text); background: #fff; box-shadow: 0 4px 14px rgba(24,31,45,.08); }
.vault-search-card { margin-top: 11px; }
.vault-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 20px 2px 11px; }
.vault-toolbar h3 { margin: 3px 0 0; font-size: 20px; letter-spacing: -.025em; }
.vault-list { display: grid; gap: 10px; padding-bottom: 12px; }
.vault-card { display: grid; grid-template-columns: 42px minmax(0,1fr); gap: 11px; padding: 14px; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: 0 7px 22px rgba(24,31,45,.04); }
.vault-card.pinned { border-color: #ecd593; background: linear-gradient(180deg,#fffdf5,#fff); }
.vault-card-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; }
.vault-card-icon svg { width: 21px; height: 21px; }
.vault-icon-note { color: #4d6184; background: #edf2fa; }
.vault-icon-bookmark { color: #93651a; background: #fff4db; }
.vault-card-content { min-width: 0; }
.vault-card-title-row { display: flex; align-items: center; gap: 7px; }
.vault-card h4 { min-width: 0; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.vault-card p { margin: 6px 0 0; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.vault-card small { display: block; margin-top: 8px; color: #9aa1ad; font-size: 10px; }
.pin-badge { flex: none; padding: 3px 6px; border-radius: 7px; color: #8b621a; background: #fff1c9; font-size: 9px; font-weight: 900; }
.vault-card-tags, .vault-detail-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.vault-card-tags span, .vault-detail-tags span { padding: 4px 7px; border-radius: 7px; color: #626a77; background: #f1f3f6; font-size: 9px; font-weight: 700; }
.vault-card-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 7px; padding-top: 9px; border-top: 1px solid #eef0f3; }
.vault-card-actions button { min-height: 34px; padding: 0 11px; border: 1px solid #e1e5eb; border-radius: 10px; color: #505968; background: #fff; font-size: 11px; font-weight: 800; }
.vault-detail-body { display: grid; gap: 10px; }
.pre-wrap { white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 370px) {
  .vault-card { grid-template-columns: 38px minmax(0,1fr); padding: 12px; }
  .vault-card-icon { width: 38px; height: 38px; }
  .vault-card-actions { justify-content: stretch; }
  .vault-card-actions button { flex: 1; padding: 0 7px; }
}

/* ==================== v1.4 最终版：精致轻量 + 会议培训记录 ==================== */
:root {
  --bg: #f1f4f8;
  --surface: rgba(255,255,255,.96);
  --text: #111827;
  --muted: #667085;
  --line: #e3e8ef;
  --brand: #172033;
  --brand-2: #31415f;
  --accent: #eebd59;
  --shadow: 0 12px 32px rgba(19,31,51,.07);
}
body {
  background:
    radial-gradient(circle at 100% -5%, rgba(238,189,89,.18), transparent 29%),
    radial-gradient(circle at -8% 35%, rgba(93,116,155,.08), transparent 25%),
    linear-gradient(180deg,#fafbfd 0%,var(--bg) 34%,var(--bg) 100%);
}
.app-shell { padding-top: max(15px, env(safe-area-inset-top)); }
.topbar { margin-bottom: 16px; }
.topbar h1 { font-size: 27px; }
.hero-card { min-height: 148px; box-shadow: 0 18px 38px rgba(20,31,50,.18); }
.card, .task-card, .vault-card, .record-card { border-color: rgba(224,229,237,.9); }
.task-card, .vault-card, .record-card { content-visibility: auto; contain-intrinsic-size: 100px; }
.bottom-nav { background: rgba(255,255,255,.97); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.nav-item.active { color: var(--brand); }
.primary-button { background: linear-gradient(135deg,var(--brand),#273651); }
.bottom-sheet { border-radius: 26px 26px 0 0; box-shadow: 0 -20px 70px rgba(17,24,39,.18); }

.record-sheet { max-height: 96vh; z-index: 76; }
#recordHubBackdrop { z-index: 74; }
.record-edit-sheet, .record-detail-sheet { z-index: 96; }
#recordEditBackdrop, #recordDetailBackdrop { z-index: 94; }
.record-main-header { align-items: flex-start; }
.record-summary-strip {
  display: grid; grid-template-columns: repeat(3,1fr); gap: 8px;
  margin: -3px 0 12px; padding: 6px; border-radius: 17px; background: #edf1f6;
}
.record-summary-strip div { min-width: 0; padding: 10px 6px; border-radius: 13px; text-align: center; background: rgba(255,255,255,.72); }
.record-summary-strip strong { display: block; font-size: 19px; letter-spacing: -.03em; }
.record-summary-strip span { display: block; margin-top: 2px; color: var(--muted); font-size: 9px; font-weight: 800; }
.record-search-card { margin-top: 0; box-shadow: none; border: 1px solid var(--line); }
.record-filter-row { display: grid; grid-template-columns: repeat(4,1fr); gap: 6px; margin: 10px 0 2px; padding: 4px; border-radius: 14px; background: #eceff4; }
.record-filter { min-height: 38px; border: 0; border-radius: 10px; color: #737c89; background: transparent; font-size: 12px; font-weight: 800; }
.record-filter.active { color: var(--text); background: #fff; box-shadow: 0 4px 13px rgba(19,31,51,.08); }
.record-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 19px 2px 11px; }
.record-toolbar h3 { margin: 3px 0 0; font-size: 19px; letter-spacing: -.025em; }
.record-list { display: grid; gap: 10px; padding-bottom: 14px; }
.record-card {
  display: grid; grid-template-columns: 44px minmax(0,1fr); gap: 11px;
  padding: 14px; border: 1px solid var(--line); border-radius: 19px; background: #fff;
  box-shadow: 0 7px 23px rgba(21,32,50,.045);
}
.record-card.important { border-color: #ead39d; background: linear-gradient(180deg,#fffdf7,#fff); }
.record-card-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; }
.record-card-icon svg { width: 22px; height: 22px; }
.record-card-icon.type-meeting { color: #4f6386; background: #edf2fa; }
.record-card-icon.type-training { color: #8b641d; background: #fff3d8; }
.record-card-main { min-width: 0; }
.record-card-title { display: flex; align-items: center; gap: 7px; }
.record-card-title h4 { min-width: 0; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.important-badge { flex: none; padding: 3px 6px; border-radius: 7px; color: #87601b; background: #ffefc6; font-size: 9px; font-weight: 900; }
.record-card-main > p { margin: 6px 0 0; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.record-card-meta, .record-card-counts { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.record-card-meta span, .record-card-counts span { padding: 4px 7px; border-radius: 7px; color: #657080; background: #f2f4f7; font-size: 9px; font-weight: 750; }
.record-card-counts span.pending { color: #9a6321; background: #fff3dc; }
.record-card-actions { grid-column: 1/-1; display: flex; justify-content: flex-end; gap: 7px; padding-top: 9px; border-top: 1px solid #eef1f5; }
.record-card-actions button { min-height: 34px; padding: 0 13px; border: 1px solid #dde3eb; border-radius: 10px; color: #4f5968; background: #fff; font-size: 11px; font-weight: 800; }
.voice-inline-button { width: 100%; min-height: 44px; margin: -4px 0 14px; border: 1px dashed #cdd5e1; border-radius: 13px; display: flex; align-items: center; justify-content: center; gap: 8px; color: #56657c; background: #f7f9fb; font-size: 12px; font-weight: 800; }
.voice-inline-button svg { width: 18px; height: 18px; }
.record-actions-editor { margin-top: 3px; }
.record-media-section { margin-top: 15px; }
.record-gallery-button { min-height: 42px; margin-top: 9px; border: 1px solid #dce2e9; color: #5c6675; background: #fff; box-shadow: none; }
.record-attachment-preview { display: grid; gap: 9px; margin-top: 10px; }
.record-attachment-empty { margin: 0; padding: 16px; border: 1px dashed #d8dee7; border-radius: 13px; color: #8a93a1; text-align: center; font-size: 11px; }
.record-preview-item { position: relative; min-width: 0; border: 1px solid #e1e6ed; border-radius: 14px; overflow: hidden; background: #f8fafc; }
.record-preview-item.image { display: grid; grid-template-columns: 72px minmax(0,1fr); align-items: center; min-height: 72px; }
.record-preview-item.image img { width: 72px; height: 72px; object-fit: cover; }
.record-preview-item small { display: block; min-width: 0; padding: 8px 42px 8px 10px; color: #737d8b; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.record-preview-item.media { padding: 10px 38px 8px 10px; }
.record-preview-item audio, .record-preview-item video { width: 100%; max-height: 190px; }
.record-preview-item.media small { padding: 6px 0 0; }
.record-preview-item .remove-attachment { top: 8px; right: 8px; }
.record-important-row { margin-top: 14px; }
.record-detail-body { display: grid; gap: 12px; }
.record-detail-overview { padding: 15px; border: 1px solid #e1e6ed; border-radius: 17px; background: linear-gradient(145deg,#f8fafc,#fff); }
.record-detail-overview.important { border-color: #ead39d; background: linear-gradient(145deg,#fff9e9,#fff); }
.record-detail-overview strong { display: block; margin: 11px 0 6px; font-size: 16px; line-height: 1.45; }
.record-detail-overview small { color: #8c95a2; font-size: 10px; }
.record-detail-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.record-detail-tags span { padding: 4px 7px; border-radius: 7px; color: #5f6877; background: rgba(236,240,245,.9); font-size: 9px; font-weight: 800; }
.record-detail-section { padding: 15px; border: 1px solid #e3e7ed; border-radius: 17px; background: #fff; }
.record-detail-section > p { margin: 10px 0 0; color: #434c5b; font-size: 13px; line-height: 1.7; }
.record-detail-actions { display: grid; gap: 7px; margin-top: 9px; }
.record-action-row { width: 100%; min-height: 44px; padding: 8px 9px; border: 0; border-radius: 11px; display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 9px; color: var(--text); text-align: left; background: #f5f7fa; }
.record-action-row.completed > span:nth-child(2) { color: #8c95a2; text-decoration: line-through; }
.record-action-row em { color: #4f7c68; font-size: 9px; font-style: normal; font-weight: 800; }
.record-detail-media-grid { display: grid; gap: 9px; margin-top: 9px; }
.record-detail-image { width: 100%; padding: 0; border: 1px solid #e0e5ec; border-radius: 13px; overflow: hidden; text-align: left; background: #f8fafc; }
.record-detail-image img { display: block; width: 100%; max-height: 260px; object-fit: cover; }
.record-detail-image small, .record-detail-media small { display: block; padding: 8px 10px; color: #788290; font-size: 10px; }
.record-detail-media { padding: 9px; border: 1px solid #e0e5ec; border-radius: 13px; background: #f8fafc; }
.record-detail-media audio, .record-detail-media video { width: 100%; max-height: 320px; }
.record-detail-media small { padding: 7px 1px 0; }
.record-tools .attachment-button.recording { color: #fff; border-color: var(--danger); background: var(--danger); animation: pulse 1.2s infinite; }

@media (max-width: 370px) {
  .record-summary-strip span { font-size: 8px; }
  .record-card { grid-template-columns: 39px minmax(0,1fr); padding: 12px; }
  .record-card-icon { width: 39px; height: 39px; }
  .record-filter { font-size: 10px; }
}
.voice-sheet { z-index: 112; }
#voiceBackdrop { z-index: 110; }


/* ==================== v1.5 在线版资料库 ==================== */
.library-info-row {
  display: flex; align-items: center; gap: 8px; margin: 0 4px 14px; padding: 10px 12px;
  border-radius: 14px; background: rgba(43, 109, 233, .08); color: var(--text-secondary);
  font-size: 12px;
}
.library-info-row strong { color: var(--text-primary); font-size: 13px; }
.library-info-dot { width: 8px; height: 8px; border-radius: 50%; background: #28a56b; box-shadow: 0 0 0 4px rgba(40,165,107,.12); }
.vault-detail-body a { color: var(--primary); word-break: break-all; font-weight: 700; }

/* ==================== v1.6 灵感与记账 ==================== */
.home-tools-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 12px 0;
}
.home-tool-card {
  border: 1px solid rgba(29, 40, 61, .08);
  border-radius: 18px;
  min-height: 86px;
  padding: 13px;
  display: grid;
  grid-template-columns: 38px 1fr;
  grid-template-rows: 1fr auto;
  gap: 3px 10px;
  align-items: center;
  text-align: left;
  background: linear-gradient(145deg, #fff, #f7f9fc);
  box-shadow: 0 8px 24px rgba(24, 34, 53, .06);
  color: var(--text);
}
.home-tool-card:active { transform: scale(.985); }
.home-tool-card .home-tool-icon {
  grid-row: 1 / 3;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 13px;
}
.home-tool-card .home-tool-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.home-tool-card.idea-tool .home-tool-icon { color: #8458db; background: #efe8ff; }
.home-tool-card.ledger-tool .home-tool-icon { color: #0d8b68; background: #dcf7ed; }
.home-tool-card span:not(.home-tool-icon) { min-width: 0; display: grid; gap: 2px; }
.home-tool-card small { color: var(--muted); font-size: 10px; font-weight: 700; }
.home-tool-card strong { font-size: 13px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-tool-card em { grid-column: 2; justify-self: start; font-style: normal; font-size: 10px; font-weight: 800; color: var(--brand); background: rgba(59, 91, 219, .08); padding: 3px 7px; border-radius: 999px; }

.tool-hub-sheet { max-height: min(74vh, 610px); }
.tool-hub-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 6px 0 12px; }
.tool-hub-card {
  border: 1px solid rgba(29, 40, 61, .09);
  border-radius: 20px;
  padding: 17px 14px;
  min-height: 142px;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
  text-align: left;
  color: var(--text);
  box-shadow: 0 8px 24px rgba(24, 34, 53, .05);
}
.tool-hub-card:active { transform: scale(.98); }
.tool-hub-card strong { font-size: 16px; }
.tool-hub-card small { color: var(--muted); line-height: 1.45; font-size: 11px; }
.tool-card-icon { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 3px; }
.tool-card-icon svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.tool-card-icon.note { color: #4264d7; background: #e8edff; }
.tool-card-icon.meeting { color: #d27722; background: #fff0dc; }
.tool-card-icon.ledger { color: #0a8a66; background: #dcf7ed; }
.tool-card-icon.settings { color: #6b7280; background: #edf0f4; }

.idea-sheet, .ledger-sheet { max-height: 94vh; }
.idea-main-header, .ledger-main-header { margin-bottom: 10px; }
.idea-summary-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 4px 0 12px;
}
.idea-summary-strip div { background: #f7f8fb; border: 1px solid rgba(29, 40, 61, .07); border-radius: 15px; padding: 10px; display: grid; gap: 2px; text-align: center; }
.idea-summary-strip strong { font-size: 19px; color: #5637a7; }
.idea-summary-strip span { font-size: 10px; color: var(--muted); font-weight: 700; }
.idea-search-card { margin: 0 0 10px; }
.idea-filter-row { display: flex; overflow-x: auto; gap: 8px; padding: 2px 0 12px; scrollbar-width: none; }
.idea-filter-row::-webkit-scrollbar { display: none; }
.idea-filter { flex: 0 0 auto; border: 1px solid rgba(29, 40, 61, .09); background: #fff; border-radius: 999px; padding: 8px 13px; color: var(--muted); font-weight: 750; font-size: 12px; }
.idea-filter.active { background: #1b2436; border-color: #1b2436; color: #fff; }
.idea-toolbar, .ledger-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 5px 1px 12px; }
.idea-toolbar h3, .ledger-toolbar h3 { margin: 2px 0 0; font-size: 18px; letter-spacing: -.02em; }
.idea-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; padding-bottom: 18px; }
.idea-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(29, 40, 61, .08);
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(24, 34, 53, .055);
}
.idea-card.important { box-shadow: 0 0 0 2px rgba(132, 88, 219, .18), 0 10px 28px rgba(64, 43, 113, .09); }
.idea-card-image, .idea-card-placeholder { width: 100%; aspect-ratio: 1.28; border: 0; padding: 0; display: grid; place-items: center; background: linear-gradient(140deg, #eee9fb, #f8f6fd); overflow: hidden; }
.idea-card-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.idea-card-placeholder svg { width: 36px; height: 36px; fill: none; stroke: #8b69cf; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.idea-card-body { padding: 10px 10px 12px; }
.idea-card-top { display: flex; align-items: center; gap: 5px; margin-bottom: 7px; padding-right: 24px; }
.idea-status, .idea-star { border-radius: 999px; padding: 3px 7px; font-size: 9px; font-weight: 800; }
.idea-status.status-inbox { color: #6d4f20; background: #fff1d6; }
.idea-status.status-selected { color: #2548ac; background: #e7edff; }
.idea-status.status-applied { color: #087357; background: #dcf7ed; }
.idea-star { color: #7048bb; background: #eee6ff; }
.idea-card h3 { font-size: 14px; line-height: 1.35; margin: 0 0 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.idea-card p { margin: 0 0 9px; color: var(--muted); font-size: 11px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.idea-card-meta { display: flex; gap: 5px; flex-wrap: wrap; }
.idea-card-meta span { color: #657085; background: #f2f4f7; border-radius: 999px; padding: 3px 6px; font-size: 8px; font-weight: 700; }
.idea-edit-mini { position: absolute; right: 7px; top: 7px; width: 28px; height: 28px; border: 0; border-radius: 10px; background: rgba(255,255,255,.9); color: #4f596b; display: grid; place-items: center; backdrop-filter: blur(8px); }
.idea-edit-mini svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.idea-edit-sheet { max-height: 95vh; }
.idea-media-section { margin-top: 12px; }
.two-tools { grid-template-columns: repeat(2, 1fr) !important; }
.idea-image-preview { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.idea-preview-item { position: relative; aspect-ratio: 1; border-radius: 13px; overflow: hidden; background: #eef1f5; }
.idea-preview-item > button:first-child { width: 100%; height: 100%; border: 0; padding: 0; }
.idea-preview-item img { width: 100%; height: 100%; display: block; object-fit: cover; }
.idea-preview-item .remove-attachment { top: 5px; right: 5px; }
.idea-detail-body { display: grid; gap: 12px; padding-bottom: 94px; }
.idea-detail-body section { background: #fff; border: 1px solid rgba(29, 40, 61, .08); border-radius: 17px; padding: 14px; }
.idea-detail-body section.accent { background: linear-gradient(145deg, #f4efff, #faf8ff); border-color: #e5d9ff; }
.idea-detail-body p { margin: 7px 0 0; color: #384256; font-size: 14px; line-height: 1.7; }
.idea-detail-body a { display: block; margin-top: 7px; color: var(--brand); word-break: break-all; font-size: 12px; }
.idea-detail-meta, .idea-detail-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.idea-detail-meta span, .idea-detail-tags span { border-radius: 999px; background: #eef1f5; color: #5e687a; padding: 5px 9px; font-size: 10px; font-weight: 750; }
.idea-detail-meta span.important { color: #7048bb; background: #eee6ff; }
.idea-detail-images { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 9px; }
.idea-detail-image { aspect-ratio: 1.25; border: 0; padding: 0; overflow: hidden; border-radius: 12px; background: #eef1f5; }
.idea-detail-image img { width: 100%; height: 100%; object-fit: cover; display: block; }

.ledger-month-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin: 4px 0 12px; }
.ledger-month-row label { display: grid; gap: 5px; color: var(--muted); font-size: 10px; font-weight: 750; }
.ledger-month-row input { border: 1px solid rgba(29, 40, 61, .1); background: #fff; color: var(--text); border-radius: 12px; padding: 9px 11px; font: inherit; font-size: 13px; }
.ledger-summary-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 8px; margin-bottom: 11px; }
.ledger-summary-card { border-radius: 17px; padding: 12px 10px; display: grid; gap: 5px; min-width: 0; }
.ledger-summary-card span { font-size: 9px; font-weight: 750; opacity: .72; }
.ledger-summary-card strong { font-size: 15px; letter-spacing: -.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ledger-summary-card.balance { color: #fff; background: linear-gradient(135deg, #1b2436, #34415a); }
.ledger-summary-card.income { color: #087357; background: #dcf7ed; }
.ledger-summary-card.expense { color: #a34439; background: #ffebe8; }
.ledger-breakdown-card { padding: 14px; margin-bottom: 12px; }
.ledger-breakdown { display: grid; gap: 11px; margin-top: 11px; }
.ledger-breakdown-row > div:first-child { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 5px; font-size: 11px; }
.ledger-breakdown-row strong { font-size: 10px; color: var(--muted); }
.ledger-bar { height: 7px; border-radius: 999px; overflow: hidden; background: #eef1f5; }
.ledger-bar span { height: 100%; display: block; border-radius: inherit; background: linear-gradient(90deg, #3c65d8, #7d91e8); }
.ledger-no-breakdown { margin: 2px 0; color: var(--muted); font-size: 11px; }
.ledger-list { display: grid; gap: 8px; padding-bottom: 18px; }
.ledger-row { width: 100%; border: 1px solid rgba(29, 40, 61, .08); border-radius: 16px; background: #fff; padding: 11px; display: grid; grid-template-columns: 38px 1fr auto; gap: 10px; align-items: center; text-align: left; color: var(--text); box-shadow: 0 6px 18px rgba(24,34,53,.04); }
.ledger-row:active { transform: scale(.992); }
.ledger-row-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 13px; font-weight: 850; font-size: 12px; }
.ledger-row-icon.income { color: #087357; background: #dcf7ed; }
.ledger-row-icon.expense { color: #a34439; background: #ffebe8; }
.ledger-row-main { min-width: 0; display: grid; gap: 4px; }
.ledger-row-main strong { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ledger-row-main small { color: var(--muted); font-size: 9px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ledger-row-amount { font-size: 13px; white-space: nowrap; }
.ledger-row-amount.income { color: #087357; }
.ledger-row-amount.expense { color: #b54c3f; }
.ledger-type-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: #edf0f4; border-radius: 14px; padding: 4px; margin-bottom: 14px; }
.ledger-type-toggle button { border: 0; border-radius: 11px; background: transparent; color: var(--muted); padding: 10px; font-weight: 800; }
.ledger-type-toggle button.active { background: #fff; color: var(--text); box-shadow: 0 4px 14px rgba(24,34,53,.08); }
.money-field > div { display: flex; align-items: center; border: 1px solid rgba(29, 40, 61, .12); background: #fff; border-radius: 15px; overflow: hidden; }
.money-field > div:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(59, 91, 219, .1); }
.money-field b { padding-left: 14px; font-size: 22px; color: #364153; }
.money-field input { border: 0 !important; box-shadow: none !important; font-size: 26px !important; font-weight: 800; padding-left: 8px !important; }

@media (max-width: 360px) {
  .home-tools-grid { grid-template-columns: 1fr; }
  .idea-list { grid-template-columns: 1fr; }
  .ledger-summary-grid { grid-template-columns: 1fr 1fr; }
  .ledger-summary-card.balance { grid-column: 1 / -1; }
}

@media (min-width: 700px) {
  .idea-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tool-hub-grid { grid-template-columns: repeat(4, 1fr); }
  .tool-hub-card { min-height: 150px; }
}

/* ===== v1.7 轻量稳存版 ===== */
.storage-health-panel {
  margin: 8px 0;
  padding: 16px;
  border: 1px solid rgba(86, 72, 182, .14);
  border-radius: 22px;
  background: linear-gradient(145deg, #f7f5ff 0%, #ffffff 52%, #f4f8ff 100%);
  box-shadow: 0 12px 30px rgba(34, 42, 70, .07);
}
.storage-health-head { display: flex; align-items: center; gap: 12px; }
.storage-health-head > span:last-child { display: grid; gap: 3px; min-width: 0; }
.storage-health-head strong { font-size: 15px; color: #172033; }
.storage-health-head small { color: #6f7788; line-height: 1.45; }
.storage-shield { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; color: #5b4bc4; background: #ece8ff; flex: 0 0 auto; }
.storage-shield svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.storage-health-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0 12px; }
.storage-health-grid > div { padding: 11px 12px; border-radius: 15px; background: rgba(255,255,255,.88); border: 1px solid rgba(23,32,51,.07); display: grid; gap: 4px; }
.storage-health-grid span { font-size: 11px; color: #828999; }
.storage-health-grid strong { font-size: 13px; color: #172033; overflow-wrap: anywhere; }
.storage-health-grid strong.needs-backup { color: #b45309; }
.storage-warning { margin: 10px 2px 0; font-size: 11px; line-height: 1.55; color: #7d6f62; }

.draft-status { display: block; margin-top: 3px; color: #7a8191; font-size: 11px; font-weight: 600; }

.idea-simple-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 8px 0 14px; }
.idea-simple-head > span { color: #6d7484; font-size: 13px; }
.idea-simple-head strong { color: #5a47be; font-size: 22px; margin-right: 4px; }
.simple-idea-list { display: grid; gap: 13px; padding-bottom: 20px; }
.idea-card.simple { display: grid; grid-template-columns: 98px minmax(0, 1fr) 38px; align-items: stretch; gap: 0; min-height: 112px; overflow: hidden; border-radius: 22px; background: #fff; border: 1px solid rgba(27,34,52,.08); box-shadow: 0 10px 28px rgba(24,33,54,.07); }
.idea-card.simple .idea-card-image,
.idea-card.simple .idea-card-placeholder { width: 98px; height: 100%; min-height: 112px; border-radius: 0; border: 0; background: #eef1f6; }
.idea-card.simple .idea-card-image img { width: 100%; height: 100%; object-fit: cover; }
.idea-card.simple .idea-card-placeholder { display: grid; place-items: center; color: #7a6bd2; }
.idea-card.simple .idea-card-placeholder svg { width: 32px; height: 32px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.idea-card.simple .idea-card-body { border: 0; background: transparent; text-align: left; padding: 15px 12px 13px 15px; min-width: 0; display: flex; flex-direction: column; justify-content: space-between; gap: 10px; color: inherit; }
.idea-card.simple .idea-card-body p { margin: 0; font-size: 14px; line-height: 1.62; color: #222a3a; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-wrap; }
.idea-card.simple .idea-card-meta { display: flex; gap: 9px; font-size: 11px; color: #8a91a0; }
.idea-card.simple .idea-edit-mini { position: static; align-self: start; margin: 10px 8px 0 0; }
.idea-note-field { margin-top: 14px; }
.idea-note-field textarea { min-height: 180px; font-size: 16px; line-height: 1.65; }
.idea-note-detail { margin-top: 16px; padding: 16px; border-radius: 18px; background: #f7f8fb; }
.idea-note-detail p { margin: 9px 0 0; line-height: 1.75; color: #2e3545; }

.record-simple-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 8px 0 13px; }
.record-simple-summary > div { padding: 13px 14px; border-radius: 17px; background: #f7f8fb; border: 1px solid rgba(25,32,48,.07); display: flex; align-items: baseline; justify-content: space-between; }
.record-simple-summary strong { font-size: 21px; color: #5d4ac2; }
.record-simple-summary span { font-size: 12px; color: #747b8b; }
.compact-record-filter { grid-template-columns: repeat(3, 1fr); }
.record-tools.three-tools, .attachment-tools.three-tools { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.record-card { border-radius: 21px; box-shadow: 0 9px 26px rgba(27,35,57,.065); }
.record-card-main p { -webkit-line-clamp: 2; }
.record-detail-file { display: grid; gap: 7px; }
.record-download-link { display: inline-flex; align-items: center; justify-content: center; min-height: 34px; border-radius: 11px; background: #f0effb; color: #5542b8; font-size: 12px; font-weight: 700; text-decoration: none; }
.record-detail-media .record-download-link { margin-top: 8px; }

@media (max-width: 380px) {
  .idea-card.simple { grid-template-columns: 84px minmax(0, 1fr) 34px; }
  .idea-card.simple .idea-card-image,
  .idea-card.simple .idea-card-placeholder { width: 84px; }
  .storage-health-grid { grid-template-columns: 1fr; }
}
