:root {
  --paper: #fff;
  --bg: #f5f8f6;
  --ink: #24372e;
  --muted: #78847d;
  --line: #e1e9e3;
  --green: #25714e;
  --green-dark: #19583b;
  --mint: #edf7ef;
  --blue: #4b6e9d;
  --amber: #93672b;
  --radius: 16px;
  --body:
    -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
    sans-serif;
  --display: "Avenir Next", "PingFang SC", sans-serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.6 var(--body);
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  color: inherit;
}
button {
  border: 0;
  background: none;
}
button:disabled {
  cursor: wait;
  opacity: 0.55;
}
a {
  color: var(--green);
  text-decoration: none;
}
button,
a,
input,
textarea,
select {
  outline-offset: 3px;
}
:focus-visible {
  outline: 2px solid var(--green);
}
svg {
  width: 20px;
  height: 20px;
  vertical-align: middle;
  flex-shrink: 0;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 24px;
  letter-spacing: -0.8px;
  font-family: var(--display);
  font-weight: 650;
}
h2 {
  font-size: 20px;
  font-weight: 650;
}
h3 {
  font-size: 15px;
  font-weight: 600;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 12px;
}
.boot {
  padding: 15vh 10vw;
  color: var(--muted);
}
.shell {
  display: flex;
  min-height: 100dvh;
}
.rail {
  position: fixed;
  inset: 0 auto 0 0;
  width: 84px;
  background: #f0f5f1;
  border-right: 1px solid var(--line);
  padding: 22px 9px;
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 9px;
  z-index: 10;
}
.brand-mark {
  display: grid;
  place-items: center;
  background: var(--green);
  color: white;
  font-size: 23px;
  font-weight: 650;
  width: 43px;
  height: 43px;
  border-radius: 15px 15px 15px 4px;
  margin-bottom: 28px;
  font-family: var(--display);
}
.nav-btn {
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  color: #78877d;
  min-height: 62px;
  width: 64px;
  border-radius: 12px;
  font-size: 11px;
}
.nav-btn:hover {
  background: #e7eee8;
  color: var(--green);
}
.nav-btn.active {
  background: #e0ece2;
  color: var(--green-dark);
  font-weight: 600;
}
.nav-btn svg {
  width: 22px;
  height: 22px;
}
.rail-bottom {
  margin-top: auto;
}
.main {
  margin-left: 84px;
  padding: 0 30px 28px;
  width: calc(100% - 84px);
}
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 105px;
  gap: 20px;
}
.eyebrow {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 1.7px;
  margin-bottom: 4px;
}
.header-title {
  display: flex;
  align-items: center;
  gap: 20px;
}
.week-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.icon-btn {
  padding: 7px;
  border-radius: 8px;
  min-width: 34px;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.icon-btn:hover {
  background: #e9f0eb;
}
.header-actions,
.inline-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.btn {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 8px 13px;
  display: inline-flex;
  gap: 7px;
  align-items: center;
  justify-content: center;
  background: white;
  white-space: nowrap;
  font-size: 13px;
  min-height: 37px;
}
.btn:hover {
  background: #f2f7f3;
  border-color: #c2d6c8;
}
.btn.primary {
  background: var(--green);
  color: white;
  border-color: var(--green);
}
.btn.primary:hover {
  background: var(--green-dark);
}
.btn.soft {
  background: #e8f2ea;
  border-color: transparent;
  color: var(--green-dark);
}
.btn.quiet {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}
.btn.danger {
  color: #a44848;
}
.btn svg {
  width: 16px;
  height: 16px;
}
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 15px;
  min-height: 33px;
}
.toolbar-left {
  display: flex;
  gap: 12px;
  align-items: center;
}
.week-caption {
  font-size: 13px;
  color: var(--muted);
}
.filter {
  max-width: 190px;
  border: 1px solid var(--line);
  background: white;
  border-radius: 8px;
  padding: 5px 28px 5px 10px;
  color: #5c7063;
  font-size: 12px;
}
.segmented {
  display: flex;
  background: #eaf0eb;
  border-radius: 8px;
  padding: 3px;
}
.segmented button {
  padding: 3px 11px;
  font-size: 12px;
  border-radius: 6px;
  color: var(--muted);
}
.segmented .selected {
  background: white;
  box-shadow: 0 1px 4px #183c2510;
  color: var(--green);
}
.week-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  gap: 1px;
  background: var(--line);
  min-height: calc(100dvh - 215px);
  grid-template-rows: repeat(2, minmax(270px, 1fr));
}
.day {
  background: var(--paper);
  padding: 17px 17px 12px;
  display: flex;
  flex-direction: column;
  min-width: 0;
  position: relative;
}
.day.today {
  background: #f0f8f1;
}
.day.today:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: #7daf8c;
}
.day-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 16px;
}
.date-label {
  display: flex;
  align-items: baseline;
  gap: 9px;
}
.date-num {
  font-size: 26px;
  line-height: 1;
  font-weight: 550;
  font-family: var(--display);
  letter-spacing: -1px;
}
.weekday {
  font-size: 12px;
  color: var(--muted);
}
.today .date-num,
.today .weekday {
  color: var(--green);
}
.today-pill {
  font-size: 10px;
  background: #dceee0;
  color: var(--green);
  padding: 1px 6px;
  border-radius: 4px;
}
.day-head > .icon-btn {
  color: #9aa79e;
  padding: 3px;
  min-width: 27px;
  min-height: 27px;
}
.day-entries {
  overflow: auto;
  max-height: max(210px, calc((100dvh - 360px) / 2));
  min-height: 105px;
  scrollbar-width: thin;
  scrollbar-color: #d3e1d6 transparent;
}
.day-empty {
  color: #b2bcb5;
  font-size: 12px;
  padding: 8px 0 16px;
  line-height: 1.8;
}
.entry {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 2px;
  border-bottom: 1px solid #eaf0eb90;
  position: relative;
}
.entry:last-child {
  border: 0;
}
.entry-symbol {
  flex-shrink: 0;
  margin-top: 3px;
  width: 17px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #74a585;
}
.entry-symbol svg {
  width: 15px;
  height: 15px;
}
.task-toggle {
  width: 16px;
  height: 16px;
  border: 1.4px solid #a8bbae;
  border-radius: 5px;
  padding: 0;
  margin-top: 4px;
  flex-shrink: 0;
  background: white;
}
.task-toggle.done {
  background: #dceee0;
  border-color: #b1d0ba;
  color: #397453;
}
.task-toggle svg {
  width: 12px;
  height: 12px;
  vertical-align: top;
  margin-top: 1px;
}
.entry-content {
  min-width: 0;
  flex: 1;
  text-align: left;
  line-height: 1.75;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  padding: 0;
  font-size: 13px;
}
.entry-content:hover .entry-text {
  color: var(--green);
}
.entry-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}
.tag {
  font-size: 10px;
  line-height: 1.6;
  color: #5d7b68;
  background: #edf3ee;
  padding: 1px 5px;
  border-radius: 4px;
  white-space: normal;
  display: inline-block;
}
.tag.blue {
  background: #edf1f8;
  color: #5c75a0;
}
.tag.amber {
  background: #f7f0e3;
  color: var(--amber);
}
.entry-done .entry-text {
  color: #89968c;
}
.entry-done.task .entry-text {
  text-decoration: line-through;
}
.add-line {
  margin-top: auto;
  color: #9aa79e;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 0 1px;
  font-size: 11px;
  text-align: left;
}
.add-line:hover {
  color: var(--green);
}
.add-line svg {
  width: 13px;
  height: 13px;
}
.goals-cell {
  background: #f7faf7;
}
.goals-cell .day-head {
  margin-bottom: 12px;
}
.goals-title {
  display: flex;
  gap: 7px;
  align-items: center;
  color: var(--green);
  font-size: 14px;
  font-weight: 600;
}
.goals-title svg {
  width: 18px;
  height: 18px;
}
.goal {
  padding: 10px 0 13px;
  border-bottom: 1px solid var(--line);
}
.goal:last-child {
  border: 0;
}
.goal-title {
  display: block;
  text-align: left;
  font-size: 13px;
  line-height: 1.7;
  padding: 0;
  font-weight: 550;
  overflow-wrap: anywhere;
}
.goal-foot {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
}
.goal-progress {
  margin-top: 6px;
  font-size: 11px;
  color: #789381;
}
.goal.is-highlight {
  background: #e6f1e8;
  border-radius: 8px;
  padding: 10px;
}
.goal-status {
  margin-left: auto;
  font-size: 10px;
  color: var(--muted);
}
.board-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #9aa89d;
  font-size: 11px;
  padding: 12px 2px;
}
.board-footer button {
  font-size: 11px;
  color: var(--green);
  padding: 0;
}
.day-grid {
  grid-template-columns: minmax(0, 1fr) 320px;
  grid-template-rows: 1fr;
  max-width: 1100px;
  margin: auto;
}
.day-grid .day-entries {
  max-height: 65vh;
}
.day-grid .day {
  padding: 24px;
}
.quick {
  background: white;
  border: 1px solid #96b99f;
  border-radius: 10px;
  padding: 9px;
  margin: 7px 0;
  box-shadow: 0 4px 12px #214c3010;
}
.quick-type {
  display: flex;
  gap: 5px;
  margin-bottom: 7px;
}
.quick-type button {
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 5px;
  color: var(--muted);
}
.quick-type .selected {
  background: var(--mint);
  color: var(--green);
}
.quick textarea {
  width: 100%;
  resize: vertical;
  min-height: 72px;
  border: 0;
  background: transparent;
  font-size: 13px;
  outline: none !important;
  line-height: 1.8;
}
.quick select {
  width: 100%;
  margin-top: 5px;
  font-size: 11px;
  color: #68826f;
  border: 1px solid var(--line);
  padding: 4px;
  background: white;
  border-radius: 5px;
}
.quick-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 9px;
  font-size: 10px;
  color: var(--muted);
}
.quick-footer .btn {
  padding: 3px 8px;
  min-height: 27px;
  font-size: 11px;
}
.page-intro {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-bottom: 25px;
}
.page-intro p {
  color: var(--muted);
  font-size: 13px;
}
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.project-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px;
  text-align: left;
  cursor: pointer;
  transition:
    border-color 0.15s,
    transform 0.15s;
  min-height: 210px;
  display: flex;
  flex-direction: column;
}
.project-card:hover {
  border-color: #a6c1ad;
  transform: translateY(-2px);
}
.project-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}
.project-icon {
  width: 35px;
  height: 35px;
  background: #eaf4ed;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: #4b815e;
}
.project-card h3 {
  font-size: 17px;
  overflow-wrap: anywhere;
}
.project-desc {
  font-size: 12px;
  color: var(--muted);
  margin-top: 9px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: pre-wrap;
}
.project-next {
  margin-top: auto;
  padding-top: 20px;
  font-size: 12px;
  color: #547561;
  display: flex;
  gap: 7px;
}
.project-next svg {
  width: 15px;
  height: 15px;
}
.list-paper {
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 24px;
}
.list-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.list-row:last-child {
  border: 0;
}
.list-date {
  font-size: 11px;
  color: var(--muted);
  min-width: 76px;
  padding-top: 3px;
}
.list-main {
  flex: 1;
  min-width: 0;
}
.list-main > button {
  padding: 0;
  text-align: left;
  font-size: 14px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.list-row .inline-actions {
  flex-shrink: 0;
}
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 330px;
  background: white;
  border: 1px dashed #cfddd3;
  border-radius: 15px;
  text-align: center;
  padding: 35px;
  gap: 13px;
}
.empty-state > svg {
  width: 35px;
  height: 35px;
  color: #97b59f;
  margin-bottom: 4px;
}
.empty-state h3 {
  font-size: 17px;
}
.empty-state p {
  color: var(--muted);
  font-size: 13px;
  max-width: 350px;
}
.search-input {
  border: 1px solid var(--line);
  background: white;
  border-radius: 9px;
  padding: 9px 12px;
  min-width: 280px;
  max-width: 100%;
  color: var(--ink);
}
.status-dot {
  width: 6px;
  height: 6px;
  background: #7aa886;
  border-radius: 50%;
  display: inline-block;
  margin-right: 5px;
}
.status-dot.waiting {
  background: #b99359;
}
.status-dot.paused,
.status-dot.archived {
  background: #a4afa8;
}
.login-page {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
}
.login-story {
  background: #e8f1ea;
  padding: 9vw 8vw;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.login-story .brand-mark {
  width: 55px;
  height: 55px;
  font-size: 29px;
  margin-bottom: 55px;
}
.login-story h1 {
  font-size: clamp(30px, 3vw, 49px);
  line-height: 1.5;
  font-weight: 550;
  letter-spacing: -2px;
}
.login-story p {
  margin-top: 26px;
  color: #7b9282;
  font-size: 14px;
  line-height: 2;
}
.login-line {
  width: 60px;
  height: 3px;
  background: #78a285;
  margin-top: 45px;
}
.login-form-wrap {
  padding: 40px;
  display: grid;
  place-items: center;
}
.login-form {
  width: 340px;
  max-width: 100%;
}
.login-form h2 {
  margin-bottom: 7px;
  font-size: 25px;
}
.login-form > .muted {
  margin-bottom: 32px;
}
.field {
  margin-bottom: 18px;
}
.field label {
  display: block;
  font-size: 12px;
  color: #63776a;
  margin-bottom: 7px;
}
.field input,
.field textarea,
.field select {
  display: block;
  width: 100%;
  border: 1px solid #dbe5de;
  border-radius: 9px;
  background: white;
  color: var(--ink);
  padding: 10px 12px;
  min-height: 42px;
}
.field textarea {
  resize: vertical;
  line-height: 1.8;
  min-height: 90px;
}
.field input::placeholder,
.field textarea::placeholder {
  color: #a4afa8;
}
.field textarea.large {
  min-height: 140px;
  font-size: 15px;
}
.field.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.field small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 6px;
}
.login-form .primary {
  width: 100%;
  margin-top: 5px;
}
.error {
  color: #a3514c;
  font-size: 12px;
  margin: 8px 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.login-foot {
  font-size: 11px;
  color: #9caaa0;
  margin-top: 35px;
}
.backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: #193e2a33;
  display: flex;
  justify-content: flex-end;
  backdrop-filter: blur(2px);
}
.sheet {
  width: 520px;
  max-width: 100%;
  height: 100dvh;
  background: #fff;
  display: flex;
  flex-direction: column;
  box-shadow: -15px 0 70px #244d2e15;
  animation: slide-in 0.2s ease-out;
}
.sheet.wide {
  width: 640px;
}
.sheet-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 27px 18px;
  border-bottom: 1px solid var(--line);
  gap: 15px;
}
.sheet-head h2 {
  font-size: 18px;
}
.sheet-body {
  overflow-y: auto;
  padding: 24px 27px;
  flex: 1;
  overscroll-behavior: contain;
}
.sheet-foot {
  border-top: 1px solid var(--line);
  padding: 16px 27px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  background: #fff;
}
.section-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #7f9386;
  font-size: 11px;
  letter-spacing: 0.5px;
  margin: 28px 0 12px;
}
.section-label:first-child {
  margin-top: 0;
}
.detail-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #5d7365;
  line-height: 1.9;
  font-size: 13px;
}
.next-box {
  background: #eff6f0;
  border: 1px solid #dcebdd;
  border-radius: 12px;
  padding: 16px;
  margin: 18px 0;
}
.next-box .small {
  color: var(--green);
  margin-bottom: 6px;
}
.next-box p {
  font-size: 14px;
  white-space: pre-wrap;
}
.timeline-row {
  border-left: 1px solid #d9e5dc;
  padding: 0 0 20px 18px;
  position: relative;
  margin-left: 4px;
}
.timeline-row:before {
  content: "";
  position: absolute;
  width: 7px;
  height: 7px;
  background: #91b49b;
  border: 3px solid white;
  box-sizing: content-box;
  left: -7px;
  top: 3px;
  border-radius: 50%;
}
.timeline-row time {
  color: var(--muted);
  font-size: 11px;
}
.timeline-row button {
  display: block;
  text-align: left;
  padding: 3px 0;
  white-space: pre-wrap;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.ai-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.ai-tabs .btn {
  font-size: 12px;
}
.ai-choice {
  background: #f4f8f4;
  border: 1px solid var(--line);
  padding: 15px;
  border-radius: 11px;
  margin: 15px 0;
}
.ai-choice p {
  font-size: 12px;
  color: #687f6f;
}
.source-row {
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  display: flex;
  gap: 9px;
  align-items: flex-start;
}
.source-row button {
  padding: 0;
  text-align: left;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.source-ref {
  font-size: 10px;
  min-width: 28px;
  color: #78a084;
}
.ai-title {
  font-size: 22px;
  font-weight: 550;
  line-height: 1.6;
  margin-bottom: 20px;
}
.ai-fact {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  line-height: 1.9;
  white-space: pre-wrap;
}
.ref-link {
  font-size: 10px;
  color: var(--green);
  background: #edf6ee;
  border-radius: 4px;
  padding: 1px 5px;
  margin-left: 5px;
}
.ai-insight {
  white-space: pre-wrap;
  font-size: 13px;
  line-height: 1.9;
  color: #60766a;
}
.settings-group {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 19px;
  margin-bottom: 18px;
}
.settings-group h3 {
  margin-bottom: 9px;
}
.settings-group p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.9;
  margin-bottom: 13px;
}
.settings-group .btn {
  margin: 4px 3px 4px 0;
  font-size: 12px;
}
.settings-group input[type="file"] {
  max-width: 100%;
  font-size: 12px;
  margin-bottom: 10px;
}
.review-meta {
  font-size: 11px;
  color: var(--muted);
  margin: 8px 0 20px;
}
.source-banner {
  font-size: 11px;
  background: #f6f8f6;
  padding: 10px;
  border-radius: 8px;
  color: #8a9c8e;
  margin-top: 18px;
}
.inbox-hint {
  background: #f0f6f1;
  border-left: 3px solid #a1c2a8;
  padding: 13px 18px;
  color: #7a9181;
  font-size: 12px;
  margin-bottom: 18px;
}
.checkbox-field {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 18px 0;
  color: #6d8173;
  font-size: 12px;
}
.checkbox-field input {
  margin-top: 4px;
  accent-color: var(--green);
}
#toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  z-index: 100;
  background: #284a35;
  color: white;
  padding: 10px 19px;
  border-radius: 10px;
  font-size: 12px;
  transition:
    opacity 0.2s,
    transform 0.2s;
  max-width: 90vw;
}
#toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
.busy-note {
  color: #7f9486;
  font-size: 12px;
  padding: 35px 10px;
  line-height: 2;
}
.spinner {
  display: inline-block;
  width: 15px;
  height: 15px;
  border: 2px solid #c5dacb;
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-right: 7px;
  vertical-align: middle;
}
.banner {
  background: #f6f2e7;
  border: 1px solid #e8ddc3;
  color: #8c784f;
  padding: 11px 15px;
  border-radius: 10px;
  margin-bottom: 15px;
  font-size: 12px;
}
.banner button {
  text-decoration: underline;
  font-size: 12px;
}
.focus-filter {
  display: flex;
  gap: 6px;
  align-items: center;
  background: #e1efe5;
  color: var(--green);
  padding: 4px 9px;
  border-radius: 6px;
  font-size: 11px;
}
.focus-filter button {
  padding: 0;
  line-height: 1;
}
.mobile-brand {
  display: none;
}
.trash-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.trash-row p {
  flex: 1;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 12px;
}
.scroll-note {
  font-size: 10px;
  color: #9aad9e;
}
.history-controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 20px;
}
.history-controls .search-input {
  flex: 1;
}
.more-note {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 15px;
}
.history-group {
  font-size: 12px;
  color: #83998a;
  padding: 16px 0 4px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
@keyframes slide-in {
  from {
    transform: translateX(30px);
    opacity: 0.7;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@media (min-width: 1600px) {
  .main {
    padding-left: 40px;
    padding-right: 40px;
  }
  .day {
    padding: 21px 23px;
  }
  .entry-content {
    font-size: 14px;
  }
  .week-grid {
    min-height: calc(100dvh - 215px);
  }
}
@media (max-width: 1100px) {
  .main {
    padding: 0 20px 20px;
  }
  .header-title {
    gap: 10px;
  }
  .header {
    gap: 10px;
  }
  h1 {
    font-size: 21px;
  }
  .header-actions .label-optional {
    display: none;
  }
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .day {
    padding: 14px 12px;
  }
  .date-label {
    gap: 6px;
  }
  .today-pill {
    display: none;
  }
  .weekday {
    font-size: 11px;
  }
  .date-num {
    font-size: 23px;
  }
  .day-grid {
    grid-template-columns: minmax(0, 1fr) 285px;
  }
}
@media (max-width: 850px) {
  .rail {
    width: 70px;
    padding-left: 4px;
    padding-right: 4px;
  }
  .main {
    margin-left: 70px;
    width: calc(100% - 70px);
  }
  .header {
    min-height: 95px;
  }
  .week-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: none;
    min-height: 0;
  }
  .day {
    min-height: 280px;
    padding: 18px;
  }
  .day-entries {
    max-height: 300px;
  }
  .day-grid {
    grid-template-columns: 1fr;
  }
  .day-grid .goals-cell {
    min-height: 230px;
  }
  .header-actions {
    gap: 5px;
  }
  .header-actions .btn {
    padding: 7px 9px;
  }
  .toolbar {
    gap: 6px;
  }
  .toolbar-left {
    gap: 7px;
  }
  .week-caption {
    font-size: 11px;
  }
  .filter {
    max-width: 145px;
  }
  .cards {
    gap: 13px;
  }
  .project-card {
    padding: 17px;
  }
  .login-story {
    padding: 8vw 6vw;
  }
}
@media (max-width: 600px) {
  .shell {
    display: block;
    padding-bottom: 65px;
  }
  .rail {
    inset: auto 0 0 0;
    height: 65px;
    width: 100%;
    padding: 4px 8px calc(4px + env(safe-area-inset-bottom));
    flex-direction: row;
    justify-content: space-around;
    border-right: 0;
    border-top: 1px solid var(--line);
    background: #f7faf8ed;
    backdrop-filter: blur(12px);
  }
  .rail .brand-mark {
    display: none;
  }
  .nav-btn {
    width: 61px;
    min-height: 51px;
    height: 51px;
    gap: 1px;
    font-size: 10px;
    border-radius: 9px;
  }
  .nav-btn svg {
    width: 20px;
    height: 20px;
  }
  .rail-bottom {
    margin: 0;
  }
  .main {
    margin: 0;
    width: 100%;
    padding: 0 14px 20px;
  }
  .header {
    min-height: 91px;
    align-items: center;
  }
  .eyebrow {
    font-size: 9px;
    letter-spacing: 1px;
  }
  .header-title {
    gap: 7px;
  }
  h1 {
    font-size: 19px;
    letter-spacing: -0.4px;
  }
  .week-nav {
    gap: 0;
  }
  .week-nav .icon-btn {
    padding: 3px;
    min-width: 24px;
  }
  .week-nav .btn {
    padding: 4px 7px;
    min-height: 28px;
    font-size: 11px;
  }
  .header-actions {
    gap: 3px;
  }
  .header-actions .btn {
    font-size: 11px;
    padding: 6px 8px;
    min-height: 32px;
  }
  .header-actions .icon-btn {
    min-width: 28px;
    padding: 4px;
  }
  .header-actions .review-label {
    display: none;
  }
  .toolbar {
    margin-bottom: 11px;
    align-items: center;
  }
  .toolbar-left {
    gap: 6px;
    flex-wrap: wrap;
  }
  .week-caption {
    font-size: 10px;
  }
  .filter {
    max-width: 120px;
    font-size: 10px;
    padding: 5px;
  }
  .segmented button {
    padding: 3px 8px;
    font-size: 10px;
  }
  .week-grid {
    grid-template-columns: 1fr;
    border-radius: 12px;
    gap: 1px;
  }
  .day {
    min-height: 200px;
    padding: 18px 19px;
    scroll-margin-top: 12px;
  }
  .day-entries {
    min-height: 70px;
    max-height: 380px;
  }
  .day-head {
    margin-bottom: 12px;
  }
  .date-num {
    font-size: 27px;
  }
  .weekday {
    font-size: 12px;
  }
  .today-pill {
    display: block;
  }
  .goals-cell {
    grid-row: 1;
    min-height: 180px;
    background: #f1f7f0;
  }
  .day-grid .goals-cell {
    grid-row: auto;
  }
  .day-empty {
    padding: 5px 0 10px;
  }
  .add-line {
    padding-top: 15px;
  }
  .board-footer {
    font-size: 10px;
  }
  .cards {
    grid-template-columns: 1fr;
  }
  .project-card {
    min-height: 180px;
    padding: 22px;
  }
  .page-intro {
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 18px;
  }
  .page-intro p {
    font-size: 12px;
    max-width: 230px;
  }
  .page-intro .btn {
    font-size: 11px;
    padding: 6px 9px;
  }
  .list-paper {
    padding: 7px 15px;
  }
  .list-row {
    gap: 9px;
    flex-wrap: wrap;
    padding: 14px 0;
  }
  .list-date {
    min-width: 60px;
    font-size: 10px;
  }
  .list-main > button {
    font-size: 13px;
  }
  .list-row .inline-actions {
    margin-left: auto;
  }
  .sheet {
    width: 100%;
    height: 100dvh;
  }
  .sheet-head {
    padding: 20px 20px 15px;
  }
  .sheet-body {
    padding: 20px;
  }
  .sheet-foot {
    padding: 14px 20px calc(14px + env(safe-area-inset-bottom));
  }
  .login-page {
    display: block;
  }
  .login-story {
    padding: 30px 28px 34px;
  }
  .login-story .brand-mark {
    margin-bottom: 20px;
    width: 40px;
    height: 40px;
    font-size: 22px;
  }
  .login-story h1 {
    font-size: 27px;
    letter-spacing: -1px;
  }
  .login-story p {
    margin-top: 12px;
    font-size: 12px;
  }
  .login-line {
    display: none;
  }
  .login-form-wrap {
    padding: 33px 28px;
  }
  .login-form {
    width: 100%;
  }
  .login-form h2 {
    font-size: 22px;
  }
  .login-form > .muted {
    margin-bottom: 22px;
  }
  .login-foot {
    margin-top: 25px;
  }
  .search-input {
    min-width: 0;
    width: 100%;
  }
  .history-controls {
    gap: 7px;
  }
  .history-controls .filter {
    max-width: 160px;
  }
  .field.two {
    gap: 10px;
  }
  .field input,
  .field textarea,
  .field select {
    font-size: 16px;
  }
  .quick textarea {
    font-size: 16px;
  }
  .board-footer > span:last-child {
    display: none;
  }
  .inbox-hint {
    font-size: 11px;
  }
  .ai-title {
    font-size: 20px;
  }
  .ai-tabs .btn {
    font-size: 11px;
    padding: 7px 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

.mobile-review {
  display: none;
}
@media (max-width: 600px) {
  .mobile-review {
    display: inline;
  }
}
@media (min-width: 851px) {
  .main {
    padding-bottom: 20px;
  }
  .week-grid {
    height: calc(100dvh - 215px);
    min-height: 520px;
    grid-template-rows: repeat(2, minmax(0, 1fr));
  }
  .day {
    min-height: 0;
  }
  .day-entries {
    min-height: 0;
    max-height: none;
    flex: 1;
  }
  .day-grid {
    grid-template-rows: 1fr;
  }
  .day-grid .day-entries {
    max-height: none;
  }
}
.entry-done:not(.task) .entry-text {
  color: #526b59;
}
.entry-tags .tag {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.goal-foot {
  flex-wrap: wrap;
  gap: 4px 7px;
}
.goal-foot > span:first-child:not(.goal-status) {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.goal-foot > button {
  padding: 0;
  font-size: 11px;
  color: #597a62;
}
.goal-status {
  white-space: nowrap;
}
.entry-tags .tag {
  border: 1px solid #dde8e0;
}
.entry-tags .tag.blue {
  border-color: #e0e7f1;
}
@media (min-width: 601px) {
  .quick {
    position: absolute;
    top: 53px;
    left: 12px;
    right: 12px;
    bottom: 10px;
    z-index: 3;
    margin: 0;
    overflow-y: auto;
  }
  .quick textarea {
    min-height: 52px;
    resize: none;
  }
  .quick-footer {
    gap: 5px;
  }
  .quick-footer > span {
    font-size: 9px;
  }
}

.segmented button {
  white-space: nowrap;
}
@media (max-width: 600px) {
  .header {
    position: sticky;
    top: 0;
    z-index: 9;
    background: #f5f8f6f2;
    backdrop-filter: blur(12px);
  }
  .day {
    scroll-margin-top: 105px;
  }
}

/* Centered writing surfaces: the record is primary; optional context stays quiet. */
.week-position {
  margin: 5px 0 0;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.2px;
}
.header-title h1 {
  line-height: 1.2;
}
.backdrop,
.confirm-backdrop {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
  background: rgb(12 22 18 / 57%);
  backdrop-filter: blur(4px);
  z-index: 40;
}
.sheet,
.sheet.wide {
  width: min(720px, 100%);
  max-width: 100%;
  height: auto;
  max-height: calc(100dvh - 60px);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 24px 100px rgb(0 0 0 / 22%);
  animation: lightbox-in 0.16s ease-out;
}
.sheet.wide {
  width: min(900px, 100%);
}
.sheet.editor-dialog {
  width: min(720px, 100%);
}
.sheet-head {
  padding: 23px 28px 19px;
  flex: 0 0 auto;
}
.sheet-head h2 {
  font-size: 21px;
  letter-spacing: -0.5px;
}
.sheet-body {
  padding: 24px 28px;
  min-height: 0;
  flex: 0 1 auto;
}
.sheet-foot {
  padding: 16px 28px;
  flex: 0 0 auto;
}
.sheet[aria-busy="true"] {
  cursor: progress;
}
.sheet[aria-busy="true"] .sheet-foot {
  opacity: 0.65;
}
.editor-intro {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 20px;
}
.editor-main label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 10px;
}
.record-editor .editor-main textarea.large {
  min-height: 160px;
  font-size: 19px;
  line-height: 1.7;
  padding: 16px 18px;
  background: #fafcfb;
  border-color: #dbe6de;
  border-radius: 13px;
}
.editor-type,
.quick-type {
  display: flex;
  align-items: center;
  gap: 7px;
}
.editor-type {
  margin-bottom: 18px;
}
.editor-type button,
.quick-type button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 9px;
  padding: 7px 11px;
  font-size: 13px;
  color: #79847e;
  border: 1px solid transparent;
  white-space: nowrap;
}
.editor-type button svg,
.quick-type button svg {
  width: 15px;
  height: 15px;
}
.editor-type button.selected,
.quick-type button.selected {
  background: var(--mint);
  color: var(--green);
  border-color: #cae0d0;
  font-weight: 600;
}
.editor-type [data-edit-type="task"].selected,
.quick-type [data-qtype="task"].selected {
  color: #8b672d;
  background: #fbf5e8;
  border-color: #e9ddbd;
}
.key-hint {
  font-size: 10px;
  color: #8c9891;
  white-space: nowrap;
}
.editor-type .key-hint {
  margin-left: auto;
}
.editor-date-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}
.editor-date-row label,
.editor-date-row small {
  font-size: 12px;
  color: var(--muted);
}
.editor-date-row input {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  min-width: 0;
}
.editor-extra {
  border-top: 1px solid var(--line);
  margin-top: 18px;
}
.editor-extra summary,
.quick-extra summary {
  padding: 14px 0;
  color: #718277;
  cursor: pointer;
  font-size: 12px;
}
.editor-extra summary span,
.quick-extra summary span {
  font-size: 10px;
  color: #9aa49e;
  margin-left: 8px;
}
.editor-extra-body {
  padding-top: 7px;
}
.editor-extra .field:last-child {
  margin-bottom: 0;
}
.editor-foot-left {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}
.editor-foot-left .inline-actions {
  gap: 5px;
  flex-wrap: wrap;
}
.editor-foot-left .btn {
  font-size: 12px;
  padding: 4px 7px;
  min-height: 30px;
}
.editor-dialog .sheet-foot > .btn {
  flex-shrink: 0;
}
.quick {
  position: relative;
  inset: auto;
  margin: 0 0 14px;
  padding: 13px;
  border: 1px solid #b9d0bf;
  border-radius: 14px;
  box-shadow: 0 5px 18px #214c3010;
  overflow: visible;
}
.quick-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
}
.quick-type {
  gap: 3px;
  margin: 0;
}
.quick-type button {
  padding: 5px 7px;
  font-size: 12px;
}
.quick textarea {
  display: block;
  min-height: 95px;
  resize: vertical;
  font-size: 15px;
  padding: 12px 0 4px;
  line-height: 1.8;
}
.quick-extra {
  border-top: 1px solid #edf1ed;
}
.quick-extra summary {
  padding: 9px 0;
  font-size: 11px;
}
.quick-extra select {
  padding: 7px;
  font-size: 12px;
  margin: 0 0 7px;
}
.quick-footer {
  justify-content: flex-end;
  gap: 6px;
  margin-top: 6px;
  flex-wrap: wrap;
}
.quick-footer .btn {
  font-size: 12px;
  padding: 6px 9px;
  min-height: 33px;
}
.quick-footer kbd {
  font: inherit;
  font-size: 10px;
  opacity: 0.65;
  margin-left: 3px;
}
.move-today {
  align-self: flex-start;
  display: inline-flex;
  gap: 4px;
  align-items: center;
  border: 1px solid #dfebe2;
  border-radius: 7px;
  padding: 4px;
  color: #64856e;
  font-size: 10px;
  flex-shrink: 0;
}
.move-today svg {
  width: 14px;
  height: 14px;
}
.entry .move-today span {
  display: none;
}
.move-today:hover {
  color: var(--green);
  background: var(--mint);
}
.confirm-backdrop {
  z-index: 60;
  background: rgb(12 22 18 / 38%);
}
.confirm-dialog {
  width: min(420px, 100%);
  background: white;
  padding: 28px;
  border-radius: 20px;
  box-shadow: 0 28px 100px #0003;
  animation: lightbox-in 0.16s ease-out;
}
.confirm-symbol {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--mint);
  color: var(--green);
  margin-bottom: 18px;
}
.confirm-symbol.danger {
  color: #aa5748;
  background: #fbefeb;
}
.confirm-symbol svg {
  width: 21px;
  height: 21px;
}
.confirm-dialog h2 {
  margin: 0 0 12px;
  font-size: 19px;
}
.confirm-dialog p {
  font-size: 13px;
  line-height: 1.9;
  color: var(--muted);
  margin-bottom: 25px;
}
.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.btn.danger-fill {
  color: white;
  background: #a94d40;
  border-color: #a94d40;
}
.btn.danger-fill:hover {
  background: #903f34;
}
@keyframes lightbox-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (max-width: 1100px) {
  .quick-top {
    align-items: flex-start;
    flex-wrap: wrap;
  }
}
@media (max-width: 600px) {
  .backdrop,
  .confirm-backdrop {
    padding: 12px;
  }
  .sheet,
  .sheet.wide,
  .sheet.editor-dialog {
    width: 100%;
    height: auto;
    max-height: calc(100dvh - 24px);
    border-radius: 18px;
  }
  .sheet-head {
    padding: 17px 18px 14px;
  }
  .sheet-head h2 {
    font-size: 19px;
  }
  .sheet-body {
    padding: 18px;
  }
  .sheet-foot {
    padding: 13px 18px;
    align-items: flex-end;
  }
  .sheet-foot > .small {
    font-size: 10px;
  }
  .record-editor .editor-main textarea.large {
    min-height: 145px;
    font-size: 17px;
  }
  .editor-foot-left > .small {
    font-size: 10px;
  }
  .editor-foot-left .btn {
    font-size: 11px;
  }
  .editor-type .key-hint,
  .quick-top > .key-hint {
    display: none;
  }
  .week-position {
    font-size: 10px;
    margin-top: 4px;
  }
  .header-title h1 {
    font-size: 21px;
  }
  .confirm-dialog {
    padding: 24px;
  }
  .move-today span {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .sheet,
  .confirm-dialog {
    animation: none;
  }
}
.entry .move-today {
  flex-direction: column;
  gap: 1px;
  padding: 5px 6px;
}
.entry .move-today span {
  display: block;
  font-size: 9px;
  white-space: nowrap;
}
/* An open composer grows its row instead of clipping controls at the grid edge. */
.day:has(.quick) > [data-composer] {
  flex: 0 0 auto;
}
.day:has(.quick) > .add-line,
.day:has(.quick) .day-empty {
  display: none;
}
@media (min-width: 851px) {
  .week-grid:has(.quick) {
    height: auto;
    grid-template-rows: repeat(2, minmax(270px, auto));
  }
  .week-grid:has(.quick) .day-entries {
    max-height: 150px;
  }
}

/* Narrow screens and software keyboards must retain reachable controls. */
@media (max-width: 600px) {
  .shell {
    padding-bottom: calc(76px + env(safe-area-inset-bottom));
  }
  .rail {
    height: calc(65px + env(safe-area-inset-bottom));
  }
  .main {
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
    min-width: 0;
  }
  .header {
    flex-wrap: wrap;
    padding: 13px 0 10px;
    gap: 10px;
    min-height: 0;
  }
  .header-title {
    width: 100%;
    justify-content: space-between;
    min-width: 0;
  }
  .header-title > div:first-child {
    min-width: 0;
  }
  .header-title h1 {
    font-size: clamp(18px, 5.2vw, 22px);
    overflow-wrap: anywhere;
  }
  .header-actions {
    width: 100%;
    justify-content: flex-end;
  }
  .header-actions .icon-btn,
  .header-actions .btn,
  .week-nav .icon-btn,
  .week-nav .btn {
    min-height: 40px;
  }
  .toolbar {
    flex-wrap: wrap;
    gap: 8px;
  }
  .toolbar-left {
    min-width: 0;
    max-width: 100%;
  }
  .board-footer {
    flex-wrap: wrap;
    gap: 8px;
  }
  .field.two {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .field input,
  .field select,
  .field textarea,
  .quick textarea,
  .quick select,
  .editor-date-row input,
  .search-input {
    font-size: 16px;
  }
  .field input,
  .field select {
    min-height: 44px;
  }
  .field input,
  .field select,
  .field textarea {
    max-width: 100%;
    min-width: 0;
  }
  .login-story {
    padding: 24px 24px 22px;
  }
  .login-story h1 {
    font-size: 25px;
  }
  .login-story p {
    margin-top: 8px;
  }
  .login-form-wrap {
    padding: 24px;
    min-width: 0;
  }
  .login-form {
    width: 100%;
    min-width: 0;
  }
  .login-form > .btn {
    min-height: 48px;
  }
  .login-form > .muted {
    margin-bottom: 18px;
  }
  .login-foot {
    margin-top: 22px;
  }
  .error,
  .entry-text,
  .detail-text,
  .project-desc,
  .list-main {
    overflow-wrap: anywhere;
  }
  .backdrop,
  .confirm-backdrop {
    top: var(--visible-top, 0px);
    bottom: auto;
    height: var(--visible-height, 100dvh);
  }
  .sheet,
  .sheet.wide,
  .sheet.editor-dialog {
    max-height: calc(var(--visible-height, 100dvh) - 24px);
  }
  .sheet-foot {
    flex-wrap: wrap;
    gap: 10px;
  }
  .sheet-foot > .btn.primary {
    margin-left: auto;
    min-height: 42px;
  }
  .editor-foot-left {
    flex: 1 1 180px;
  }
  .confirm-dialog {
    max-height: calc(var(--visible-height, 100dvh) - 24px);
    overflow-y: auto;
  }
}
@media (max-height: 500px) {
  .backdrop,
  .confirm-backdrop {
    padding: 8px;
    top: var(--visible-top, 0px);
    bottom: auto;
    height: var(--visible-height, 100dvh);
  }
  .sheet,
  .sheet.wide,
  .sheet.editor-dialog {
    max-height: calc(var(--visible-height, 100dvh) - 16px);
  }
  .sheet-head {
    padding: 10px 16px;
  }
  .sheet-body {
    padding: 12px 16px;
  }
  .sheet-foot {
    padding: 10px 16px;
  }
  .record-editor .editor-main textarea.large {
    min-height: 100px;
  }
}
@media (max-width: 600px) {
  .day {
    scroll-margin-top: calc(var(--header-height, 140px) + 12px);
  }
}

/* Note interaction refinement: content first, metadata on demand. */
.title-line {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.header-title h1 {
  font-size: 26px;
  letter-spacing: -0.7px;
  white-space: nowrap;
}
.week-info {
  position: relative;
  flex-shrink: 0;
}
.week-info summary {
  display: flex;
  align-items: center;
  gap: 3px;
  list-style: none;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
  padding: 8px 0;
}
.week-info summary::-webkit-details-marker {
  display: none;
}
.week-info summary svg {
  width: 13px;
  height: 13px;
}
.week-info-panel {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 20;
  min-width: 230px;
  padding: 18px 20px;
  display: grid;
  gap: 10px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 12px 40px #24372e20;
  font-size: 13px;
}
.week-info-panel small {
  font-size: 11px;
  color: var(--muted);
}
.toolbar {
  margin-top: 4px;
}
.entry {
  gap: 8px;
  align-items: center;
  border: 1px solid #e8ede9;
  border-radius: 10px;
  padding: 9px 10px;
  margin: 0 0 8px;
  background: #fff;
  transition:
    background 0.2s,
    box-shadow 0.2s;
}
.entry:last-child {
  border: 1px solid #e8ede9;
}
.entry:hover {
  box-shadow: 0 2px 9px #214c3009;
}
.entry.achievement,
.entry.achievement:last-child {
  background: linear-gradient(110deg, #fffdf5, #fffbeb);
  border-color: #eadbb6;
  box-shadow:
    inset 0 1px 0 #fff,
    0 2px 6px #9e752008;
}
.entry.completed-goal,
.entry.completed-goal:last-child {
  background: #f0f8f2;
  border-color: #cce4d3;
}
.entry .entry-text,
.entry-done.task .entry-text {
  text-decoration: none;
  color: #34453c;
}
.entry.achievement .entry-text {
  color: #675124;
  font-weight: 600;
}
.entry.completed-goal .entry-text {
  color: #356046;
  font-weight: 550;
}
.entry-content {
  padding: 0;
}
.task-toggle {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid #ccd6cf;
  margin: 0;
  color: #c4cfc7;
  background: white;
  overflow: visible;
  touch-action: manipulation;
}
.task-toggle svg {
  width: 15px;
  height: 15px;
  margin: 0;
}
.task-toggle:hover {
  border-color: #61a276;
  color: #61a276;
}
.task-toggle.done {
  background: #4d9b67;
  border-color: #4d9b67;
  color: white;
}
.entry-tags:empty {
  display: none;
}
.entry-tags {
  margin-top: 4px;
}
.entry .move-today,
.move-today {
  display: inline-flex;
  flex-direction: row;
  align-self: center;
  align-items: center;
  gap: 3px;
  color: #64816b;
  border: 0;
  background: #f1f6f2;
  padding: 5px 6px;
  border-radius: 6px;
}
.entry .move-today span,
.move-today span {
  display: block;
  font-size: 10px;
  white-space: nowrap;
}
.move-today:hover {
  background: #e2eee5;
  color: #25714e;
}
.completion-particle {
  position: absolute;
  left: 11px;
  top: 11px;
  width: 5px;
  height: 5px;
  border-radius: 2px;
  pointer-events: none;
  animation: particle-out 0.65s ease-out forwards;
}
.just-completed .task-toggle {
  animation: complete-pop 0.45s cubic-bezier(0.2, 0.8, 0.3, 1.5);
}
.just-completed {
  animation: record-glow 0.7s ease-out;
}
@keyframes particle-out {
  from {
    transform: translate(0, 0) scale(1);
    opacity: 1;
  }
  to {
    transform: translate(var(--dx), var(--dy)) rotate(120deg) scale(0.3);
    opacity: 0;
  }
}
@keyframes complete-pop {
  0% {
    transform: scale(0.7);
  }
  55% {
    transform: scale(1.25);
  }
  100% {
    transform: scale(1);
  }
}
@keyframes record-glow {
  from {
    box-shadow: 0 0 0 4px #e2c36c44;
  }
  to {
    box-shadow: 0 0 0 0 transparent;
  }
}
.quick {
  background: white;
  padding: 16px;
  border: 1px solid #dce5df;
  border-radius: 13px;
  box-shadow: 0 8px 25px #263c2912;
  margin-bottom: 12px;
  animation: composer-in 0.16s ease-out;
}
.quick-top {
  margin-bottom: 10px;
}
.quick-type,
.editor-type {
  gap: 6px;
}
.quick-type button,
.editor-type button {
  border-radius: 20px;
  background: #f3f5f3;
  color: #7c837e;
  padding: 7px 10px;
  font-size: 12px;
  transition:
    background 0.16s,
    color 0.16s,
    box-shadow 0.16s;
}
.quick-type [data-qtype="entry"].selected,
.editor-type [data-edit-type="entry"].selected {
  color: #98701e;
  background: #fff4d4;
  border-color: #efdfae;
}
.quick-type [data-qtype="task"].selected,
.editor-type [data-edit-type="task"].selected {
  color: #99706b;
  background: #faeeec;
  border-color: #ead3cd;
}
.quick textarea {
  min-height: 50px;
  height: auto;
  overflow: hidden;
  resize: none;
  padding: 6px 0 12px;
  font-size: 16px;
  line-height: 1.7;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.quick textarea:focus {
  border: 0;
  box-shadow: none;
  outline: 0;
}
.quick-extra {
  border: 0;
}
.quick-extra summary {
  width: fit-content;
  padding: 0 0 8px;
  font-size: 11px;
  color: #8b958e;
}
.quick-extra[open] summary {
  margin-top: 4px;
}
.quick-footer {
  margin-top: 5px;
  gap: 8px;
}
.quick-footer .btn {
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px;
}
.quick-footer .quiet {
  background: #f4f5f4;
}
.quick .error:empty {
  display: none;
}
@keyframes composer-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.sheet.editor-dialog.writing-dialog {
  width: min(600px, 100%);
  border-radius: 20px;
}
.writing-dialog .sheet-head {
  border: 0;
  padding-bottom: 8px;
}
.writing-dialog .sheet-head h2 {
  font-size: 16px;
  font-weight: 500;
  color: #7b887f;
}
.writing-dialog .sheet-body {
  padding-top: 12px;
}
.editor-type {
  margin-bottom: 18px;
}
.writing-dialog .editor-main label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.record-editor .editor-main textarea.large {
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 4px 0 12px;
  border-radius: 0;
  min-height: 110px;
  font-size: 20px;
  line-height: 1.8;
  resize: none;
}
.record-editor .editor-main textarea.large:focus {
  outline: 0;
  box-shadow: none;
}
.record-editor .editor-main {
  margin-bottom: 20px;
}
.editor-date-row {
  gap: 10px;
  margin-bottom: 4px;
}
.editor-date-row input {
  border: 0;
  background: #f4f7f4;
  font-size: 13px;
}
.editor-extra {
  margin-top: 16px;
}
.editor-extra summary {
  font-size: 12px;
  padding: 15px 0 0;
}
.editor-extra[open] summary {
  padding-bottom: 16px;
}
.editor-dialog .sheet-foot {
  background: #fafcfb;
  gap: 10px;
}
.editor-foot-left .inline-actions {
  order: -1;
}
.editor-foot-left > .small {
  font-size: 11px;
  color: #99a39c;
}
.editor-foot-left .btn {
  padding: 4px 0;
}
.editor-dialog .sheet-foot > .btn {
  font-size: 13px;
  padding: 10px 16px;
}
.history-row,
.idea-list .list-row {
  cursor: pointer;
  transition: background 0.15s;
  padding: 20px 16px;
  border-radius: 10px;
}
.history-row:hover,
.idea-list .list-row:hover {
  background: #f6f8f5;
}
.history-row:focus-visible,
.idea-list .list-row:focus-visible {
  outline: 2px solid #75ac85;
  outline-offset: 2px;
}
.history-text {
  display: block;
  font-size: 15px;
  line-height: 1.75;
  overflow-wrap: anywhere;
}
.record-labels {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 5px;
  font-size: 11px;
}
.record-kind {
  color: #8e7560;
}
.pending-goal .record-kind {
  color: #8c7774;
}
.record-status {
  color: #818d84;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.record-status svg {
  width: 12px;
  height: 12px;
}
.achievement .record-status,
.completed-goal .record-status {
  color: #4c9363;
}
.achievement .history-text {
  color: #7c622d;
}
.completed-goal .history-text {
  color: #3a704d;
}
.pending-goal .record-status {
  color: #8f7d68;
}
.history-list {
  padding: 8px;
}
.history-row .list-date {
  align-self: center;
  font-size: 11px;
  min-width: 100px;
}
.page-intro {
  align-items: center;
  margin-bottom: 20px;
}
.page-intro p {
  font-size: 14px;
  line-height: 1.8;
}
.project-card {
  padding: 24px;
  cursor: default;
}
.project-card:hover {
  transform: none;
}
.project-open {
  display: block;
  text-align: left;
  width: 100%;
}
.project-open h3 {
  font-size: 20px;
  line-height: 1.5;
  margin: 16px 0 10px;
}
.project-desc:empty {
  display: none;
}
.project-count {
  font-size: 12px;
  color: #859189;
  display: block;
  margin-top: 12px;
}
.project-next {
  display: block;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  background: none;
}
.project-next p {
  margin: 6px 0 16px;
  font-size: 14px;
  line-height: 1.7;
}
.project-plan {
  width: 100%;
  justify-content: center;
}
.idea-list .list-row > .btn {
  flex-shrink: 0;
  font-size: 12px;
}
.sound-setting {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
@media (max-width: 1100px) and (min-width: 601px) {
  .title-line {
    gap: 8px;
  }
  .header-title h1 {
    font-size: 23px;
  }
  .entry .move-today span {
    display: none;
  }
}
@media (max-width: 600px) {
  .header-title {
    align-items: center;
  }
  .title-line {
    gap: 10px;
  }
  .header-title h1 {
    font-size: 21px;
  }
  .week-info-panel {
    left: auto;
    right: 0;
    min-width: 210px;
  }
  .week-info summary {
    font-size: 11px;
  }
  .entry {
    padding: 11px;
  }
  .task-toggle {
    width: 32px;
    height: 32px;
  }
  .entry .move-today {
    padding: 8px 6px;
  }
  .entry .move-today span {
    display: block;
  }
  .quick {
    padding: 15px;
  }
  .quick textarea {
    font-size: 17px;
    min-height: 50px;
  }
  .quick-type button {
    padding: 7px 12px;
  }
  .record-editor .editor-main textarea.large {
    font-size: 18px;
    min-height: 110px;
  }
  .editor-date-row {
    display: flex;
    flex-direction: row;
    align-items: center;
  }
  .editor-date-row input {
    flex: 1;
    font-size: 16px;
  }
  .editor-dialog .sheet-foot {
    align-items: center;
  }
  .editor-foot-left .btn {
    font-size: 12px;
  }
  .editor-foot-left > .small {
    font-size: 10px;
  }
  .history-row {
    padding: 16px 10px;
    gap: 8px;
    flex-wrap: wrap;
  }
  .history-row .list-date {
    width: 100%;
    font-size: 10px;
  }
  .history-row .list-main {
    flex: 1;
    min-width: 0;
  }
  .history-text {
    font-size: 14px;
  }
  .history-row .move-today span {
    display: block;
  }
  .idea-list .list-row {
    gap: 12px;
    padding: 18px 0;
  }
  .idea-list .list-date {
    width: 100%;
  }
  .idea-list .list-main {
    min-width: 0;
  }
  .idea-list .list-row > .btn {
    padding: 8px;
    font-size: 11px;
  }
  .page-intro {
    gap: 16px;
    align-items: flex-start;
  }
  .page-intro p {
    font-size: 12px;
  }
  .page-intro > .btn {
    font-size: 12px;
    flex-shrink: 0;
  }
  .project-card {
    padding: 20px;
  }
  .project-open h3 {
    font-size: 19px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .quick,
  .just-completed,
  .just-completed .task-toggle,
  .completion-particle {
    animation: none;
  }
  .entry,
  .quick-type button,
  .editor-type button {
    transition: none;
  }
}
.goal.goal-done {
  background: #edf6ef;
  border: 1px solid #d1e5d7;
  border-radius: 10px;
  padding: 12px;
}
.goal-done .goal-title {
  color: #4d805c;
}
.goal-done .goal-status {
  color: #3c8852;
  font-weight: 600;
}
/* On phones the date owns its row; navigation never squeezes into its text. */
@media (max-width: 600px) {
  .header {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px 12px;
  }
  .header-title {
    display: contents;
  }
  .title-line {
    grid-column: 1 / -1;
    grid-row: 1;
    justify-content: space-between;
    width: 100%;
  }
  .header-title h1 {
    font-size: 21px;
  }
  .week-nav {
    grid-column: 1;
    grid-row: 2;
    justify-self: start;
  }
  .header-actions {
    grid-column: 2;
    grid-row: 2;
    width: auto;
    justify-self: end;
  }
  .week-info-panel {
    right: 0;
  }
}

/* A target becomes an achievement everywhere: two recognizable record icons. */
.record-icon {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: #f1f4f2;
  color: #8b9990;
}
.record-icon svg {
  width: 21px;
  height: 21px;
}
.record-icon.is-achievement {
  background: #fff2cb;
  color: #a37d2b;
}
.history-row {
  align-items: center;
  gap: 16px;
}
.history-row .record-meta:empty {
  display: none;
}
.history-row .record-meta {
  font-size: 11px;
  margin-bottom: 5px;
}
.history-row .list-date {
  min-width: 90px;
}
.history-row.achievement .history-text {
  font-weight: 550;
}
.project-guide {
  margin: 0 0 22px;
  font-size: 13px;
}
.project-guide summary {
  color: #6b8473;
  cursor: pointer;
  width: fit-content;
}
.project-guide > div {
  border-left: 2px solid #d4e4d9;
  padding: 5px 16px;
  margin-top: 12px;
  color: #748278;
  line-height: 1.8;
}
.project-guide p {
  margin: 7px 0;
}
.simple-status {
  display: contents;
}
@media (max-width: 600px) {
  .week-grid,
  .week-grid:has(.quick) {
    grid-auto-rows: 340px;
    grid-template-rows: none;
  }
  .week-grid .day,
  .week-grid .goals-cell {
    height: 340px;
    min-height: 340px;
    max-height: 340px;
    grid-row: auto;
    display: flex;
    flex-direction: column;
  }
  .week-grid .day-entries {
    flex: 1;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .week-grid .add-line {
    flex-shrink: 0;
    margin-top: auto;
    min-height: 44px;
  }
  .week-grid .day-head {
    flex-shrink: 0;
  }
  .header {
    gap: 10px 8px;
    padding: 12px 0;
  }
  .week-nav {
    gap: 3px;
  }
  .week-nav .icon-btn {
    min-width: 40px;
    min-height: 44px;
  }
  .week-nav #today-btn {
    min-width: 60px;
    min-height: 44px;
    border: 1px solid #d2e2d7;
    background: #edf5ef;
    border-radius: 12px;
    color: #397753;
    font-weight: 600;
    font-size: 14px;
  }
  .header-actions .icon-btn,
  .header-actions .btn {
    min-width: 40px;
    min-height: 44px;
  }
  .header-actions .btn {
    padding: 7px 10px;
  }
  .header-actions {
    gap: 3px;
  }
  .history-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .history-controls #history-search {
    grid-column: 1 / -1;
    width: 100%;
  }
  .history-controls .filter {
    max-width: 100%;
    width: 100%;
    min-height: 42px;
    font-size: 12px;
  }
  .history-row {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    gap: 6px 12px;
    padding: 16px 8px;
  }
  .history-row .record-icon {
    grid-column: 1;
    grid-row: 1 / 3;
  }
  .history-row .list-date {
    grid-column: 2;
    grid-row: 1;
    width: auto;
    min-width: 0;
    align-self: end;
  }
  .history-row .list-main {
    grid-column: 2;
    grid-row: 2;
    min-width: 0;
  }
  .history-row .move-today {
    grid-column: 3;
    grid-row: 1 / 3;
    min-height: 40px;
  }
  .page-intro {
    flex-wrap: wrap;
    gap: 12px;
  }
  .page-intro p {
    max-width: none;
    flex: 1 1 170px;
    font-size: 13px;
  }
  .page-intro .btn {
    min-height: 44px;
  }
  .project-guide {
    font-size: 12px;
  }
  .quick-writing .main::before {
    content: "";
    position: fixed;
    inset: 0;
    background: #19281f80;
    backdrop-filter: blur(3px);
    z-index: 50;
  }
  .quick-writing .rail {
    pointer-events: none;
  }
  .quick-writing .quick {
    position: fixed;
    z-index: 51;
    left: max(12px, env(safe-area-inset-left));
    right: max(12px, env(safe-area-inset-right));
    top: calc(var(--visible-top, 0px) + 12px);
    height: calc(var(--visible-height, 100dvh) - 24px);
    margin: 0;
    padding: 20px 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
    border-radius: 18px;
    box-shadow: 0 20px 80px #12261c33;
  }
  .quick-writing .quick-top {
    flex-shrink: 0;
  }
  .quick-writing #quick-text {
    flex: 1;
    min-height: 80px;
    max-height: none;
    height: auto !important;
    overflow-y: auto;
    font-size: 19px;
    line-height: 1.8;
    padding: 8px 0;
  }
  .quick-writing .quick-extra {
    flex-shrink: 0;
  }
  .quick-writing .quick-extra[open] {
    max-height: 120px;
    overflow-y: auto;
  }
  .quick-writing .quick-footer {
    flex-shrink: 0;
    margin-top: auto;
  }
  .quick-writing .quick-footer .btn {
    min-height: 44px;
    font-size: 14px;
    padding: 10px 18px;
  }
  .keyboard-visible .quick-extra:not([open]) {
    display: none;
  }
  .keyboard-visible .editor-dialog .editor-extra:not([open]),
  .keyboard-visible .editor-foot-left > .small {
    display: none;
  }
  .keyboard-visible .editor-dialog .sheet-head {
    padding: 12px 18px 4px;
  }
}
@media (max-width: 360px) {
  .week-nav .icon-btn {
    min-width: 36px;
  }
  .week-nav #today-btn {
    min-width: 54px;
  }
  .header-actions .btn {
    padding: 6px;
  }
  .header-actions .icon-btn,
  .header-actions .btn {
    min-width: 36px;
  }
  .header-actions .mobile-review {
    font-size: 11px;
  }
}

/* Shared writing tools and paper surfaces. */
.mobile-head,
.mobile-week-nav {
  display: none;
}
.record-tools {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  padding-top: 12px;
  border-top: 1px solid #edf1ed;
}
.record-tool {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 36px;
  min-height: 36px;
  padding: 6px 8px;
  border-radius: 9px;
  color: #8a988e;
  white-space: nowrap;
}
.record-tool:hover,
.record-tool:focus-visible {
  background: #edf5ef;
  color: #437756;
}
.record-tool svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.record-tool span {
  font-size: 11px;
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.record-tool span:empty {
  display: none;
}
.record-tool.has-value {
  color: #477857;
}
.record-tool.has-value:not(.has-label) i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #75a67f;
  position: absolute;
  right: 4px;
  top: 5px;
}
.context-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #18271d14;
}
.context-card {
  position: absolute;
  width: 332px;
  max-height: min(520px, calc(100dvh - 24px));
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #e2e9e3;
  border-radius: 17px;
  box-shadow: 0 16px 70px #1b34272a;
  overflow: hidden;
}
.context-card > header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 12px 7px 18px;
  gap: 12px;
  flex-shrink: 0;
}
.context-card strong {
  font-size: 14px;
  font-weight: 600;
}
.context-card header .icon-btn {
  min-width: 34px;
  min-height: 34px;
}
.context-body {
  padding: 4px 12px 14px;
  overflow: auto;
  min-height: 0;
}
.context-options {
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-height: 310px;
  overflow: auto;
}
.context-options button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  text-align: left;
  font-size: 13px;
  border-radius: 9px;
  min-height: 42px;
  overflow-wrap: anywhere;
}
.context-options button[hidden] {
  display: none;
}
.context-options button.selected,
.context-options button:hover {
  background: #edf5ee;
  color: #3d7953;
}
.context-options svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}
.context-options [data-menu] {
  justify-content: flex-start;
}
.context-search,
.context-body input,
.context-body textarea {
  width: 100%;
  border: 1px solid #dce5de;
  padding: 11px 12px;
  border-radius: 10px;
  font: inherit;
  font-size: 14px;
  box-sizing: border-box;
  min-width: 0;
  background: #fff;
}
.context-search {
  margin-bottom: 7px;
}
.context-body textarea {
  resize: vertical;
  line-height: 1.8;
  min-height: 140px;
}
.context-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 0 0;
}
.context-foot .btn {
  font-size: 12px;
  min-height: 38px;
}
.context-date-label {
  display: block;
  font-size: 12px;
  color: #859189;
  margin: 12px 0 7px;
}
.quick .record-tools {
  padding-top: 4px;
  margin: 2px 0 0;
  gap: 2px;
}
.quick .record-tool {
  padding: 5px 7px;
  min-width: 32px;
}
.quick .record-tool.has-label span {
  max-width: 90px;
}
.quick-footer {
  margin-top: 10px;
}
.project-page-intro {
  margin: 10px 0 20px;
}
.project-page-intro .project-guide {
  margin: 0;
  max-width: 650px;
}
.project-guide summary {
  display: flex;
  align-items: center;
  gap: 7px;
  list-style: none;
  font-size: 12px;
}
.project-guide summary svg {
  width: 13px;
  height: 13px;
}
.project-card {
  min-height: 0;
  padding: 24px;
  box-shadow: none;
}
.project-card.is-active {
  border-left: 3px solid #74a886;
}
.project-card.is-finished {
  background: #f4f6f3;
  border-color: #e1e7e0;
}
.project-card.is-finished .project-icon {
  background: #e8eee8;
  color: #769080;
}
.project-card.is-finished h3 {
  color: #7c8d81;
  font-weight: 500;
}
.project-state {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  line-height: 1.4;
  padding: 5px 9px;
  border-radius: 20px;
  background: #eef5ef;
  color: #5a8667;
}
.project-state.state-done {
  background: #e4eee5;
  color: #6b8a73;
}
.project-state.state-paused,
.project-state.state-waiting {
  background: #fbf4e4;
  color: #a28245;
}
.project-state.state-archived,
.project-state.state-stopped {
  background: #e8ece8;
  color: #8d978f;
}
.project-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 22px;
}
.project-card-bottom .project-count {
  margin: 0;
}
.project-enter {
  font-size: 11px;
  color: #829688;
  display: flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
}
.project-enter svg {
  width: 13px;
  height: 13px;
}
.project-empty {
  display: grid;
  justify-items: center;
  padding: 60px 20px;
  color: #9aa79d;
  font-size: 14px;
  gap: 12px;
}
.project-empty > svg {
  width: 34px;
  height: 34px;
}
.project-purpose textarea {
  font-size: 15px;
  line-height: 1.8;
  background: #fafcfb;
  border-color: #e4ebe5;
}
.project-editor .editor-main textarea.large {
  min-height: 65px;
  font-size: 22px;
}
.project-detail-state {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}
.project-purpose-text {
  font-size: 15px;
  line-height: 1.8;
  margin: 0 0 24px;
}
.project-detail-actions {
  margin: 18px 0 30px;
}
.project-progress-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 15px 0;
  border-bottom: 1px solid #edf1ed;
}
.project-progress-row > span:nth-child(2) {
  display: grid;
  gap: 5px;
  flex: 1;
  min-width: 0;
}
.project-progress-row time {
  font-size: 11px;
  color: #97a298;
}
.project-progress-row span span {
  font-size: 14px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}
.project-progress-row > svg {
  width: 16px;
  height: 16px;
  color: #a2afa5;
}
.idea-paper {
  max-width: 920px;
  margin: 6px auto 24px;
  background: #fff;
  border: 1px solid #e1e8e1;
  border-radius: 18px;
  box-shadow: 0 4px 20px #284c3104;
  padding: 34px 40px;
  min-height: calc(100dvh - 190px);
}
#idea-paper-text {
  width: 100%;
  padding: 0;
  border: 0;
  outline: 0;
  box-shadow: none;
  resize: none;
  font: inherit;
  font-size: 19px;
  line-height: 1.9;
  min-height: 130px;
  background: transparent;
}
#idea-paper-text::placeholder {
  color: #b2bcb3;
  font-weight: 400;
}
.paper-write-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0 26px;
}
.paper-shortcut {
  font-size: 11px;
  color: #a1aca3;
}
.paper-write-footer .btn {
  font-size: 12px;
  min-height: 36px;
}
#idea-paper-form .error:empty {
  display: none;
}
.paper-record {
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr) 40px;
  align-items: start;
  gap: 16px;
  border-top: 1px solid #edf1ed;
  padding: 24px 0;
  cursor: pointer;
}
.paper-record time {
  font-size: 11px;
  color: #a1aca3;
  padding-top: 4px;
}
.paper-record-text {
  font-size: 16px;
  line-height: 1.9;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.paper-record .icon-btn {
  margin-top: 0;
  color: #96a59a;
}
.paper-record:hover .paper-record-text {
  color: #3a7350;
}
.settings-disclosure {
  border-bottom: 1px solid #e4ebe4;
  padding: 0;
  margin: 0;
}
.settings-disclosure > summary {
  padding: 19px 0;
  cursor: pointer;
  font-size: 15px;
  color: #354d3d;
}
.settings-disclosure > div {
  padding: 0 0 18px;
}
@media (max-width: 600px) {
  /* First row: page name and two predictable actions. Second row: week navigation. */
  .main {
    padding: 0 max(16px, env(safe-area-inset-left)) 22px
      max(16px, env(safe-area-inset-right));
  }
  .header {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 5px 0 10px;
    min-height: 0;
    background: #f5f8f6f5;
    border-bottom: 0;
    backdrop-filter: blur(12px);
  }
  .header > .header-title,
  .header > .header-actions {
    display: none;
  }
  .header > .mobile-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 58px;
    width: 100%;
    gap: 16px;
  }
  .mobile-head h1 {
    font-size: 24px;
    letter-spacing: -0.6px;
    line-height: 1.3;
    font-weight: 650;
    margin: 0;
    white-space: nowrap;
  }
  .mobile-head > div {
    display: flex;
    gap: 4px;
    align-items: center;
  }
  .mobile-head .icon-btn {
    min-width: 42px;
    min-height: 44px;
    width: 42px;
    border-radius: 12px;
    color: #667c6d;
  }
  .header > .mobile-week-nav {
    display: flex;
    align-items: center;
    gap: 2px;
    width: 100%;
    min-height: 48px;
    padding: 2px 0 0;
  }
  .mobile-week-nav .icon-btn {
    width: 36px;
    min-width: 36px;
    min-height: 44px;
    padding: 8px;
  }
  .mobile-week-info {
    flex: 1;
    min-width: 0;
    position: relative;
  }
  .mobile-week-info summary {
    font-size: 14px;
    letter-spacing: -0.3px;
    white-space: nowrap;
    padding: 10px 0;
    justify-content: center;
    font-weight: 550;
    color: #496051;
    gap: 3px;
  }
  .mobile-week-info .week-info-panel {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    min-width: 220px;
    padding: 18px;
    font-size: 13px;
  }
  .mobile-today {
    min-width: 58px;
    min-height: 44px;
    padding: 8px 12px;
    font-size: 13px;
    color: #407653;
    background: #eaf3ec;
    border: 0;
    border-radius: 11px;
    margin-left: 8px;
  }
  .rail {
    height: calc(64px + env(safe-area-inset-bottom));
    padding: 5px 16px calc(5px + env(safe-area-inset-bottom));
    background: #fafcfaf5;
    gap: 12px;
  }
  .rail .rail-bottom {
    display: none;
  }
  .rail .nav-btn {
    flex: 1;
    width: auto;
    min-height: 50px;
    height: 50px;
    max-width: 84px;
    font-size: 11px;
    gap: 3px;
  }
  .rail .nav-btn svg {
    width: 21px;
    height: 21px;
  }
  .rail .nav-btn.active {
    background: #eaf3ec;
    color: #3e7854;
  }
  .toolbar {
    margin: 6px 0 16px;
    gap: 12px;
    min-height: 36px;
  }
  .toolbar .filter {
    font-size: 12px;
    min-height: 36px;
    border-radius: 10px;
    padding: 6px 23px 6px 10px;
    background-color: #fff;
    max-width: 150px;
  }
  .toolbar .segmented {
    padding: 3px;
    border-radius: 10px;
    background: #eaf0eb;
  }
  .toolbar .segmented button {
    font-size: 12px;
    padding: 5px 10px;
    min-height: 30px;
  }
  .week-grid {
    border-radius: 16px;
  }
  .week-grid .day {
    padding: 18px 16px;
  }
  .week-grid .day-head {
    margin-bottom: 15px;
  }
  .week-grid .date-num {
    font-size: 25px;
  }
  .week-grid .weekday {
    font-size: 12px;
  }
  .week-grid .day-head > .icon-btn {
    min-height: 36px;
    min-width: 36px;
  }
  .week-grid .add-line {
    font-size: 13px;
    min-height: 44px;
    color: #7f9b87;
  }
  .entry {
    padding: 11px 10px;
    border-radius: 11px;
    gap: 9px;
    margin-bottom: 8px;
  }
  .entry .entry-text {
    font-size: 14px;
    line-height: 1.75;
  }
  .entry-tags .tag {
    font-size: 10px;
  }
  .board-footer {
    display: none;
  }
  .page-intro {
    margin: 12px 0 20px;
  }
  .project-page-intro {
    gap: 14px;
    align-items: center;
    flex-wrap: nowrap;
  }
  .project-page-intro .project-guide {
    flex: 1;
  }
  .project-page-intro > .btn {
    font-size: 13px;
    padding: 10px 14px;
    border-radius: 12px;
  }
  .project-toolbar {
    margin: 0 0 16px;
  }
  .project-toolbar .filter {
    max-width: 180px;
    min-height: 40px;
  }
  .cards {
    gap: 13px;
  }
  .project-card {
    padding: 21px 20px;
    border-radius: 17px;
    min-height: 0;
  }
  .project-card .project-open h3 {
    font-size: 19px;
    line-height: 1.5;
    margin: 14px 0 9px;
  }
  .project-card .project-desc {
    font-size: 13px;
    line-height: 1.8;
    max-height: 3.6em;
    overflow: hidden;
  }
  .project-card .project-card-bottom {
    margin-top: 20px;
  }
  .project-count {
    font-size: 11px;
  }
  .project-empty {
    padding: 70px 10px;
    font-size: 13px;
  }
  .idea-paper {
    margin: 10px -2px 0;
    padding: 24px 20px;
    min-height: calc(100dvh - 165px);
    border-radius: 17px;
  }
  #idea-paper-text {
    font-size: 18px;
    line-height: 1.9;
    min-height: 160px;
  }
  .paper-write-footer {
    padding: 0 0 22px;
    justify-content: flex-end;
  }
  .paper-shortcut {
    display: none;
  }
  .paper-write-footer .btn {
    min-height: 42px;
    font-size: 13px;
    border-radius: 11px;
  }
  .paper-record {
    grid-template-columns: 1fr 36px;
    gap: 7px 10px;
    padding: 21px 0;
  }
  .paper-record time {
    grid-column: 1;
    grid-row: 1;
    padding: 0;
  }
  .paper-record-text {
    grid-column: 1;
    grid-row: 2;
    font-size: 15px;
    line-height: 1.9;
  }
  .paper-record .icon-btn {
    grid-column: 2;
    grid-row: 1 / 3;
    min-width: 36px;
    min-height: 44px;
    align-self: center;
  }
  .history-controls {
    gap: 9px;
    margin: 12px 0 15px;
  }
  .history-controls #history-search {
    min-height: 46px;
    border-radius: 13px;
    padding: 11px 14px;
    font-size: 15px;
  }
  .history-controls .filter {
    font-size: 12px;
    min-height: 40px;
    border-radius: 10px;
    padding: 8px 26px 8px 10px;
  }
  .more-note {
    font-size: 11px;
    margin-bottom: 13px;
  }
  .history-list {
    border-radius: 16px;
    padding: 5px;
  }
  .history-row {
    padding: 16px 9px;
    gap: 6px 12px;
  }
  .history-row .record-icon {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
    border-radius: 11px;
  }
  .history-row .history-text {
    font-size: 14px;
    line-height: 1.8;
  }
  .history-row .list-date {
    font-size: 10px;
    color: #97a79b;
  }
  .history-row .move-today {
    padding: 8px 7px;
  }
  .context-backdrop {
    top: var(--visible-top, 0px);
    bottom: auto;
    height: var(--visible-height, 100dvh);
    background: #14221a57;
    backdrop-filter: blur(2px);
  }
  .context-card {
    left: 12px;
    right: 12px;
    bottom: max(12px, env(safe-area-inset-bottom));
    top: auto;
    width: auto;
    max-height: calc(var(--visible-height, 100dvh) - 32px);
    border-radius: 20px;
    box-shadow: 0 12px 65px #152d2033;
  }
  .context-card > header {
    padding: 13px 12px 7px 20px;
  }
  .context-card header .icon-btn {
    min-height: 44px;
    min-width: 44px;
  }
  .context-card strong {
    font-size: 16px;
  }
  .context-body {
    padding: 2px 16px 16px;
  }
  .context-options {
    max-height: min(310px, calc(var(--visible-height, 100dvh) - 140px));
    gap: 4px;
  }
  .context-options button {
    min-height: 48px;
    padding: 12px;
    font-size: 15px;
    border-radius: 12px;
  }
  .context-search,
  .context-body input,
  .context-body textarea {
    font-size: 16px;
    min-height: 44px;
  }
  .context-body textarea {
    min-height: 120px;
    max-height: 35dvh;
  }
  .context-foot .btn {
    min-height: 44px;
    font-size: 14px;
    padding: 10px 16px;
  }
  .backdrop {
    padding: 12px;
  }
  .sheet,
  .sheet.wide,
  .sheet.editor-dialog,
  .sheet.editor-dialog.writing-dialog {
    width: 100%;
    border-radius: 20px;
    max-height: calc(var(--visible-height, 100dvh) - 24px);
  }
  .sheet-head,
  .writing-dialog .sheet-head {
    padding: 15px 16px 8px 20px;
  }
  .sheet-head h2,
  .writing-dialog .sheet-head h2 {
    font-size: 18px;
    color: #526b5a;
    line-height: 1.5;
    letter-spacing: -0.3px;
    max-width: calc(100% - 48px);
  }
  .sheet-head .icon-btn {
    min-height: 44px;
    min-width: 44px;
  }
  .sheet-body,
  .writing-dialog .sheet-body {
    padding: 12px 20px 20px;
    overflow-y: auto;
  }
  .sheet-foot,
  .editor-dialog .sheet-foot {
    padding: 12px 16px;
    min-height: 66px;
    flex-wrap: nowrap;
    gap: 10px;
    background: #fafcfb;
  }
  .sheet-foot .btn {
    min-height: 44px;
    font-size: 13px;
    padding: 10px 13px;
    border-radius: 11px;
  }
  .sheet-foot .inline-actions {
    flex-wrap: wrap;
    gap: 8px;
  }
  .sheet-foot > .small {
    display: none;
  }
  .editor-foot-left {
    flex: 1;
    min-width: 0;
  }
  .editor-foot-left > .small {
    display: none;
  }
  .editor-foot-left .btn {
    min-height: 40px;
    font-size: 12px;
    padding: 7px 0;
  }
  .record-editor .editor-main textarea.large {
    font-size: 19px;
    line-height: 1.85;
    min-height: 145px;
  }
  .project-editor .editor-main textarea.large {
    min-height: 60px;
    font-size: 21px;
  }
  .project-purpose label {
    font-size: 12px;
  }
  .project-purpose textarea {
    font-size: 16px;
    padding: 12px;
  }
  .record-tools {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    gap: 3px;
    padding-top: 9px;
  }
  .record-tool {
    flex-shrink: 0;
    min-width: 40px;
    min-height: 42px;
    padding: 7px 8px;
  }
  .record-tool svg {
    width: 19px;
    height: 19px;
  }
  .record-tool span {
    max-width: 92px;
    font-size: 11px;
  }
  .editor-type {
    margin-bottom: 14px;
  }
  .editor-type button,
  .quick-type button {
    font-size: 13px;
    padding: 8px 12px;
    border-radius: 20px;
  }
  .quick-writing .quick {
    padding: 20px;
    gap: 14px;
  }
  .quick-writing #quick-text {
    font-size: 20px;
    line-height: 1.85;
    min-height: 80px;
  }
  .quick-writing .record-tools {
    flex-shrink: 0;
    min-height: 43px;
    padding: 0;
    border: 0;
    margin: 0;
  }
  .quick-writing .record-tool {
    min-width: 44px;
    min-height: 44px;
  }
  .quick-writing .quick-footer {
    min-height: 44px;
    margin-top: 0;
  }
  .quick-writing .quick-footer .btn {
    border-radius: 12px;
    min-height: 44px;
    padding: 10px 18px;
  }
  .quick-footer kbd {
    display: none;
  }
  .project-progress-row {
    padding: 15px 0;
    gap: 10px;
  }
  .project-progress-row .record-icon {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
  }
  .project-progress-row span span {
    font-size: 14px;
  }
  .project-detail-actions .btn {
    min-height: 44px;
    border-radius: 12px;
  }
  .project-detail-actions .icon-btn {
    min-width: 44px;
    min-height: 44px;
  }
  .next-box {
    padding: 16px;
    border-radius: 13px;
    margin: 18px 0;
  }
  .next-box p:not(.small) {
    font-size: 16px;
    line-height: 1.75;
  }
  .section-label {
    font-size: 12px;
    margin-top: 24px;
  }
  .settings-group p,
  .settings-disclosure p {
    font-size: 12px;
    line-height: 1.9;
  }
  .settings-disclosure > summary {
    font-size: 15px;
    padding: 20px 0;
  }
  .settings-disclosure .btn {
    min-height: 44px;
    max-width: 100%;
    white-space: normal;
    font-size: 12px;
    margin: 4px 3px 4px 0;
  }
  .settings-disclosure .field {
    margin-bottom: 16px;
  }
  .ai-choice {
    padding: 15px;
    border-radius: 13px;
  }
  .ai-choice p {
    font-size: 13px;
    line-height: 1.8;
  }
  .field textarea {
    font-size: 16px;
    line-height: 1.8;
    min-height: 100px;
  }
  .field input,
  .field select {
    font-size: 16px;
    min-height: 44px;
    border-radius: 10px;
  }
  .review-meta {
    font-size: 12px;
    line-height: 1.8;
  }
  .login-page {
    min-height: 100dvh;
    padding: 36px 24px;
    display: block;
  }
  .login-story {
    padding: 0 0 24px;
  }
  .login-story .brand-mark {
    width: 42px;
    height: 42px;
    font-size: 22px;
    margin-bottom: 18px;
  }
  .login-story h1 {
    font-size: 27px;
    line-height: 1.5;
    letter-spacing: -0.6px;
    margin: 0;
  }
  .login-story > p,
  .login-line,
  .login-foot {
    display: none;
  }
  .login-form-wrap {
    padding: 0;
  }
  .login-form {
    padding: 0;
    border: 0;
    background: none;
    width: 100%;
    max-width: none;
    box-shadow: none;
  }
  .login-form h2 {
    font-size: 20px;
  }
  .login-form > .muted {
    font-size: 13px;
    line-height: 1.8;
    margin: 10px 0 24px;
  }
  .login-form .field label {
    font-size: 13px;
    margin-bottom: 9px;
  }
  .login-form input {
    font-size: 16px;
    min-height: 48px;
    border-radius: 12px;
  }
  .login-form button[type="submit"] {
    min-height: 48px;
    border-radius: 12px;
    font-size: 15px;
  }
  .keyboard-visible .sheet-head {
    padding-top: 8px;
  }
  .keyboard-visible .sheet-body {
    padding-top: 8px;
    padding-bottom: 12px;
  }
  .keyboard-visible .editor-type {
    margin-bottom: 6px;
  }
  .keyboard-visible .record-editor .editor-main textarea.large {
    min-height: 80px;
  }
  .keyboard-visible .record-tools {
    padding-top: 4px;
  }
  .keyboard-visible .sheet-foot {
    padding: 8px 14px;
    min-height: 60px;
  }
}
@media (max-width: 360px) {
  .main {
    padding-left: 12px;
    padding-right: 12px;
  }
  .mobile-head h1 {
    font-size: 23px;
  }
  .mobile-week-nav .icon-btn {
    min-width: 30px;
    width: 30px;
  }
  .mobile-week-info summary {
    font-size: 12px;
    letter-spacing: -0.5px;
  }
  .mobile-today {
    min-width: 54px;
    padding: 8px 10px;
    margin-left: 3px;
  }
  .context-card {
    left: 10px;
    right: 10px;
  }
  .sheet-body,
  .writing-dialog .sheet-body {
    padding-left: 16px;
    padding-right: 16px;
  }
  .record-tool span {
    max-width: 70px;
  }
  .project-enter {
    font-size: 10px;
  }
}
@media (max-width: 600px) {
  .keyboard-visible .rail {
    display: none;
  }
  .keyboard-visible .idea-paper {
    position: fixed;
    z-index: 35;
    top: calc(var(--visible-top, 0px) + 12px);
    left: 12px;
    right: 12px;
    height: calc(var(--visible-height, 100dvh) - 24px);
    min-height: 0;
    margin: 0;
    padding: 20px;
    overflow: hidden;
  }
  .keyboard-visible #idea-paper-form {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
  }
  .keyboard-visible #idea-paper-text {
    flex: 1;
    height: auto !important;
    min-height: 70px;
    max-height: none;
    overflow: auto;
  }
  .keyboard-visible .paper-write-footer {
    padding: 10px 0 0;
    flex-shrink: 0;
  }
  .keyboard-visible .paper-records {
    display: none;
  }
}
@media (max-width: 600px) {
  .mobile-week-info summary {
    min-height: 44px;
    box-sizing: border-box;
  }
}
/* Date planning: one calendar, then the selected day's existing work. */
.date-context .context-card {
  left: 50%;
  top: 50%;
  bottom: auto;
  transform: translate(-50%, -50%);
  width: min(376px, calc(100vw - 24px));
  max-height: calc(var(--visible-height, 100dvh) - 24px);
}
.date-context .context-body {
  padding: 0 16px 14px;
}
.calendar-month {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 4px;
}
.calendar-month strong {
  font-size: 15px;
}
.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 2px;
}
.calendar-weekdays span {
  text-align: center;
  font-size: 11px;
  color: #94a297;
  padding: 8px 0;
}
.calendar-grid button {
  height: 40px;
  min-width: 0;
  border-radius: 10px;
  position: relative;
  font-size: 14px;
  color: #415a49;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
}
.calendar-grid button:hover {
  background: #edf4ef;
}
.calendar-grid button.other-month {
  color: #b7c1b9;
}
.calendar-grid button.is-today > span {
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.calendar-grid button.selected {
  color: white;
  background: #477e59;
}
.calendar-grid button i {
  display: flex;
  gap: 3px;
  height: 4px;
  position: absolute;
  bottom: 4px;
}
.calendar-grid b {
  height: 3px;
  width: 3px;
  border-radius: 50%;
  background: #779e82;
}
.calendar-grid b.achievement-dot {
  background: #c29b45;
}
.calendar-grid .selected b {
  background: white;
}
.calendar-agenda {
  border-top: 1px solid #e8eee9;
  margin-top: 12px;
  padding-top: 13px;
}
.calendar-agenda-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.calendar-agenda-title strong {
  font-size: 13px;
}
.calendar-agenda-title > span {
  font-size: 11px;
  color: #94a297;
}
.calendar-agenda-rows {
  max-height: 136px;
  overflow: auto;
  overscroll-behavior: contain;
}
.calendar-agenda-rows > p {
  font-size: 12px;
  color: #92a096;
  padding: 10px 0;
  margin: 0;
}
.calendar-agenda-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 8px 0;
  color: #536b5b;
  font-size: 12px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.calendar-agenda-row > span:first-child {
  color: #7b9683;
  flex-shrink: 0;
}
.calendar-agenda-row svg {
  width: 15px;
  height: 15px;
  vertical-align: middle;
}
.calendar-agenda-row.achievement > span:first-child {
  color: #b4913e;
}
.calendar-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #edf1ed;
  margin-top: 12px;
  padding-top: 12px;
  gap: 8px;
}
.calendar-footer .btn {
  min-height: 42px;
}
.date-context .error:empty {
  display: none;
}
#return-idea {
  color: #789180;
}
#return-idea[hidden] {
  display: none !important;
}
/* Compact project summaries: title first, state second, one progress line. */
.project-card .project-open {
  padding: 20px 22px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 16px;
  text-align: left;
  min-height: 0;
}
.project-card .project-top {
  display: contents;
}
.project-card .project-icon {
  display: none;
}
.project-card .project-state {
  grid-column: 2;
  grid-row: 1;
  align-self: start;
  font-size: 10px;
  padding: 4px 8px;
  margin-top: 4px;
}
.project-card h3 {
  grid-column: 1;
  grid-row: 1;
  font-size: 21px;
  line-height: 1.45;
  margin: 0;
  letter-spacing: -0.3px;
  overflow-wrap: anywhere;
}
.project-card .project-desc {
  grid-column: 1/-1;
  font-size: 12px;
  line-height: 1.7;
  margin: 0;
  color: #91a096;
  -webkit-line-clamp: 1;
}
.project-card .project-card-bottom {
  grid-column: 1/-1;
  margin: 3px 0 0;
  padding-top: 10px;
  border-top: 1px solid #edf1ed;
  font-size: 11px;
}
.project-card.is-finished h3 {
  color: #829087;
  font-weight: 500;
}
.project-card.is-finished {
  opacity: 0.86;
}
.cards {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 310px), 1fr));
  gap: 14px;
}
@media (max-width: 600px) {
  .project-card .project-open {
    padding: 17px 18px;
    gap: 8px 12px;
  }
  .project-card h3 {
    font-size: 20px;
  }
  .project-card .project-card-bottom {
    padding-top: 9px;
  }
  .calendar-grid button {
    height: 42px;
  }
}
@media (max-height: 650px) {
  .date-context .context-card {
    max-height: calc(var(--visible-height, 100dvh) - 16px);
  }
  .calendar-grid button {
    height: 32px;
  }
  .calendar-agenda-rows {
    max-height: 80px;
  }
}
.project-card {
  padding: 0;
  min-height: 0;
}
.date-context .context-card > .calendar-footer {
  margin: 0;
  padding: 12px 16px;
  flex-shrink: 0;
  background: #fff;
}
.editor-note-preview {
  border-top: 1px solid #e9eeea;
  padding: 14px 0 2px;
  margin-top: 8px;
}
.editor-note-preview[hidden] {
  display: none !important;
}
.editor-note-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #91a095;
  font-size: 11px;
}
.editor-note-head .icon-btn {
  width: 32px;
  min-height: 32px;
  padding: 7px;
}
.editor-note-text {
  font-size: 14px;
  line-height: 1.85;
  color: #607969;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin-top: 4px;
  user-select: text;
}
.goal-foot:has(> .goal-status:only-child:empty) {
  display: none;
}
