:root {
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "PingFang SC",
    "Microsoft YaHei",
    sans-serif;
  color: #222d25;
  background: #f7f8f3;
  font-synthesis: none;
  --ink: #23382e;
  --line: #dcdfd5;
  --muted: #57625b;
  --leaf: #346341;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input {
  font: inherit;
}
button,
a,
input {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.6;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #bb7717;
  outline-offset: 3px;
}
header {
  border-bottom: 1px solid var(--line);
  background: #fbfcf7;
}
.bar,
main,
.site-foot {
  width: min(1140px, calc(100% - 72px));
  margin: auto;
}
.bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 73px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.05em;
  text-decoration: none;
}
.leaf {
  width: 26px;
  height: 28px;
  background: #416a43;
  border-radius: 17px 4px 18px 5px;
  transform: rotate(8deg);
  position: relative;
}
.leaf:after {
  content: "";
  position: absolute;
  left: 12px;
  top: 6px;
  height: 18px;
  width: 1px;
  background: #d0dfae;
  transform: rotate(30deg);
}
nav {
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 24px;
}
nav button {
  background: transparent;
  border: 0;
  border-radius: 20px;
  padding: 6px 20px;
  color: var(--muted);
}
nav button[aria-pressed="true"] {
  background: var(--ink);
  color: white;
}
.page-head,
.line,
.actions,
.dates {
  display: flex;
  align-items: center;
}
.page-head,
.line {
  justify-content: space-between;
  gap: 12px;
}
.page-head {
  margin: 37px 0 23px;
}
.over {
  font-size: 12px;
  letter-spacing: 0.12em;
  font-weight: 650;
  color: #526042;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: clamp(32px, 4vw, 46px);
  letter-spacing: -0.055em;
  margin-top: 7px;
  line-height: 1.18;
}
h2 {
  font-size: 21px;
  letter-spacing: -0.04em;
}
.dates {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 3px;
  background: #fff;
}
.dates button,
.close {
  border: 0;
  background: transparent;
  color: var(--ink);
  width: 32px;
  height: 34px;
  font-size: 24px;
}
.dates input {
  background: transparent;
  border: none;
  color: #3c4c40;
  font-size: 14px;
  max-width: 135px;
}
.top-grid,
.bottom-grid {
  display: grid;
  grid-template-columns: 1.65fr 1fr;
  gap: 19px;
}
.bottom-grid {
  margin-top: 19px;
}
.capture,
.panel {
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
}
.capture {
  position: relative;
  isolation: isolate;
  background: #e8ebbb;
  min-height: 272px;
  display: flex;
  align-items: center;
  padding: 32px;
}
.capture-text {
  z-index: 1;
  position: relative;
}
.capture h2 {
  font-size: clamp(32px, 3.6vw, 48px);
  margin: 12px 0 8px;
  letter-spacing: -0.075em;
  line-height: 1.1;
}
.capture p {
  font-size: 14px;
  color: #404e3d;
  max-width: 245px;
  line-height: 1.65;
}
.banana {
  position: absolute;
  width: 42%;
  height: 90%;
  right: -2%;
  top: 6%;
  object-fit: contain;
  mix-blend-mode: multiply;
  z-index: -1;
  transform: rotate(-14deg);
}
.credit {
  position: absolute;
  right: 12px;
  bottom: 8px;
  font-size: 9px;
  color: #586044;
  text-decoration: none;
}
.actions {
  gap: 16px;
  margin-top: 23px;
  flex-wrap: wrap;
}
.primary,
.secondary,
.link,
.chip,
.file-label {
  border-radius: 9px;
  font-weight: 600;
}
.primary,
.secondary,
.file-label {
  padding: 10px 17px;
  min-height: 42px;
}
.primary {
  background: #294834;
  color: #fff;
  border: 1px solid #294834;
}
.primary:hover {
  background: #365c41;
}
.primary b {
  font-size: 16px;
}
.link {
  border: 0;
  background: transparent;
  color: #344c31;
  font-size: 13px;
  padding: 8px 0;
}
.capture .hint {
  font-size: 12px;
  margin-top: 10px;
}
.capture .hint a {
  color: #294834;
  font-weight: 600;
}
.link:hover {
  text-decoration: underline;
}
.panel {
  background: #fefefa;
  padding: 23px;
}
.tag,
.small,
.status {
  font-size: 12px;
  color: var(--muted);
}
.tag {
  background: #eef1e8;
  padding: 4px 10px;
  border-radius: 20px;
}
.macro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e9ebe3;
  padding: 10px 0;
}
.macro:last-child {
  border: 0;
}
.macro span {
  font-size: 14px;
}
.dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 100%;
  margin-right: 9px;
}
.macro strong {
  font-size: 23px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  letter-spacing: -0.025em;
}
.macro small {
  font-size: 12px;
  font-weight: 400;
  margin-left: 4px;
  color: var(--muted);
}
#macros {
  margin: 8px 0;
}
.small {
  line-height: 1.5;
}
.empty {
  background: #f5f6ef;
  border-radius: 12px;
  padding: 18px;
  margin: 16px 0 0;
}
.empty strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
}
.empty p,
.row small,
dialog p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}
.empty p {
  margin-top: 4px;
}
.secondary,
.file-label,
.chip {
  background: white;
  border: 1px solid #cbd2c6;
  color: #304c39;
}
.secondary {
  margin-top: 15px;
}
.row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 13px 0;
  background: transparent;
  color: inherit;
}
.row img {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 10px;
}
.row span {
  flex: 1;
}
.row small {
  display: block;
}
.status {
  margin: 14px 0 24px;
  min-height: 19px;
}
.error {
  padding: 10px;
  background: #ffede5;
  color: #893a22;
  border-radius: 8px;
  margin: 10px 0;
}
.close {
  border-radius: 50%;
  background: #f1f3ec;
}
.preview {
  width: 100%;
  height: 165px;
  object-fit: contain;
  background: #f4f4ed;
  border-radius: 12px;
  margin: 14px 0;
}
dialog {
  width: min(440px, 92vw);
  padding: 23px;
  border: 1px solid var(--line);
  border-radius: 20px;
  color: inherit;
  max-height: 90dvh;
  overflow: auto;
}
dialog::backdrop {
  background: #17251dc2;
}
/* ICP filing number, required at the bottom of the site. The login dialog repeats it
   because its backdrop hides the page footer from signed-out visitors. */
.site-foot {
  margin-top: 40px;
  padding: 18px 0 28px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}
.site-foot a,
.beian a {
  color: var(--muted);
  text-decoration: none;
}
.site-foot a:hover,
.beian a:hover {
  text-decoration: underline;
}
dialog .beian {
  margin: 18px 0 0;
  font-size: 12px;
  text-align: center;
}
.chips {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin: 8px 0;
}
.chip {
  padding: 8px 12px;
}
.chip.active {
  background: var(--ink);
  color: white;
}
.error[hidden],
.notice[hidden] {
  display: none;
}
.notice {
  padding: 10px 12px;
  background: #eaf1e4;
  color: var(--ink);
  border-radius: 8px;
  margin: 10px 0;
  font-size: 14px;
}
.notice strong {
  margin-right: 6px;
  color: var(--leaf);
}
dialog label {
  display: block;
  font-size: 14px;
  margin: 10px 0;
}
dialog input:not([type="file"]) {
  display: block;
  width: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-top: 5px;
}
.file-label {
  display: inline-block;
  cursor: pointer;
}
#details h3 {
  font-size: 15px;
  margin: 12px 0 5px;
}
#details .small {
  margin: 8px 0;
}
.line + h3 {
  margin-top: 12px;
}
@media (max-width: 780px) {
  .bar,
  main,
  .site-foot {
    width: calc(100% - 32px);
  }
  .top-grid,
  .bottom-grid {
    grid-template-columns: 1fr;
  }
  .bar {
    height: 59px;
  }
  .page-head {
    margin-top: 22px;
  }
  .capture {
    min-height: 235px;
  }
  .bottom-grid {
    gap: 14px;
  }
  .top-grid {
    gap: 14px;
  }
  .panel {
    padding: 18px;
  }
  .totals #macros {
    display: flex;
    gap: 4px;
  }
  .totals .macro {
    display: block;
    flex: 1;
    border: 0;
  }
  .totals .macro strong {
    display: block;
  }
  .capture p {
    max-width: 220px;
  }
}
@media (max-width: 480px) {
  .capture {
    padding: 20px;
    min-height: 220px;
  }
  .capture h2 {
    font-size: 34px;
  }
  .capture p {
    max-width: 175px;
  }
  .banana {
    width: 43%;
    right: -1%;
    top: 0;
  }
  .page-head {
    gap: 5px;
  }
  .dates button {
    width: 24px;
  }
  .dates input {
    max-width: 114px;
    font-size: 12px;
  }
  .actions {
    gap: 12px;
  }
  .actions .link {
    font-size: 12px;
  }
  .over {
    font-size: 11px;
  }
  .primary {
    padding: 9px 12px;
  }
  .row small {
    font-size: 12px;
  }
}

[hidden] {
  display: none !important;
}
.day-tools,
.filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.icon {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  display: grid;
  place-items: center;
}
.icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.filters {
  gap: 16px;
  margin-bottom: 16px;
}
.filters label,
#planForm label {
  font-size: 13px;
  color: var(--muted);
}
.filters input,
dialog select {
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  font: inherit;
}
.filters input {
  display: block;
  margin-top: 4px;
}
.filters .chips {
  flex-basis: 100%;
}
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(245px, 100%), 1fr));
  gap: 14px;
  margin: 16px 0;
}
.cards h2 {
  margin: 8px 0;
  font-size: 22px;
}
.cards .number {
  font-size: 32px;
  letter-spacing: -0.05em;
  font-weight: 650;
}
.cards p,
.panel .caption {
  line-height: 1.6;
  font-size: 14px;
  color: var(--muted);
  margin: 6px 0;
}
#planForm .primary {
  margin-top: 14px;
}
#planSources a {
  color: var(--leaf);
  margin-right: 8px;
}
#goalFields,
#weekdays {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
#goalFields label {
  flex: 1;
  min-width: 75px;
}
#weekdays label {
  cursor: pointer;
  margin: 4px 0;
}
#weekdays input {
  display: inline;
  width: auto;
}
#activityTarget:not(:empty) {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}
#savedDay,
#editTime {
  margin-top: 8px;
}
.trend {
  overflow-x: auto;
  margin-top: 12px;
}
.trend table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.trend th,
.trend td {
  padding: 9px 7px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.trend .meter {
  display: inline-block;
  width: 32px;
  height: 5px;
  margin-right: 5px;
  background: #ebeee6;
  vertical-align: middle;
}
.meter i {
  display: block;
  height: 100%;
  background: var(--leaf);
}
#coachTabs {
  margin: 0 0 18px;
}
#categoryPick .chip {
  font-size: 13px;
}
@media (max-width: 580px) {
  .page-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }
  .day-tools {
    width: 100%;
  }
  .day-tools .dates {
    margin-left: auto;
  }
  nav button {
    padding: 6px 11px;
  }
  .cards {
    grid-template-columns: 1fr;
  }
  .filters {
    gap: 8px;
  }
  .filters label {
    flex: 1;
  }
}
/* Demo onboarding tour (tour.js). The spotlight is the ring's huge shadow; four
   transparent blockers around the hole stop clicks elsewhere, the hole stays usable. */
.notice #tourAgain {
  margin-left: 8px;
  padding: 0;
}
.tour {
  position: fixed;
  inset: 0;
  z-index: 1000;
  pointer-events: none;
}
.tour-block {
  position: fixed;
  pointer-events: auto;
}
.tour-ring {
  position: fixed;
  border: 2px solid var(--leaf);
  border-radius: 12px;
  box-shadow: 0 0 0 200vmax rgb(20 30 24 / 0.55);
}
.tour-busy .tour-ring {
  opacity: 0.6;
}
.tour-card {
  position: fixed;
  width: min(320px, calc(100vw - 32px));
  padding: 18px 18px 14px;
  background: #fefefa;
  color: var(--ink);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgb(20 30 24 / 0.25);
  pointer-events: auto;
}
.tour-card.tour-docked {
  left: 16px;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  width: min(420px, calc(100vw - 32px));
  margin: 0 auto;
}
.tour-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--leaf);
}
.tour-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.tour-card h2 {
  margin-top: 4px;
  font-size: 18px;
}
.tour-card #tourText {
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
}
.tour-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}
.tour-actions span {
  display: flex;
  gap: 8px;
}
.tour-prev {
  min-height: 42px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  font-weight: 600;
}
.tour-prev[hidden] {
  display: none;
}
@media (prefers-reduced-motion: no-preference) {
  .tour-ring {
    transition:
      left 0.2s ease,
      top 0.2s ease,
      width 0.2s ease,
      height 0.2s ease,
      opacity 0.2s ease;
  }
}
.chat {
  display: grid;
  gap: 12px;
}
.chat h2 {
  margin: 0;
}
.chat .small {
  margin: 0;
}
.chat-log {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: min(60vh, 520px);
  overflow-y: auto;
}
.bubble {
  max-width: 85%;
  margin: 0;
  padding: 10px 14px;
  border-radius: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.bubble.mine {
  align-self: flex-end;
  background: var(--leaf);
  color: #fff;
}
.bubble.coach {
  align-self: flex-start;
  background: #eef1e8;
  color: var(--ink);
}
.bubble.waiting {
  color: var(--muted);
}
.chat-form {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}
.chat-form textarea {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: inherit;
  font: inherit;
  resize: vertical;
}
.chat-form textarea:focus-visible {
  outline: 3px solid #bb7717;
  outline-offset: 2px;
}
