:root {
  --ink: #20241f;
  --ink-soft: #505750;
  --muted: #7b817a;
  --paper: #f5f2eb;
  --paper-deep: #ebe7de;
  --card: #fefdf9;
  --green: #426d57;
  --green-deep: #2f5542;
  --green-soft: #e2ece5;
  --accent-warm: #bd744f;
  --accent-warm-soft: #f4e5dc;
  --danger: #a6534d;
  --line: rgba(43, 54, 46, 0.10);
  --line-strong: rgba(43, 54, 46, 0.17);
  --shadow-sm: 0 1px 2px rgba(45, 40, 32, 0.035), 0 8px 22px rgba(45, 40, 32, 0.055);
  --shadow-lg: 0 24px 72px rgba(42, 38, 31, 0.18);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  font-family: Inter, ui-rounded, -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* { box-sizing: border-box; }

html {
  background: var(--paper);
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  overscroll-behavior: none;
}

body {
  min-width: 320px;
  margin: 0;
  background:
    radial-gradient(circle at 100% -10%, rgba(186, 211, 196, 0.34), transparent 27rem),
    var(--paper);
  overscroll-behavior: none;
}

button, textarea, input { font: inherit; }
button { color: inherit; }
button, a, [role="button"] {
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
input, textarea, select { font-size: 16px; }
button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(65, 107, 86, 0.28);
  outline-offset: 3px;
}
[hidden] { display: none !important; }

h1, h2, h3, p { margin-top: 0; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.app-shell {
  width: min(100%, 760px);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: 0 18px calc(150px + env(safe-area-inset-bottom, 0px));
}

.topbar {
  position: sticky;
  z-index: 10;
  top: 0;
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) 44px;
  gap: 8px;
  align-items: center;
  min-height: calc(94px + env(safe-area-inset-top, 0px));
  padding-top: env(safe-area-inset-top, 0px);
  text-align: center;
  background: linear-gradient(to bottom, rgba(245, 242, 235, 0.98) 76%, rgba(245, 242, 235, 0));
}

.product-switch { justify-self: start; }
.icon-button { justify-self: end; }
.title-lockup { min-width: 0; }
.topbar h1 {
  margin: 3px 0 0;
  overflow: hidden;
  font-size: clamp(24px, 6vw, 30px);
  font-weight: 760;
  letter-spacing: -0.035em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.eyebrow {
  margin: 0;
  color: var(--green);
  font-size: 10px;
  font-weight: 780;
  letter-spacing: 0.15em;
  line-height: 1.4;
}

.icon-button, .close {
  display: grid;
  width: 44px;
  height: 44px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(49, 62, 52, 0.08);
  border-radius: 50%;
  background: rgba(255, 254, 250, 0.9);
  box-shadow: var(--shadow-sm);
  transition: transform 120ms var(--ease-out), background-color 140ms ease;
}
.icon-button svg { width: 22px; height: 22px; }
.icon-button:active, .close:active { transform: scale(0.94); }

.workspace-intro {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 3px 17px;
}
.workspace-intro h2 {
  max-width: 16ch;
  margin: 4px 0 5px;
  font-size: clamp(28px, 8vw, 39px);
  line-height: 1.03;
  letter-spacing: -0.045em;
}
.workspace-intro p { margin: 0; color: var(--muted); line-height: 1.45; }

.mini-orbit {
  display: grid;
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  margin-top: 5px;
  place-items: center;
  border-radius: 19px;
  color: var(--green);
  background: var(--green-soft);
  box-shadow: inset 0 0 0 1px rgba(65, 107, 86, 0.08);
}
.mini-orbit svg { width: 27px; height: 27px; }

.focus-card {
  position: relative;
  overflow: hidden;
  padding: 23px;
  border: 1px solid rgba(57, 95, 75, 0.18);
  border-radius: 28px;
  color: #f8fbf9;
  background: var(--green);
  box-shadow: 0 16px 40px rgba(49, 83, 66, 0.18);
}
.focus-card::after {
  position: absolute;
  top: -42px;
  right: -42px;
  width: 138px;
  height: 138px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 50%;
  content: "";
  box-shadow: 0 0 0 24px rgba(255, 255, 255, 0.035), 0 0 0 48px rgba(255, 255, 255, 0.025);
}
.focus-label { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 740; opacity: 0.78; }
.focus-label span { width: 7px; height: 7px; border-radius: 50%; background: #cce6d5; }
.focus-card h3 {
  position: relative;
  z-index: 1;
  max-width: 24ch;
  margin: 16px 0 11px;
  font-size: clamp(21px, 5.6vw, 27px);
  line-height: 1.2;
  letter-spacing: -0.025em;
}
.focus-meta { margin: 0; font-size: 13px; opacity: 0.68; }

.pulse-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 11px;
}
.pulse-item {
  min-width: 0;
  padding: 14px 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 254, 250, 0.78);
}
.pulse-item b { display: block; font-size: 21px; line-height: 1; letter-spacing: -0.035em; }
.pulse-item span { display: block; margin-top: 6px; overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin: 28px 3px 13px;
}
.section-head h2 { margin: 0; font-size: 20px; letter-spacing: -0.025em; }
.section-head > span { color: var(--muted); font-size: 12px; }
.text-action, .back-action {
  padding: 5px 0;
  border: 0;
  color: var(--green);
  background: transparent;
  font-size: 13px;
  font-weight: 720;
}
.back-action { display: inline-flex; gap: 7px; align-items: center; margin: 2px 2px 17px; }

.task-list, .capture-list, .note-list { display: grid; gap: 9px; }
.task-card {
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 254, 250, 0.91);
  box-shadow: 0 4px 16px rgba(51, 46, 37, 0.035);
}
.task-check {
  width: 24px;
  height: 24px;
  border: 1.8px solid #aec0b5;
  border-radius: 50%;
  background: #fff;
}
.task-card p { margin: 1px 0 0; line-height: 1.38; overflow-wrap: anywhere; }
.task-card small { display: block; margin-top: 6px; color: var(--muted); font-size: 11px; }
.card-kind { display: inline-flex; width: fit-content; margin-bottom: 6px; padding: 3px 7px; border-radius: 999px; font-size: 9px; font-weight: 780; letter-spacing: .07em; line-height: 1; text-transform: uppercase; }
.task-kind { color: var(--green); background: var(--green-soft); }
.info-kind { color: #716858; background: #eee9df; }
.task-arrow { color: #a6aaa4; font-size: 21px; line-height: 1; }

.folder-peek {
  display: grid;
  grid-auto-columns: minmax(148px, 44%);
  grid-auto-flow: column;
  gap: 12px;
  overflow-x: auto;
  margin: 0 -18px;
  padding: 11px 18px 7px;
  scroll-padding: 18px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.folder-peek::-webkit-scrollbar { display: none; }
.folder-peek .folder { scroll-snap-align: start; }

.folder-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 17px 12px;
  padding-top: 8px;
}
.folder {
  --folder-bg: #e7eee8;
  --folder-edge: #b8cbbf;
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 144px;
  padding: 22px 17px 16px;
  flex-direction: column;
  justify-content: space-between;
  overflow: visible;
  border: 1px solid var(--folder-edge);
  border-radius: 11px 22px 22px 22px;
  color: var(--ink);
  background: var(--folder-bg);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.38), 0 7px 18px rgba(49, 45, 38, 0.06);
  text-align: left;
  transition: transform 130ms var(--ease-out), box-shadow 160ms ease;
}
.folder::before {
  position: absolute;
  z-index: -1;
  top: -11px;
  left: -1px;
  width: 54%;
  height: 24px;
  border: 1px solid var(--folder-edge);
  border-bottom: 0;
  border-radius: 13px 13px 0 0;
  background: var(--folder-bg);
  content: "";
}
.folder::after {
  position: absolute;
  z-index: -2;
  right: 8px;
  bottom: -5px;
  left: 8px;
  height: 22px;
  border: 1px solid rgba(80, 77, 69, 0.10);
  border-radius: 0 0 18px 18px;
  background: rgba(255, 254, 250, 0.72);
  content: "";
}
.folder:active { transform: scale(0.97); box-shadow: inset 0 1px rgba(255,255,255,.38), 0 3px 9px rgba(49,45,38,.08); }
.folder-icon {
  display: grid;
  width: 39px;
  height: 39px;
  place-items: center;
  border-radius: 13px;
  color: color-mix(in srgb, var(--folder-edge), #253d31 38%);
  background: rgba(255, 255, 255, 0.42);
}
.folder-icon svg { width: 22px; height: 22px; }
.folder-copy { min-width: 0; }
.folder b { display: block; overflow: hidden; font-size: 17px; letter-spacing: -0.02em; text-overflow: ellipsis; white-space: nowrap; }
.folder small { display: block; margin-top: 5px; color: var(--ink-soft); font-size: 11px; opacity: 0.75; }
.folder.mint, .folder.green { --folder-bg: #e3ede6; --folder-edge: #afc7b7; }
.folder.blue { --folder-bg: #e4ecf2; --folder-edge: #b6c9d8; }
.folder.peach { --folder-bg: #f3e5d8; --folder-edge: #dfbfa8; }
.folder.violet { --folder-bg: #ebe6f1; --folder-edge: #c9bdd8; }
.folder.rose { --folder-bg: #f1e3e4; --folder-edge: #d9b9bc; }
.folder.gold { --folder-bg: #f2ebd8; --folder-edge: #ddc995; }
.folder.slate { --folder-bg: #e9e7e1; --folder-edge: #c9c5ba; }

.vault-banner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 19px 20px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 254, 250, 0.84);
  box-shadow: var(--shadow-sm);
}
.vault-banner h2 { margin: 4px 0 5px; font-size: 25px; letter-spacing: -0.035em; }
.vault-banner p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.4; }
.vault-mark { display: grid; width: 54px; height: 54px; place-items: center; border-radius: 18px; color: var(--green); background: var(--green-soft); }
.vault-mark svg { width: 28px; height: 28px; }
.folder-rename-action { margin-top: 11px; padding: 7px 10px; border: 1px solid rgba(65,107,86,.16); border-radius: 999px; color: var(--green-deep); background: rgba(255,255,255,.54); font-size: 11px; font-weight: 720; transition: transform 120ms var(--ease-out), background-color 140ms ease; }
.folder-rename-action:active { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) { .folder-rename-action:hover { background: white; } }
@media (prefers-reduced-motion: reduce) { .folder-rename-action { transition-duration: 0ms; } }

.search-wrap { position: relative; margin: 17px 0 18px; }
.search-wrap svg { position: absolute; top: 50%; left: 16px; width: 19px; height: 19px; color: #92968f; transform: translateY(-50%); }
.search {
  width: 100%;
  padding: 14px 16px 14px 45px;
  border: 1px solid var(--line);
  border-radius: 17px;
  color: var(--ink);
  background: rgba(255, 254, 250, 0.92);
  box-shadow: 0 2px 10px rgba(48, 44, 36, 0.025);
  outline: none;
}
.search:focus { border-color: rgba(65, 107, 86, 0.36); box-shadow: 0 0 0 4px rgba(65, 107, 86, 0.08); }

.note-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 13px 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 19px;
  color: var(--ink);
  background: rgba(255, 254, 250, 0.9);
  text-align: left;
  transition: transform 120ms var(--ease-out), background-color 140ms ease;
}
.note-row:active { transform: scale(0.985); background: #fff; }
.note-glyph { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 13px; color: var(--green); background: var(--green-soft); }
.note-glyph svg { width: 20px; height: 20px; }
.note-copy { min-width: 0; }
.note-row b { display: block; overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.note-row small { display: -webkit-box; margin-top: 4px; overflow: hidden; color: var(--muted); font-size: 11px; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.note-chevron { color: #a9aca7; font-size: 20px; }

.parking-card {
  position: relative;
  padding: 22px 21px 20px;
  overflow: hidden;
  border: 1px solid #c3d2c8;
  border-radius: 26px;
  background: #e7eee9;
}
.parking-card::before {
  position: absolute;
  top: -23px;
  right: 24px;
  width: 74px;
  height: 42px;
  border: 1px solid #c3d2c8;
  border-radius: 16px 16px 0 0;
  background: #e7eee9;
  content: "";
}
.parking-number { margin: 11px 0 4px; font-size: 48px; font-weight: 780; line-height: 1; letter-spacing: -0.05em; }
.parking-card > p:last-child { margin-bottom: 0; color: var(--ink-soft); line-height: 1.45; }
.capture-card {
  position: relative;
  padding: 17px 18px 17px 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 4px 18px 18px 4px;
  background: #fffefa;
  box-shadow: var(--shadow-sm);
}
.capture-card::before { position: absolute; top: 0; bottom: 0; left: 0; width: 5px; background: #91ad9c; content: ""; }
.capture-card small { display: block; margin-bottom: 8px; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; }
.capture-card p { margin: 0; line-height: 1.45; overflow-wrap: anywhere; }

.assistant-wrap { display: flex; min-height: calc(100dvh - 225px); flex-direction: column; }
.assistant-welcome { display: flex; gap: 14px; align-items: flex-start; padding: 18px; border: 1px solid var(--line); border-radius: 22px; background: rgba(255,254,250,.82); }
.assistant-orb { display: grid; flex: 0 0 auto; width: 45px; height: 45px; place-items: center; border-radius: 50%; color: white; background: #0d7475; box-shadow: 0 8px 20px rgba(13,116,117,.2); }
.assistant-orb svg { width: 22px; height: 22px; }
.assistant-welcome p { margin: 2px 0 0; color: var(--ink-soft); font-size: 14px; line-height: 1.45; }
.messages { display: flex; flex: 1; flex-direction: column; gap: 10px; padding: 16px 0 18px; }
.message { max-width: 88%; padding: 14px 16px; border-radius: 19px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.message.bot { align-self: flex-start; border-bottom-left-radius: 6px; background: var(--green-soft); }
.message.user { align-self: flex-end; border-bottom-right-radius: 6px; color: white; background: var(--green); }
.composer { position: sticky; bottom: calc(91px + env(safe-area-inset-bottom, 0px)); display: flex; gap: 7px; padding: 7px; border: 1px solid var(--line); border-radius: 23px; background: rgba(255, 254, 250, 0.96); box-shadow: var(--shadow-sm); }
.composer input { min-width: 0; flex: 1; padding: 9px 11px; border: 0; outline: 0; background: transparent; }
.composer button { display: grid; width: 43px; height: 43px; padding: 0; place-items: center; border: 0; border-radius: 16px; color: white; background: var(--green); transition: transform 120ms var(--ease-out); }
.composer button:active { transform: scale(0.93); }
.composer svg { width: 20px; height: 20px; }

.module-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.module-card { min-height: 123px; padding: 17px; border: 1px solid var(--line); border-radius: 22px; background: rgba(255,254,250,.88); }
.module-card svg { width: 23px; height: 23px; color: var(--green); }
.module-card b { display: block; margin-top: 21px; }
.module-card small { display: block; margin-top: 4px; color: var(--muted); }
.health { padding: 20px; border: 1px solid var(--line); border-radius: 24px; background: rgba(255,254,250,.88); }
.health-row { display: flex; justify-content: space-between; gap: 18px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.health-row:last-child { padding-bottom: 0; border-bottom: 0; }
.health-row span:last-child, .health-row b { text-align: right; }
.pill { display: inline-flex; padding: 5px 9px; border-radius: 999px; color: var(--green); background: var(--green-soft); font-size: 11px; font-weight: 720; }

.capture-fab {
  position: fixed;
  z-index: 20;
  right: max(20px, calc((100vw - 760px) / 2 + 20px));
  bottom: calc(91px + env(safe-area-inset-bottom, 0px));
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 13px 18px;
  border: 0;
  border-radius: 21px;
  color: white;
  background: var(--green);
  box-shadow: 0 12px 28px rgba(49, 83, 66, 0.28);
  transition: transform 130ms var(--ease-out), background-color 140ms ease;
}
.capture-fab span { font-size: 20px; line-height: 1; }
.capture-fab b { font-size: 14px; }
.capture-fab:active { transform: scale(0.96); background: var(--green-deep); }

.tabbar {
  position: fixed;
  z-index: 18;
  left: 50%;
  bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  width: min(calc(100% - 24px), 724px);
  min-height: 72px;
  padding: 6px;
  transform: translateX(-50%);
  border: 1px solid rgba(54, 54, 48, 0.09);
  border-radius: 27px;
  background: rgba(255, 254, 250, 0.94);
  box-shadow: 0 12px 36px rgba(44, 40, 33, 0.13);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.tabbar button { display: flex; min-width: 0; padding: 5px 2px; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: 0; border-radius: 20px; color: #797d77; background: transparent; transition: transform 120ms var(--ease-out), color 140ms ease, background-color 140ms ease; }
.tabbar button:active { transform: scale(0.94); }
.tabbar button > svg { width: 22px; height: 22px; }
.tabbar button small { overflow: hidden; max-width: 100%; font-size: 9px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.tabbar button.active { color: var(--green-deep); background: var(--green-soft); }
.brain-orb { display: grid; width: 38px; height: 38px; margin-top: -15px; place-items: center; border-radius: 50%; color: white; background: #0d7475; box-shadow: 0 7px 18px rgba(13,116,117,.22); }
.brain-orb svg { width: 20px; height: 20px; }
.tabbar .brain.active { background: transparent; }

.sheet {
  width: min(100%, 760px);
  max-width: 760px;
  max-height: calc(100dvh - env(safe-area-inset-top, 0px) - 22px);
  margin: auto auto 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 29px 29px 0 0;
  opacity: 0;
  background: #fffefa;
  box-shadow: var(--shadow-lg);
  transform: translateY(100%);
  transition: opacity 180ms var(--ease-out), transform 260ms var(--ease-drawer), overlay 260ms allow-discrete, display 260ms allow-discrete;
}
.sheet[open] { opacity: 1; transform: translateY(0); }
@starting-style { .sheet[open] { opacity: 0; transform: translateY(100%); } }
.sheet::backdrop { background: rgba(27, 28, 25, 0.42); backdrop-filter: blur(2px); }
.sheet-content { max-height: inherit; padding: 13px 21px calc(25px + env(safe-area-inset-bottom, 0px)); overflow-y: auto; overscroll-behavior: contain; }
.sheet-handle { width: 42px; height: 5px; margin: 1px auto 22px; border-radius: 99px; background: #d7d5cf; touch-action: pan-x; }
.sheet-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.sheet h2 { margin: 5px 0 18px; font-size: 27px; letter-spacing: -0.035em; }
.close { flex: 0 0 auto; border-color: transparent; box-shadow: none; color: #747872; background: #f0eee8; font-size: 27px; }
.sheet textarea { width: 100%; min-height: 150px; padding: 16px; resize: vertical; border: 1px solid var(--line-strong); border-radius: 18px; color: var(--ink); background: #faf9f5; outline: none; }
.sheet textarea:focus { border-color: rgba(65,107,86,.38); box-shadow: 0 0 0 4px rgba(65,107,86,.08); }
.hint { margin: 10px 2px 18px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.primary { width: 100%; padding: 15px 18px; border: 0; border-radius: 18px; color: white; background: var(--green); font-weight: 740; transition: transform 130ms var(--ease-out), background-color 140ms ease; }
.primary:active { transform: scale(0.98); background: var(--green-deep); }
.note-sheet { height: min(92dvh, 900px); }
.note-close { position: sticky; z-index: 2; top: 0; float: right; }
#noteContent { padding: 4px 3px 34px; }
.note-header { padding: 2px 54px 18px 0; }
.note-header h2 { margin: 8px 0 7px; overflow-wrap: anywhere; }
.note-header p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.note-readable { display: grid; gap: 13px; }
.note-summary { padding: 17px 18px; border: 1px solid rgba(65,107,86,.12); border-radius: 19px; background: var(--green-soft); }
.note-summary span { display: block; margin-bottom: 7px; color: var(--green); font-size: 10px; font-weight: 780; letter-spacing: .12em; text-transform: uppercase; }
.note-summary p, .note-section p { margin: 0; line-height: 1.55; overflow-wrap: anywhere; }
.note-section { overflow: hidden; border: 1px solid var(--line); border-radius: 19px; background: rgba(255,255,255,.58); }
.note-section > summary { display: flex; min-height: 52px; padding: 14px 17px; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; list-style: none; }
.note-section > summary::-webkit-details-marker { display: none; }
.note-section > summary span { font-size: 15px; font-weight: 750; letter-spacing: -.015em; }
.note-section > summary small { flex: 0 0 auto; color: var(--muted); font-size: 10px; }
.note-section > summary::after { content: '⌄'; color: var(--muted); font-size: 17px; transform: rotate(0); transition: transform 150ms var(--ease-out); }
.note-section[open] > summary::after { transform: rotate(180deg); }
.note-section-body { padding: 0 17px 17px; }
.note-section-body > p + p { margin-top: 11px; }
.note-manage h3 { margin: 0 0 12px; font-size: 15px; letter-spacing: -.015em; }
.note-points { display: grid; gap: 0; }
.note-points article { display: grid; grid-template-columns: 7px minmax(0,1fr); gap: 11px; padding: 12px 0; border-top: 1px solid var(--line); }
.note-points article:first-child { padding-top: 2px; border-top: 0; }
.note-points article:last-child { padding-bottom: 0; }
.note-points i { width: 7px; height: 7px; margin-top: 7px; border-radius: 50%; background: var(--green); }
.note-points b { display: block; margin-bottom: 3px; font-size: 14px; }
.note-points p { color: var(--ink-soft); font-size: 13px; }
.note-links .note-section-body { display: grid; gap: 7px; }
.note-links a { display: flex; min-width: 0; padding: 10px 12px; align-items: center; justify-content: space-between; gap: 10px; border-radius: 12px; color: var(--green-deep); background: var(--green-soft); font-size: 12px; font-weight: 700; text-decoration: none; overflow-wrap: anywhere; }
.note-original { border-top: 1px solid var(--line); color: var(--muted); }
.note-original summary { padding: 15px 2px; cursor: pointer; font-size: 12px; font-weight: 700; }
@media (prefers-reduced-motion: reduce) { .note-section > summary::after { transition-duration: 0ms; } }
.note-original pre { margin: 0; padding: 15px; overflow: auto; border-radius: 15px; color: var(--ink-soft); background: var(--paper); font: 12px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; overflow-wrap: anywhere; user-select: text; -webkit-user-select: text; }
.note-manage { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }

.toast {
  position: fixed;
  z-index: 40;
  right: 18px;
  bottom: calc(96px + env(safe-area-inset-bottom, 0px));
  left: 18px;
  width: fit-content;
  max-width: min(420px, calc(100% - 36px));
  margin: 0 auto;
  padding: 12px 15px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 15px;
  color: white;
  background: #273b31;
  box-shadow: 0 12px 32px rgba(26,36,30,.22);
  opacity: 0;
  pointer-events: none;
  transform: translateY(100%);
  transition: opacity 180ms var(--ease-out), transform 200ms var(--ease-out);
}
.toast.visible { opacity: 1; transform: translateY(0); }

.empty { padding: 55px 26px; color: var(--muted); text-align: center; }
.empty-icon { display: grid; width: 60px; height: 60px; margin: 0 auto 15px; place-items: center; border-radius: 20px; color: var(--green); background: var(--green-soft); font-size: 26px; }
.empty h2 { margin-bottom: 7px; color: var(--ink); }
.empty p { line-height: 1.5; }
.loader { display: flex; min-height: 45dvh; align-items: center; justify-content: center; gap: 10px; color: var(--muted); }
.loader span { width: 16px; height: 16px; border: 2px solid #cbd7cf; border-top-color: var(--green); border-radius: 50%; animation: spin 650ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (hover: hover) and (pointer: fine) {
  .icon-button:hover, .close:hover { background: #fff; }
  .folder:hover { transform: translateY(-2px); box-shadow: inset 0 1px rgba(255,255,255,.4), 0 12px 25px rgba(49,45,38,.09); }
  .note-row:hover { background: #fff; }
  .capture-fab:hover, .primary:hover { background: var(--green-deep); }
  .quiet-action:hover { color: var(--ink-soft); background: var(--paper-deep); }
  .tabbar button:hover { color: var(--green-deep); }
  .text-action:hover, .back-action:hover { color: var(--green-deep); }
}

@media (min-width: 620px) {
  .folder-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .folder-peek { grid-auto-columns: minmax(165px, 30%); }
  .capture-fab { bottom: 98px; }
  .module-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
}

@media (max-width: 390px) {
  .app-shell { padding-right: 14px; padding-left: 14px; }
  .folder-peek { margin-right: -14px; margin-left: -14px; padding-right: 14px; padding-left: 14px; }
  .pulse-item { padding: 13px 9px; }
  .pulse-item span { font-size: 10px; }
  .capture-fab { right: 16px; padding: 13px; }
  .capture-fab b { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .folder, .note-row, .capture-fab, .primary, .secondary, .quiet-action, .tabbar button, .icon-button, .close, .composer button { transition-duration: 0ms; }
  .sheet { transition: opacity 160ms ease, overlay 160ms allow-discrete, display 160ms allow-discrete; transform: none; }
  @starting-style { .sheet[open] { opacity: 0; transform: none; } }
  .toast { transition: opacity 160ms ease; transform: none; }
  .loader span { animation-duration: 1200ms; }
}

/* Task tracker and idea collections */
.task-main {
  min-width: 0;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  text-align: left;
}
.task-main p { margin: 1px 0 0; line-height: 1.38; overflow-wrap: anywhere; }
.task-main small { display: block; margin-top: 6px; color: var(--muted); font-size: 11px; }
.relation { color: var(--green); }
.task-card.completing { opacity: .55; transform: scale(.985); }
.task-card.completing .task-check { background: var(--green); box-shadow: inset 0 0 0 5px white; }
.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  margin: -3px 0 12px;
  padding: 4px;
  border-radius: 16px;
  background: var(--paper-deep);
}
.segmented button {
  min-width: 0;
  padding: 9px 8px;
  border: 0;
  border-radius: 12px;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  transition: transform 120ms var(--ease-out), background-color 140ms ease;
}
.segmented button.active { color: var(--green-deep); background: var(--card); box-shadow: var(--shadow-sm); }
.segmented button:active { transform: scale(.97); }
.idea-topic-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 11px; margin-top: 18px; }
.idea-topic {
  min-width: 0;
  min-height: 126px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 20px;
  color: var(--ink);
  background: rgba(255,254,250,.9);
  text-align: left;
  transition: transform 130ms var(--ease-out);
}
.idea-topic:active { transform: scale(.97); }
.idea-topic span { display: block; font-weight: 750; overflow-wrap: anywhere; }
.idea-topic b { display: block; margin: 13px 0 3px; color: var(--green); font-size: 24px; }
.idea-topic small { color: var(--muted); line-height: 1.3; }
.capture-kind { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-bottom: 12px; padding: 4px; border-radius: 16px; background: var(--paper-deep); }
.capture-kind input { position: absolute; opacity: 0; pointer-events: none; }
.capture-kind span { display: block; padding: 10px; border-radius: 12px; color: var(--muted); text-align: center; font-size: 13px; font-weight: 720; }
.capture-kind input:checked + span { color: white; background: var(--green); }
.empty.compact { padding: 28px 18px; }
@media (prefers-reduced-motion: reduce) {
  .segmented button, .idea-topic, .task-card { transition-duration: 0ms; }
}

/* Planning workspace */
.planner-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 3px;
  margin: 2px 0 14px;
  padding: 4px;
  border-radius: 17px;
  background: var(--paper-deep);
}
.planner-tabs button {
  min-width: 0;
  padding: 10px 4px;
  border: 0;
  border-radius: 12px;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  font-weight: 720;
  transition: transform 120ms var(--ease-out), background-color 140ms ease;
}
.planner-tabs button.active { color: var(--green-deep); background: var(--card); box-shadow: var(--shadow-sm); }
.planner-tabs button:active, .date-jump button:active, .calendar-day:active, .week-day:active, .task-date:active, .task-reminder:active { transform: scale(.96); }
.planner-panel { padding: 19px 16px 16px; border: 1px solid var(--line); border-radius: 25px; background: rgba(255,254,250,.78); box-shadow: var(--shadow-sm); }
.planner-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.planner-heading h2 { margin: 4px 0 17px; font-size: 21px; line-height: 1.13; letter-spacing: -.035em; text-transform: capitalize; }
.date-jump { display: flex; gap: 5px; }
.date-jump button { display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid var(--line); border-radius: 11px; color: var(--green); background: var(--card); font-size: 23px; line-height: 1; transition: transform 120ms var(--ease-out); }
.task-tools { display: grid; justify-items: end; gap: 5px; align-self: center; }
.task-date, .task-reminder { max-width: 86px; padding: 6px 7px; border: 1px solid var(--line); border-radius: 10px; color: var(--green); background: var(--green-soft); font-size: 10px; font-weight: 720; white-space: nowrap; transition: transform 120ms var(--ease-out); }
.task-reminder { color: #91653d; background: #fff3df; }
.sheet-actions { display: grid; grid-template-columns: minmax(0, .72fr) minmax(0, 1.28fr); gap: 9px; }
.secondary { min-height: 48px; border: 1px solid var(--line-strong); border-radius: 15px; color: var(--ink-soft); background: var(--card); font: inherit; font-weight: 720; }
.triage-card { display: grid; gap: 18px; padding: 20px; border: 1px solid var(--line); border-radius: 25px; background: var(--card); box-shadow: var(--shadow-sm); }
.triage-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--green-deep); font-size: 12px; font-weight: 720; }
.triage-meta small { color: var(--muted); font-weight: 620; }
.triage-text { margin: 0; color: var(--ink); font-size: clamp(18px, 4vw, 23px); font-weight: 680; line-height: 1.35; overflow-wrap: anywhere; }
.triage-folder { margin: 0; }
.triage-folder select { width: 100%; min-height: 48px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 14px; color: var(--ink); background: #faf9f5; font: inherit; font-size: 16px; }
.triage-actions { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 9px; }
.triage-actions .primary { min-height: 48px; }
.quiet-action { grid-column: 1 / -1; min-height: 40px; border: 0; border-radius: 13px; color: var(--muted); background: transparent; font: inherit; font-size: 13px; font-weight: 680; transition: transform 120ms var(--ease-out), background-color 140ms ease; }
.quiet-action:active, .triage-actions .secondary:active { transform: scale(.97); }
.week-strip { display: grid; grid-auto-columns: minmax(72px, 1fr); grid-auto-flow: column; gap: 7px; overflow-x: auto; margin: 0 -3px; padding: 2px 3px 8px; scroll-snap-type: x mandatory; }
.week-day { min-height: 102px; padding: 10px 8px; scroll-snap-align: start; border: 1px solid var(--line); border-radius: 17px; color: var(--ink); background: var(--card); text-align: left; transition: transform 120ms var(--ease-out), background-color 140ms ease; }
.week-day.selected { border-color: rgba(65,107,86,.35); background: var(--green-soft); }
.week-day small, .week-day span { display: block; color: var(--muted); font-size: 10px; }
.week-day b { display: block; margin: 9px 0 10px; color: var(--green-deep); font-size: 19px; }
.month-summary { display: flex; align-items: baseline; gap: 8px; margin-bottom: 15px; padding: 16px; border-radius: 18px; color: var(--green-deep); background: var(--green-soft); }
.month-summary b { font-size: 32px; letter-spacing: -.05em; }
.month-summary span { color: var(--ink-soft); font-size: 12px; }
.calendar-weekdays, .calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.calendar-weekdays { margin-bottom: 5px; color: var(--muted); font-size: 10px; font-weight: 700; text-align: center; }
.calendar-grid { gap: 4px; }
.calendar-day { position: relative; min-height: 42px; padding: 6px 4px; border: 1px solid transparent; border-radius: 11px; color: var(--ink); background: transparent; font-size: 12px; text-align: left; transition: transform 120ms var(--ease-out), background-color 140ms ease; }
.calendar-day.outside { color: #b7b5af; }
.calendar-day.current { border-color: rgba(65,107,86,.24); }
.calendar-day.selected { color: white; background: var(--green); }
.calendar-day b { position: absolute; right: 4px; bottom: 4px; display: grid; min-width: 14px; height: 14px; padding: 0 3px; place-items: center; border-radius: 99px; color: white; background: #ca8159; font-size: 8px; }
.calendar-day.selected b { color: var(--green); background: #dcecdf; }
.date-field { display: grid; gap: 7px; margin-bottom: 14px; color: var(--ink-soft); font-size: 13px; font-weight: 680; }
.date-field input { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 14px; color: var(--ink); background: #faf9f5; }
@media (max-width: 390px) { .planner-tabs button { font-size: 11px; } .planner-panel { padding: 16px 12px; } .calendar-day { min-height: 39px; } }

/* Task and module controls */
.module-card { font: inherit; text-align: left; }
.task-main { min-width: 0; }
.task-main p, .capture-card p { overflow-wrap: anywhere; }
.sheet select, .sheet textarea { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 14px; color: var(--ink); background: #faf9f5; font: inherit; font-size: 16px; }
.sheet textarea { min-height: 96px; resize: vertical; }
@media (pointer: coarse) { input, textarea, select { font-size: 16px; } }

.video-form { display: grid; gap: 10px; }
.video-form input { width: 100%; min-height: 50px; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 15px; background: var(--card); color: var(--ink); font: inherit; font-size: 16px; }

.graph-open { width: 100%; border: 0; background: transparent; text-align: left; }
.map-list { display: grid; gap: 8px; }
.map-node { display: grid; gap: 4px; width: 100%; padding: 15px; border: 1px solid var(--line); border-radius: 16px; color: var(--ink); background: var(--card); text-align: left; }
.map-node.linked { border-left: 4px solid var(--green); }
.map-node small { color: var(--muted); }


/* Private web entry and app switcher */
.product-switch { display:inline-flex; min-width:44px; min-height:44px; padding:6px 11px; align-items:center; gap:5px; border:1px solid rgba(49,62,52,.08); border-radius:999px; color:var(--green-deep); background:rgba(255,254,250,.9); box-shadow:var(--shadow-sm); font-size:12px; font-weight:760; line-height:1; text-decoration:none; transition:transform 120ms var(--ease-out),background-color 140ms ease; }
.product-switch:active { transform:scale(.96); }
.product-switch-arrow { font-size:14px; font-weight:650; opacity:.7; }
.login-mode { min-height:100dvh; }
.login-mode .app-shell { padding-bottom:env(safe-area-inset-bottom,0px); }
.login-mode .topbar,.login-mode .tabbar,.login-mode .capture-fab { display:none; }
.login-mode #app { min-height:100dvh; }
.login-screen { display:flex; min-height:100dvh; padding:calc(42px + env(safe-area-inset-top,0px)) 4px calc(34px + env(safe-area-inset-bottom,0px)); align-items:center; flex-direction:column; justify-content:center; text-align:center; }
.login-mark { display:grid; width:72px; height:72px; margin-bottom:24px; place-items:center; border:1px solid rgba(65,107,86,.14); border-radius:25px; color:white; background:var(--green); box-shadow:0 18px 45px rgba(49,83,66,.2); font-size:31px; }
.login-screen h2 { margin:8px 0; font-size:clamp(36px,10vw,48px); letter-spacing:-.055em; }
.login-screen>p:not(.eyebrow) { max-width:29ch; margin-bottom:30px; color:var(--muted); line-height:1.5; }
.login-form { display:grid; width:min(100%,390px); gap:10px; text-align:left; }
.login-form label { color:var(--ink-soft); font-size:13px; font-weight:720; }
.login-form input { width:100%; min-height:54px; padding:13px 15px; border:1px solid var(--line-strong); border-radius:16px; color:var(--ink); background:var(--card); box-shadow:inset 0 1px 0 rgba(255,255,255,.7); font-size:16px; }
.login-form .primary { margin-top:3px; }
.login-error { margin:0; color:#a9443d; font-size:13px; line-height:1.4; }
.login-budget-link { display:inline-flex; margin-top:25px; padding:10px 12px; align-items:center; gap:8px; border-radius:12px; color:var(--green); font-size:13px; font-weight:720; text-decoration:none; transition:transform 120ms var(--ease-out),background-color 140ms ease; }
.login-budget-link:active { transform:scale(.97); }
.logout-action { width:100%; margin:18px 0 4px; padding:14px; border:0; border-radius:14px; color:#9a4942; background:transparent; font:inherit; font-size:13px; font-weight:720; transition:transform 120ms var(--ease-out),background-color 140ms ease; }
.logout-action:active { transform:scale(.98); background:rgba(154,73,66,.07); }
@media (max-width:390px) { .product-switch>span:first-child { display:none; } .product-switch { padding:6px 10px; } .product-switch-arrow { font-size:17px; } }
@media (hover:hover) and (pointer:fine) { .product-switch:hover,.login-budget-link:hover { background:var(--green-soft); } .logout-action:hover { background:rgba(154,73,66,.07); } }
@media (prefers-reduced-motion:reduce) { .product-switch,.login-budget-link,.logout-action { transition-duration:0ms; } }


/* Project task filters */
.project-filter-wrap { margin: 2px -18px 14px; }
.project-filter-wrap > .eyebrow { margin: 0 21px 8px; }
.project-filters {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 2px 18px 7px;
  scroll-padding: 18px;
  scrollbar-width: none;
  overscroll-behavior-inline: contain;
  touch-action: pan-x;
}
.project-filters::-webkit-scrollbar { display: none; }
.project-filters button {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  background: rgba(255, 254, 250, .78);
  font-size: 13px;
  font-weight: 720;
  transition: transform 120ms var(--ease-out), background-color 140ms ease, color 140ms ease;
}
.project-filters button.active { border-color: var(--green); color: white; background: var(--green); }
.task-filter-scroll { margin: 0 -18px 14px; }
.task-filters { margin: 0; }
.task-filters button { display: inline-flex; gap: 7px; align-items: center; }
.task-filters button small { min-width: 19px; padding: 2px 5px; border-radius: 999px; color: inherit; background: rgba(255,255,255,.22); font-size: 9px; text-align: center; }
.project-filters button:active { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) {
  .project-filters button:not(.active):hover { background: var(--green-soft); }
}
@media (prefers-reduced-motion: reduce) {
  .project-filters button { transition-duration: 0ms; }
}

/* Clear planning hierarchy and graph explanation */
.month-day-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 22px 2px 9px;
}
.month-day-head:first-of-type { margin-top: 8px; }
.month-day-head b { font-size: 14px; text-transform: capitalize; }
.month-day-head span { color: var(--muted); font-size: 12px; }
.planner-hint { margin: -3px 2px 10px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.health-explainer { margin: -3px -3px 7px; padding: 15px; border-radius: 17px; background: var(--green-soft); }
.health-explainer b { display: block; color: var(--green-deep); font-size: 14px; }
.health-explainer p { margin: 5px 0 0; color: var(--ink-soft); font-size: 12px; line-height: 1.45; }
.project-filters { scroll-snap-type: x proximity; }
.project-filters button { scroll-snap-align: start; }

@media (min-width: 391px) {
  .topbar { grid-template-columns: 92px minmax(0, 1fr) 92px; }
}
.module-status { min-height: 20px; margin: 10px 2px 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.module-status.error { color: #9a4942; }
.module-status.success { color: var(--green-deep); }


/* Work is one front-door; its projects and personal tags reveal only on demand. */
.project-subfilters {
  display: flex;
  gap: 6px;
  align-items: center;
  min-height: 39px;
  overflow-x: auto;
  margin: 2px 18px 0;
  padding: 2px 3px 4px;
  scrollbar-width: none;
  overscroll-behavior-inline: contain;
  touch-action: pan-x;
}
.project-subfilters::-webkit-scrollbar { display: none; }
.project-subfilters button, .filter-hint { flex: 0 0 auto; }
.project-subfilters button {
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 12px;
  font-weight: 720;
  transition: transform 120ms var(--ease-out), background-color 140ms ease, color 140ms ease;
}
.project-subfilters button.active { color: white; background: var(--green-deep); }
.project-subfilters button:active { transform: scale(.97); }
.filter-hint { padding-left: 4px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.task-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 7px; }
.task-tags i { padding: 3px 6px; border-radius: 999px; color: var(--green-deep); background: var(--green-soft); font-size: 10px; font-style: normal; font-weight: 720; line-height: 1.1; }
@media (hover: hover) and (pointer: fine) { .project-subfilters button:not(.active):hover { background: #d5e4d9; } }
@media (prefers-reduced-motion: reduce) { .project-subfilters button { transition-duration: 0ms; } }


/* On desktop filters are a visible control, never a hidden horizontal carousel. */
@media (min-width: 761px) {
  html, body { overflow-y: auto; overscroll-behavior-y: auto; }
  .app-shell { padding-bottom: 44px; }
  .project-filter-wrap { margin-right: 0; margin-left: 0; }
  .task-filter-scroll { margin-right: 0; margin-left: 0; }
  .project-filter-wrap > .eyebrow { margin-left: 3px; }
  .project-filters, .project-subfilters {
    flex-wrap: wrap;
    overflow: visible;
    margin-right: 0;
    margin-left: 0;
    padding-right: 0;
    padding-left: 0;
    scroll-snap-type: none;
    touch-action: auto;
  }
  .project-subfilters { align-items: flex-start; }
}


/* V2: folders are the primary navigation object. */
.inbox-summary {
  display: flex;
  width: 100%;
  margin: 2px 0 22px;
  padding: 14px 16px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid rgba(65, 107, 86, .12);
  border-radius: 18px;
  color: var(--green-deep);
  background: var(--green-soft);
  text-align: left;
  transition: transform 130ms var(--ease-out), background-color 150ms ease;
}
.inbox-summary:active { transform: scale(.98); }
.inbox-summary span { display: flex; align-items: baseline; gap: 7px; }
.inbox-summary b { font-size: 24px; letter-spacing: -.04em; }
.inbox-summary small { color: var(--ink-soft); font-size: 11px; }
.inbox-summary strong { font-size: 12px; }
.folder.add-folder {
  border-style: dashed;
  color: var(--green-deep);
  background: rgba(255, 254, 250, .52);
  box-shadow: none;
}
.folder.add-folder::before, .folder.add-folder::after { display: none; }
.folder.add-folder .folder-icon { border: 1px solid rgba(65, 107, 86, .12); background: var(--green-soft); font-size: 23px; }
.folder-inline-action { display: flex; margin: 4px 2px 20px; justify-content: flex-end; }
.note-actions { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; margin: 10px 0 4px; }
.note-actions .secondary { width: 100%; }
.note-actions .quiet-action { min-height: 46px; padding: 0 14px; border: 0; border-radius: 15px; }
.note-folder-field { margin-top: 0; }
.note-folder-save { width: 100%; margin: 8px 0 0; }
@media (hover: hover) and (pointer: fine) {
  .inbox-summary:hover { background: #d9e8dd; }
  .folder.add-folder:hover { background: var(--green-soft); }
}
@media (prefers-reduced-motion: reduce) { .inbox-summary { transition-duration: 0ms; } }
.plan-intro { align-items: center; }
.planning-button { display: flex; min-height: 48px; padding: 11px 15px; flex: 0 0 auto; align-items: center; gap: 8px; border: 0; border-radius: 16px; color: white; background: var(--green); font: inherit; transition: transform 130ms var(--ease-out), background-color 140ms ease; }
.planning-button span { display: grid; width: 21px; height: 21px; place-items: center; }
.planning-button svg { width: 20px; height: 20px; }
.planning-button b { font-size: 13px; }
.planning-button:active { transform: scale(.97); }
.planning-button:disabled { opacity: .7; }
.planning-suggestion { margin-bottom: 18px; padding: 18px; border: 1px solid rgba(65,107,86,.17); border-radius: 22px; background: var(--green-soft); }
.planning-result-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.planning-result-head small { color: var(--muted); font-size: 11px; }
.planning-suggestion p { margin: 12px 0 0; color: var(--ink-soft); line-height: 1.55; white-space: pre-wrap; }
.loader.compact { min-height: 70px; }
@media (hover: hover) and (pointer: fine) { .planning-button:hover { background: var(--green-deep); } }
@media (max-width: 520px) { .plan-intro { align-items: flex-start; } .planning-button { width: 100%; justify-content: center; } }
@media (prefers-reduced-motion: reduce) { .planning-button { transition-duration: 0ms; } }
.google-login { display:flex; width:min(100%,390px); min-height:54px; padding:12px 16px; align-items:center; justify-content:center; gap:11px; border:1px solid var(--line-strong); border-radius:16px; color:var(--ink); background:var(--card); box-shadow:var(--shadow-sm); text-decoration:none; transition:transform 130ms var(--ease-out),background-color 140ms ease; }
.google-login:active { transform:scale(.98); }
.google-g { display:grid; width:25px; height:25px; place-items:center; border-radius:50%; color:#4285f4; background:white; font-weight:800; }
.login-divider { display:flex; width:min(100%,390px); margin:13px 0; align-items:center; gap:12px; color:var(--muted); font-size:11px; }
.login-divider::before,.login-divider::after { height:1px; flex:1; background:var(--line); content:""; }
.google-module { text-decoration:none; }
@media (hover:hover) and (pointer:fine) { .google-login:hover { background:var(--green-soft); } }
@media (prefers-reduced-motion:reduce) { .google-login { transition-duration:0ms; } }
/* V3 interface pass: one calm palette, safer mobile spacing, real desktop layout. */
body {
  background:
    radial-gradient(circle at 92% -8%, rgba(161, 196, 174, .28), transparent 29rem),
    radial-gradient(circle at -10% 38%, rgba(219, 188, 159, .12), transparent 26rem),
    var(--paper);
}

main { min-width: 0; }
button, [role="button"] { cursor: pointer; }
select:focus-visible, a:focus-visible {
  outline: 3px solid rgba(66, 109, 87, .25);
  outline-offset: 3px;
}

.focus-card {
  border-color: rgba(47, 85, 66, .22);
  background: linear-gradient(145deg, #47765e, #365f4b);
  box-shadow: 0 18px 46px rgba(47, 85, 66, .17);
}
.task-reminder {
  color: #8b5c38;
  border-color: rgba(189, 116, 79, .16);
  background: var(--accent-warm-soft);
}
.calendar-day b { background: var(--accent-warm); }
.module-status.error, .login-error { color: var(--danger); }
.logout-action { color: var(--danger); }

.folder.mint, .folder.green { --folder-bg: #e1ece4; --folder-edge: #a9c4b2; }
.folder.blue { --folder-bg: #e4ebef; --folder-edge: #b4c7d0; }
.folder.peach { --folder-bg: #f2e4d9; --folder-edge: #ddbba3; }
.folder.violet { --folder-bg: #ebe6f0; --folder-edge: #c8bad6; }
.folder.rose { --folder-bg: #f0e2e3; --folder-edge: #d7b6ba; }
.folder.gold { --folder-bg: #f0ead8; --folder-edge: #d8c48f; }
.folder.slate { --folder-bg: #e8e7e1; --folder-edge: #c5c3b8; }

.product-switch {
  max-width: 100%;
  justify-content: center;
  white-space: nowrap;
}

@media (max-width: 390px) {
  .topbar { grid-template-columns: 76px minmax(0, 1fr) 42px; gap: 6px; }
  .topbar h1 { font-size: 23px; }
  .product-switch { min-width: 0; min-height: 40px; padding: 6px 9px; font-size: 10px; }
  .product-switch > span:first-child { display: inline; }
  .product-switch-arrow { font-size: 12px; }
}

@media (min-width: 1024px) {
  html, body { min-height: 100%; }
  body { background-attachment: fixed; }

  .app-shell {
    width: min(calc(100% - 48px), 1160px);
    padding: 0 28px 72px 256px;
  }

  .topbar {
    min-height: 104px;
    grid-template-columns: 108px minmax(0, 1fr) 108px;
    background: linear-gradient(to bottom, rgba(245, 242, 235, .98) 78%, rgba(245, 242, 235, 0));
  }
  .topbar h1 { font-size: 31px; }

  .tabbar {
    top: 112px;
    right: auto;
    bottom: auto;
    left: max(24px, calc((100vw - 1160px) / 2 + 24px));
    display: grid;
    width: 196px;
    min-height: 0;
    padding: 10px;
    grid-template-columns: 1fr;
    gap: 4px;
    transform: none;
    border-radius: 25px;
    background: rgba(254, 253, 249, .82);
    box-shadow: 0 18px 48px rgba(44, 40, 33, .09);
  }
  .tabbar::before {
    padding: 7px 12px 8px;
    color: var(--muted);
    content: "РАЗДЕЛЫ";
    font-size: 9px;
    font-weight: 780;
    letter-spacing: .15em;
  }
  .tabbar button {
    min-height: 52px;
    padding: 0 13px;
    flex-direction: row;
    justify-content: flex-start;
    gap: 12px;
    border-radius: 15px;
  }
  .tabbar button > svg { width: 20px; height: 20px; }
  .tabbar button small { font-size: 12px; font-weight: 700; }
  .tabbar button.active { box-shadow: inset 0 0 0 1px rgba(66, 109, 87, .06); }
  .tabbar .brain.active { background: var(--green-soft); }
  .brain-orb {
    width: 30px;
    height: 30px;
    margin: 0 -5px;
    box-shadow: 0 5px 14px rgba(13, 116, 117, .16);
  }
  .brain-orb svg { width: 17px; height: 17px; }

  .capture-fab {
    right: max(32px, calc((100vw - 1160px) / 2 + 32px));
    bottom: 30px;
  }

  .workspace-intro { padding-top: 18px; }
  .workspace-intro h2 { max-width: 20ch; font-size: 42px; }
  .folder-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px 16px; }
  .folder { min-height: 158px; }
  .task-list, .capture-list, .note-list { gap: 11px; }
  .task-card { padding: 18px; }
  .module-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .planner-panel { padding: 24px; }
  .calendar-day { min-height: 58px; padding: 8px 6px; }

  .sheet {
    width: min(680px, calc(100% - 48px));
    max-height: min(86dvh, 840px);
    margin: auto;
    border-radius: 28px;
    transform: translateY(8px) scale(.98);
    transition: opacity 170ms var(--ease-out), transform 210ms var(--ease-out), overlay 210ms allow-discrete, display 210ms allow-discrete;
  }
  .sheet[open] { transform: translateY(0) scale(1); }
  @starting-style { .sheet[open] { opacity: 0; transform: translateY(8px) scale(.98); } }
  .sheet-handle { display: none; }
  .sheet-content { padding: 25px 27px 28px; }
  .note-sheet { width: min(780px, calc(100% - 48px)); height: min(88dvh, 900px); }
  .composer { bottom: 24px; }
  .toast { bottom: 30px; }

  .login-mode .app-shell { width: min(100%, 760px); padding: 0 18px; }
}

@media (min-width: 1280px) {
  .app-shell { width: min(calc(100% - 64px), 1240px); padding-left: 280px; padding-right: 40px; }
  .tabbar { left: max(32px, calc((100vw - 1240px) / 2 + 32px)); width: 208px; }
  .capture-fab { right: max(40px, calc((100vw - 1240px) / 2 + 40px)); }
  .folder-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  .sheet { transform: none; }
  .sheet[open] { transform: none; }
  @starting-style { .sheet[open] { opacity: 0; transform: none; } }
}

.note-copy{min-width:0}.note-copy b,.note-copy em{overflow-wrap:anywhere}.note-copy em{display:-webkit-box;margin:3px 0;overflow:hidden;color:var(--muted);font-size:12px;font-style:normal;line-height:1.35;-webkit-box-orient:vertical;-webkit-line-clamp:2}
.idea-kind{background:#fff1d8;color:#855c16}.reference-kind{background:#e9edf8;color:#506184}.project-kind{background:#e5eeea;color:#345f4b}
.bulk-toolbar{display:flex;margin:0 0 14px;padding:10px 12px;align-items:center;gap:8px;border:1px solid var(--line);border-radius:16px;background:rgba(255,255,255,.65)}.bulk-toolbar span{margin-right:auto;color:var(--muted);font-size:12px}.bulk-toolbar button{width:auto;min-height:40px;padding:0 13px}.danger-soft{background:#8c5148}
.note-title-form{display:flex;margin:8px 42px 4px 0;gap:8px}.note-title-form input{min-width:0;width:100%;padding:8px 10px;border:1px solid transparent;border-radius:10px;background:transparent;color:var(--ink);font:inherit;font-size:24px;font-weight:780}.note-title-form input:focus{border-color:var(--green);background:white;outline:none}.note-title-form button{width:auto}
.review-row{padding:8px;border:1px solid var(--line);border-radius:18px;background:rgba(255,255,255,.48)}.review-row .note-row{box-shadow:none}.review-reason{display:inline-flex;margin:2px 8px 6px;padding:4px 8px;border-radius:999px;background:#fff0d9;color:#7c561c;font-size:11px;font-weight:750}
.skeleton-list{display:grid;gap:10px}.skeleton-list i{height:78px;border-radius:18px;background:linear-gradient(90deg,#ece9e1 25%,#f8f6f1 50%,#ece9e1 75%);background-size:200% 100%;animation:skeleton 1.2s infinite linear}@keyframes skeleton{to{background-position:-200% 0}}
@media(max-width:600px){.bulk-toolbar{align-items:stretch;flex-wrap:wrap}.bulk-toolbar span{width:100%}.bulk-toolbar button{flex:1 1 140px}.note-title-form{margin-right:34px;flex-direction:column}.note-title-form input{font-size:21px}}
@media(hover:hover) and (pointer:fine){.note-row:hover,.task-card:hover,.folder:hover{transform:translateY(-1px);border-color:rgba(66,109,87,.28)}}@media(prefers-reduced-motion:reduce){.skeleton-list i{animation:none}}

.search-kinds{display:flex;margin:-2px 0 16px;gap:7px}.search-kinds button{min-height:38px;padding:0 14px;border:1px solid var(--line);border-radius:999px;background:var(--card);color:var(--muted)}.search-kinds button.active{border-color:var(--green);background:var(--green);color:#fff}

.triage-understanding{display:flex;align-items:center;justify-content:space-between;gap:12px}.triage-understanding small,.triage-explain small{color:var(--muted)}.shopping-kind{background:#fff1d8;color:#855c16}.smart-title{display:grid;gap:6px;margin:18px 0 12px;color:var(--muted);font-size:12px;font-weight:700}.smart-title input{min-height:48px;padding:0 14px;border:1px solid var(--line);border-radius:14px;background:#fff;font-size:16px;font-weight:700}.triage-original{margin:8px 0 14px}.triage-original summary{color:var(--green);font-size:13px;font-weight:700;cursor:pointer}.triage-explain{display:grid;grid-template-columns:auto 1fr;gap:3px 10px;padding:12px;border-radius:14px;background:var(--green-soft)}.triage-explain small{grid-column:1/-1}.review-actions{display:flex;padding:0 8px 8px;flex-wrap:wrap;gap:7px}.review-actions button{width:auto;max-width:100%;text-align:left}
.shopping-hero{display:flex;margin-bottom:16px;padding:22px;border-radius:24px;background:linear-gradient(135deg,#e8efe8,#fff6e8);justify-content:space-between;align-items:center}.shopping-hero h2{margin:4px 0;font-size:28px}.shopping-hero p{margin:0;color:var(--muted)}.shopping-hero>span{font-size:40px}.shopping-add{display:grid;margin-bottom:22px;grid-template-columns:minmax(0,1fr) 130px auto;gap:8px}.shopping-add input,.shopping-add select{min-height:48px;padding:0 13px;border:1px solid var(--line);border-radius:14px;background:#fff;font-size:16px}.shopping-add button{width:auto}.shopping-groups{display:grid;gap:18px}.shopping-list{display:grid;gap:8px}.shopping-item{display:flex;min-height:52px;padding:10px 14px;border:1px solid var(--line);border-radius:16px;background:var(--card);align-items:center;gap:12px}.shopping-item input{width:22px;height:22px;accent-color:var(--green)}.shopping-item span{overflow-wrap:anywhere}.shopping-item.completed span{text-decoration:line-through;color:var(--muted)}
@media(max-width:600px){.shopping-add{grid-template-columns:1fr}.shopping-add button{width:100%}.triage-actions{grid-template-columns:1fr 1fr}.triage-actions .primary,.triage-actions .quiet-action{grid-column:1/-1}}

.shopping-summary{display:flex;width:100%;min-height:68px;margin:0 0 18px;padding:12px 16px;border:1px solid #eadbc4;border-radius:18px;background:linear-gradient(135deg,#fff8ec,#fff);align-items:center;gap:12px;text-align:left}.shopping-summary>span:first-child{font-size:25px}.shopping-summary>span:nth-child(2){display:grid;gap:2px}.shopping-summary small{color:var(--muted)}.shopping-summary strong{margin-left:auto;color:var(--green);font-size:13px}
.shopping-add{grid-template-columns:minmax(0,1fr) 120px 130px auto}.shopping-toolbar{display:flex;min-height:42px;align-items:center;justify-content:space-between;color:var(--muted);font-size:13px}.shopping-toolbar button{width:auto}.shopping-item{padding:0}.shopping-item>label{display:flex;min-width:0;min-height:52px;padding:10px 6px 10px 14px;align-items:center;gap:12px;flex:1}.shopping-item>label>span{display:flex;min-width:0;align-items:baseline;gap:7px;flex-wrap:wrap}.shopping-item small{color:var(--muted);font-size:12px;white-space:nowrap}.shopping-edit{width:44px;min-height:44px;margin-right:4px;border-radius:12px;color:var(--muted);font-weight:800;letter-spacing:1px}.shopping-item.completed label>span{text-decoration:line-through;color:var(--muted)}.shopping-item.completed small{text-decoration:none}
@media(max-width:700px){.shopping-add{grid-template-columns:1fr 1fr}.shopping-add #shoppingText{grid-column:1/-1}.shopping-add button{width:100%}}@media(max-width:420px){.shopping-add{grid-template-columns:1fr}.shopping-add #shoppingText{grid-column:auto}}
