:root {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", sans-serif;
  color: #292b38;
  background: #f7f8fa;
  font-size: 14px;
  font-synthesis: none;
  --green: #6656cd;
  --muted: #757887;
  --line: #e8e9ef;
  --soft: #f1effa;
  --gold: #aa7835;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  border: 0;
  background: transparent;
  color: inherit;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
button:focus-visible,
a:focus-visible {
  outline: 2px solid #8874dd;
  outline-offset: 4px;
}
a {
  color: var(--green);
  text-underline-offset: 3px;
}
svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.layout {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  min-height: 100dvh;
}
.sidebar {
  border-right: 1px solid var(--line);
  padding: 32px 20px;
  position: fixed;
  inset: 0 auto 0 0;
  width: 190px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 42px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  letter-spacing: -0.6px;
  font-size: 24px;
  font-weight: 700;
}
.brand img {
  height: 34px;
  width: 34px;
}
.brand small {
  font-size: 10px;
  letter-spacing: 0.3px;
  display: block;
  font-weight: 400;
  margin-top: 4px;
}
.nav {
  display: grid;
  gap: 9px;
}
.nav button {
  display: flex;
  align-items: center;
  gap: 13px;
  text-align: left;
  padding: 13px 15px;
  border-radius: 10px;
  color: #757887;
}
.nav button.active {
  background: #eeebfc;
  color: var(--green);
  font-weight: 600;
}
.nav button:hover {
  background: #f5f3fd;
}
.sidebar-bottom {
  margin-top: auto;
  font-size: 12px;
  color: var(--muted);
  line-height: 2;
}
.dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #6c946d;
  margin-right: 7px;
}
.dot.wait {
  background: #bd9d61;
}
.main {
  grid-column: 2;
  max-width: 1500px;
  padding: 28px 40px 190px;
  min-width: 0;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding-bottom: 20px;
  margin-bottom: 30px;
  font-size: 12px;
  letter-spacing: 0.6px;
  color: var(--muted);
}
.topbar .place {
  color: #747786;
}
.mobile-brand {
  display: none;
}
.workspace {
  display: grid;
  grid-template-columns: minmax(0, 760px) 240px;
  gap: 32px;
  justify-content: center;
}
.content {
  min-width: 0;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 2.4px;
  color: #888c9a;
  text-transform: uppercase;
  margin: 10px 0 13px;
}
h1 {
  font-size: 28px;
  font-weight: 650;
  letter-spacing: -0.8px;
  line-height: 1.5;
  margin: 0 0 8px;
  font-family: inherit;
}
h2 {
  font-size: 19px;
  letter-spacing: 0.3px;
  font-weight: 550;
  margin: 0;
}
h3 {
  font-size: 14px;
  font-weight: 550;
  margin: 0;
}
.subtitle {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
  margin: 0 0 28px;
}
.connection-note {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  padding: 13px 15px;
  border: 1px solid #e9dfc8;
  background: #f7f3e8;
  border-radius: 10px;
  line-height: 1.7;
  color: #8a7549;
  margin: 24px 0;
}
.connection-note button {
  margin-left: auto;
  white-space: nowrap;
  font-size: 12px;
  text-decoration: underline;
}
.empty {
  margin: 42px 0 25px;
  padding: 34px 24px;
  border: 1px dashed #dedde9;
  border-radius: 14px;
  text-align: center;
  background: #fafafd;
}
.empty-symbol {
  margin: 0 auto 19px;
  width: 60px;
  height: 60px;
  background: #eeebfa;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #7965c8;
}
.empty-symbol svg {
  width: 28px;
  height: 28px;
}
.empty p {
  font-size: 13px;
  line-height: 1.9;
  color: var(--muted);
  margin: 12px 0 24px;
}
.chips {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}
.chip {
  font-size: 12px;
  padding: 9px 12px;
  border: 1px solid #dedde9;
  background: #ffffff;
  border-radius: 8px;
  color: #777183;
}
.stream-days {
  display: grid;
  gap: 30px;
}
.stream-date {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0 0 15px;
  font-size: 14px;
  font-weight: 600;
  color: #56546a;
}
.stream-date small {
  color: #9697a4;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0;
}
.stream-date::after {
  content: "";
  height: 1px;
  background: #e6e6ef;
  flex: 1;
  align-self: center;
  margin-left: 6px;
}
.stream-footer {
  min-height: 70px;
  display: grid;
  place-items: center;
  color: #a1a2af;
  font-size: 11px;
  padding: 12px 0;
}
.stream-footer .readmore {
  margin: 0;
  color: #82749f;
  padding: 12px 20px;
}
.stream {
  display: grid;
  gap: 15px;
}
.entry {
  background: #ffffff;
  border: 1px solid #e8e9ef;
  border-radius: 13px;
  padding: 18px 20px;
  box-shadow: 0 2px 4px #292b3802;
  scroll-margin: 30px;
}
.entry-top {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: #8b8e9c;
  margin-bottom: 12px;
}
.entry-top .status {
  margin-left: auto;
  color: #858998;
  letter-spacing: 0;
}
.status.failed,
.status.waiting {
  color: #a28045;
}
.original {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.8;
  font-size: 14px;
  margin: 0;
}
.photo-grid {
  display: flex;
  gap: 8px;
  margin: 12px 0;
  flex-wrap: wrap;
}
.photo-grid img {
  width: 112px;
  height: 112px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
}
.event-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 13px;
}
.event-pill {
  font-size: 11px;
  background: #f3f0fa;
  border: 1px solid #e9e4f5;
  padding: 6px 9px;
  border-radius: 6px;
  color: #696179;
}
.event-pill.expense {
  background: #f5efdf;
  color: #9b7b41;
  border-color: #efe5ce;
}
.event-pill.water {
  background: #eaf1ef;
  color: #56847d;
}
.event-pill:hover {
  filter: brightness(0.96);
}
.answer {
  font-size: 13px;
  line-height: 1.9;
  white-space: pre-wrap;
  border-top: 1px solid #eef0e9;
  margin-top: 14px;
  padding-top: 13px;
  color: #666b7b;
  overflow-wrap: anywhere;
}
.entry-actions {
  display: flex;
  gap: 15px;
  margin-top: 13px;
  font-size: 11px;
  color: #8b8e9c;
}
.entry-actions button {
  padding: 2px 0;
  display: flex;
  align-items: center;
  gap: 4px;
}
.entry-actions button:hover {
  color: #6656cd;
}
.entry-actions svg {
  height: 13px;
  width: 13px;
}
.entry-actions .danger {
  margin-left: auto;
}
.aside {
  padding-top: 13px;
}
.aside-title {
  font-size: 10px;
  letter-spacing: 2px;
  color: #95a08c;
  margin-bottom: 20px;
}
.today-card {
  border: 1px solid #e8e9ef;
  background: #f4f3fa;
  border-radius: 12px;
  padding: 22px;
}
.today-date {
  color: #777a89;
  font-size: 12px;
}
.today-caption {
  margin-top: 20px;
  font-size: 11px;
  color: #9295a3;
  line-height: 1.9;
}
.mini-stats {
  margin-top: 14px;
  border-top: 1px solid #e8e9ef;
}
.mini-stat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 17px;
  font-size: 12px;
  color: #777a89;
}
.mini-stat strong {
  text-align: right;
  color: #3a3b4d;
  font-size: 14px;
  font-weight: 500;
}
.mini-stat strong small {
  display: block;
  font-size: 10px;
  font-weight: 400;
  color: var(--muted);
  margin-top: 4px;
}
.aside-note {
  padding: 24px 6px;
  color: #8e9786;
  font-size: 12px;
  line-height: 2.1;
}
.aside-note em {
  font-style: normal;
  color: #607656;
}
.leaf-rule {
  height: 1px;
  background: var(--line);
  margin: 24px 0 16px;
}
.composer-wrap {
  position: fixed;
  bottom: 0;
  left: 190px;
  right: 0;
  z-index: 5;
  padding: 20px 48px 22px;
  background: linear-gradient(0deg, #f7f8fa 80%, #f6f6f100);
  display: flex;
  justify-content: center;
}
.composer-position {
  width: 100%;
  max-width: 1032px;
  padding-right: 272px;
}
.composer {
  padding: 13px 15px 10px;
  background: #ffffff;
  border: 1px solid #dcdde7;
  border-radius: 14px;
  box-shadow: 0 8px 26px #292b3809;
}
.composer:focus-within {
  border-color: #9e91e6;
}
.composer textarea {
  width: 100%;
  border: 0;
  background: transparent;
  outline: 0;
  resize: none;
  min-height: 48px;
  max-height: 180px;
  font-size: 14px;
  line-height: 1.8;
  color: #292b38;
  padding: 2px;
}
.composer textarea::placeholder {
  color: #9699a6;
}
.composer-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.tools-left {
  display: flex;
  align-items: center;
  gap: 13px;
  color: #8a839d;
}
.icon-btn {
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}
.icon-btn:hover {
  background: #f0edf9;
}
.composer-hint {
  font-size: 10px;
  color: #888c9b;
}
.send {
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 8px;
  background: #6656cd;
  color: #fff;
  padding: 10px 16px;
  font-size: 12px;
}
.send svg {
  width: 14px;
  height: 14px;
}
.reply-banner {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 11px;
  background: #f4f3fa;
  padding: 8px 10px;
  border-radius: 6px;
  margin-bottom: 7px;
  color: #6d805e;
}
.draft-images {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
.draft-image {
  position: relative;
  margin-bottom: 10px;
}
.draft-image img {
  height: 48px;
  width: 48px;
  object-fit: cover;
  border-radius: 6px;
}
.draft-image button {
  position: absolute;
  top: -5px;
  right: -5px;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  background: #3a5544;
  color: #fff;
  font-size: 12px;
}
.bottom-caption {
  text-align: center;
  font-size: 10px;
  color: #9da0ad;
  padding-top: 10px;
  letter-spacing: 0.5px;
}

/* Daily review: compact overview, followed by source-linked daily records. */
.topbar-divider {
  margin: 0 12px;
  color: #c6c7d0;
}
#page-name {
  color: #393b49;
  font-weight: 500;
}
.review-workspace {
  grid-template-columns: minmax(0, 1080px);
}
.review-workspace .aside {
  display: none;
}
.review-main {
  padding-bottom: 60px;
}
.review-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}
.review-heading h1 {
  margin-bottom: 4px;
}
.review-heading .subtitle {
  margin: 0;
}
.new-record {
  flex-shrink: 0;
  border-radius: 10px;
  padding: 11px 16px;
}
.new-record svg {
  width: 16px;
  height: 16px;
}
.date-panel {
  margin-bottom: 20px;
}
.review-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 15px;
}
.review-date-title {
  display: flex;
  align-items: center;
  gap: 10px;
}
.review-date-title h2 {
  font-size: 18px;
  letter-spacing: -0.4px;
  white-space: nowrap;
}
.review-date-title h2 > span {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
  margin-left: 10px;
}
.today-tag {
  color: #7362ba;
  background: #eeebfa;
  font-size: 10px;
  padding: 4px 7px;
  border-radius: 5px;
}
.date-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}
.date-actions .icon-btn {
  width: 28px;
  height: 32px;
  color: #777b8a;
}
.date-actions svg {
  width: 15px;
  height: 15px;
}
.previous-day svg {
  transform: rotate(180deg);
}
.date-control {
  width: 128px;
  border: 1px solid #e0e2e9;
  background: #fff;
  border-radius: 8px;
  padding: 8px;
  color: #626675;
  font-size: 11px;
}
.today-button {
  padding: 8px;
  font-size: 11px;
  color: var(--green);
}
.week-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.week-day {
  border-radius: 9px;
  padding: 9px 4px 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  position: relative;
  min-height: 48px;
}
.week-day > span {
  font-size: 11px;
  color: #8a8e9c;
}
.week-day > strong {
  font-size: 18px;
  font-weight: 550;
  font-variant-numeric: tabular-nums;
}
.week-day:hover {
  background: #f6f5fb;
}
.week-day.selected {
  background: #6b5bd0;
  color: #fff;
  box-shadow: 0 3px 8px #6b5bd020;
}
.week-day.selected > span {
  color: #ded8ff;
}
.week-day.is-today i {
  position: absolute;
  bottom: 4px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #8b79df;
}
.week-day.selected i {
  background: #fff;
}
.stats-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 14px;
  margin-bottom: 28px;
}
.stat-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 20px 16px;
  background: #fff;
}
.stat-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: #616373;
  font-weight: 500;
}
.stat-symbol {
  width: 29px;
  height: 29px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: #f4f1fb;
  color: #8a71c0;
}
.stat-symbol svg {
  width: 16px;
  height: 16px;
}
.stat-calories {
  background: #efedfb;
  border-color: #e5dff8;
}
.stat-calories .stat-symbol {
  background: #e2ddf6;
  color: #8170bc;
}
.stat-water .stat-symbol {
  background: #eaf3fc;
  color: #698cb6;
}
.stat-value {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 5px;
  font-size: clamp(25px, 2.4vw, 34px);
  margin: 10px 0 5px;
  font-weight: 650;
  letter-spacing: -1px;
  font-variant-numeric: tabular-nums;
  color: #303142;
  overflow-wrap: anywhere;
}
.stat-calories .stat-value {
  color: #514287;
  font-size: clamp(24px, 2.3vw, 32px);
}
.stat-prefix {
  font-size: 11px;
  font-weight: 400;
  color: #878095;
  letter-spacing: 0;
}
.stat-foot {
  font-size: 11px;
  color: #858697;
  line-height: 1.65;
  min-height: 18px;
}
.day-records {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}
.records-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 22px 24px 16px;
}
.records-heading h2 {
  font-size: 16px;
  font-weight: 600;
}
.records-heading > span {
  font-size: 11px;
  color: #9295a2;
}
.records-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 24px 16px;
  border-bottom: 1px solid #f0f1f5;
}
.review-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.review-filters button {
  padding: 7px 12px;
  border-radius: 7px;
  font-size: 12px;
  color: #8a8d9b;
}
.review-filters button:hover {
  background: #f7f6fc;
}
.review-filters button.active {
  background: #eeebfa;
  color: #6a55bd;
  font-weight: 550;
}
.day-timeline {
  padding: 0 24px;
}
.day-entry + .day-entry {
  border-top: 1px solid #eeeff4;
}
.day-entry > summary {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px 0;
  cursor: pointer;
  list-style: none;
}
.day-entry > summary::-webkit-details-marker {
  display: none;
}
.day-entry > summary:hover .day-entry-title {
  color: #6753be;
}
.entry-visual {
  width: 92px;
  height: 92px;
  border-radius: 12px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: #f1eff9;
  color: #9b89b5;
  position: relative;
  overflow: hidden;
}
.entry-visual > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.entry-visual > svg {
  width: 30px;
  height: 30px;
  stroke-width: 1.3;
}
.entry-visual.water {
  background: #edf5fc;
  color: #83a3c4;
}
.entry-visual.expense {
  background: #fff4e8;
  color: #bf9c6b;
}
.photo-count {
  position: absolute;
  right: 5px;
  bottom: 5px;
  background: #252631a3;
  color: #fff;
  font-size: 9px;
  padding: 2px 5px;
  border-radius: 4px;
}
.day-entry-content {
  min-width: 0;
  flex: 1;
}
.day-entry-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #989aa8;
  font-size: 10px;
  margin-bottom: 5px;
}
.day-entry-meta > span + span::before {
  content: "·";
  margin-right: 10px;
  color: #b6b8c2;
}
.day-entry-title {
  display: block;
  color: #333644;
  font-size: 15px;
  font-weight: 550;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.day-entry-description {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 12px;
  color: #828693;
  line-height: 1.7;
  margin-top: 2px;
}
.entry-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 14px;
  margin-top: 9px;
}
.entry-metric {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #7c6b9d;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.entry-metric.water {
  color: #6588ac;
}
.entry-metric.expense {
  color: #9b815e;
}
.entry-metric svg {
  width: 12px;
  height: 12px;
}
.item-chevron {
  display: flex;
  color: #b2b4bf;
  transition: transform 150ms ease;
  flex-shrink: 0;
}
.item-chevron svg {
  width: 14px;
  height: 14px;
}
.day-entry[open] > summary .item-chevron,
.review-item[open] > summary .item-chevron,
.review-originals[open] > summary .item-chevron {
  transform: rotate(90deg);
}
.day-entry[open] > summary .day-entry-description {
  -webkit-line-clamp: unset;
}
.day-entry-details {
  padding: 0 0 20px 110px;
}
.day-entry-details > .photo-grid {
  margin: 0 0 15px;
}
.review-item {
  border-top: 1px solid #eeeff4;
}
.review-item > summary {
  display: flex;
  align-items: center;
  gap: 12px;
  list-style: none;
  cursor: pointer;
  padding: 14px 0;
}
.review-item > summary::-webkit-details-marker {
  display: none;
}
.review-item-title {
  flex: 1;
  min-width: 0;
}
.item-title {
  display: block;
  font-size: 12px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.item-category {
  display: block;
  color: #9395a3;
  font-size: 10px;
  margin-bottom: 3px;
}
.review-item-value {
  color: #68607d;
  font-size: 12px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.item-detail {
  padding: 0 0 18px;
  font-size: 12px;
  line-height: 1.85;
  color: #7b7e8c;
  overflow-wrap: anywhere;
}
.item-detail p {
  margin: 0 0 10px;
  white-space: pre-wrap;
}
.estimate-basis {
  background: #f8f7fc;
  padding: 12px 14px;
  border-radius: 8px;
  margin: 12px 0;
}
.estimate-basis > span {
  display: block;
  color: #77658f;
  font-size: 11px;
  margin-bottom: 4px;
}
.estimate-basis p {
  margin: 0;
}
.item-actions {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.item-actions button {
  color: #7e6eab;
  font-size: 11px;
  padding: 2px 0;
}
.review-originals {
  margin-top: 18px;
  border: 1px solid var(--line);
  padding: 0 20px;
  border-radius: 12px;
  background: #fff;
}
.review-originals > summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 0;
  list-style: none;
  cursor: pointer;
  font-size: 12px;
  color: #808391;
}
.review-originals > summary::-webkit-details-marker {
  display: none;
}
.review-originals > summary > svg {
  width: 16px;
  height: 16px;
}
.review-originals .item-chevron {
  margin-left: auto;
}
.section-count {
  font-size: 10px;
  color: #a0a2ae;
}
.review-updated {
  color: #a0a3ae;
  font-size: 10px;
  text-align: right;
  margin-top: 14px;
}
.day-records .empty {
  border: 0;
  margin: 0;
  padding: 36px 12px;
  background: transparent;
}
summary:focus-visible {
  outline: 2px solid #9883df;
  outline-offset: 3px;
  border-radius: 6px;
}
.aside-title,
.aside-note {
  display: none;
}
.aside {
  padding-top: 0;
}
.page-intro .subtitle {
  margin-bottom: 26px;
}
.record-row {
  padding: 14px 0;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  font-size: 13px;
  line-height: 1.7;
}
.record-row > div {
  min-width: 0;
  overflow-wrap: anywhere;
}
.record-row small {
  display: block;
  font-size: 11px;
  color: #8b8d9b;
  margin-top: 3px;
}
.record-row button {
  font-size: 11px;
  color: #7562b7;
  white-space: nowrap;
}
.setting-card {
  border: 1px solid #e8e9ef;
  border-radius: 12px;
  padding: 22px;
  background: #ffffff;
  margin: 18px 0;
}
.setting-card h3 {
  margin-bottom: 15px;
  font-size: 14px;
}
.setting-card p {
  font-size: 12px;
  color: #747786;
  line-height: 1.9;
}
.fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}
.field {
  display: grid;
  gap: 7px;
  margin-bottom: 15px;
}
.field label {
  font-size: 11px;
  color: #747786;
}
.field input,
.field select,
.field textarea {
  padding: 10px 11px;
  width: 100%;
  border-radius: 7px;
  border: 1px solid #dedfe8;
  background: #fafafd;
  outline: 0;
  color: #343644;
}
.field input:focus,
.field textarea:focus {
  border-color: #9e91e6;
}
.field textarea {
  min-height: 90px;
  resize: vertical;
}
.button {
  padding: 10px 15px;
  border-radius: 7px;
  border: 1px solid #dddce9;
  background: #f5f4fc;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
}
.button.primary {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}
.button.danger {
  color: #a16c58;
  border-color: #e4d6cb;
  background: #fcf8f3;
}
.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.setting-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  gap: 12px;
  margin: 13px 0;
}
.hint {
  font-size: 11px;
  color: #818491;
  line-height: 1.8;
}
.muted {
  color: var(--muted);
}
.hidden {
  display: none !important;
}
#toast {
  position: fixed;
  bottom: 185px;
  left: 50%;
  transform: translateX(-50%);
  padding: 11px 18px;
  background: #6656cd;
  color: #fff;
  border-radius: 9px;
  font-size: 12px;
  z-index: 100;
  max-width: 90vw;
  box-shadow: 0 5px 20px #0002;
  display: none;
}
dialog {
  border: 1px solid #e2e1ec;
  border-radius: 14px;
  padding: 26px;
  background: #ffffff;
  color: #292b38;
  width: 440px;
  max-width: calc(100vw - 32px);
  box-shadow: 0 20px 80px #18392020;
}
dialog::backdrop {
  background: #263e3540;
  backdrop-filter: blur(3px);
}
dialog h2 {
  margin-bottom: 20px;
}
dialog p {
  font-size: 13px;
  line-height: 1.9;
  color: #747786;
}
dialog .actions {
  justify-content: flex-end;
  margin-top: 21px;
}
.loading {
  min-height: 100vh;
  display: grid;
  place-items: center;
  color: #84917a;
  font-size: 13px;
}
.login {
  max-width: 380px;
  margin: 15vh auto;
  padding: 25px;
}
.login .brand {
  margin-bottom: 35px;
}
.error-line {
  font-size: 12px;
  color: #a7714d;
  line-height: 1.8;
}
.readmore {
  display: block;
  margin: 20px auto;
  color: #859779;
  font-size: 12px;
}
.source-highlight {
  outline: 2px solid #a4b785;
}
.operation-link {
  display: inline-block;
  margin-top: 8px;
  font-size: 11px;
}
.badge {
  font-size: 10px;
  padding: 4px 7px;
  background: #edf1e5;
  border-radius: 4px;
  color: #839676;
}
.small-logo {
  width: 26px;
  height: 26px;
}
.source-links {
  font-size: 11px;
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  padding-top: 10px;
}
.source-links button {
  color: #6a865d;
  text-decoration: underline;
}
.busy-dot {
  animation: pulse 1.5s infinite;
}
@keyframes pulse {
  50% {
    opacity: 0.35;
  }
}
@media (min-width: 1500px) {
  .main {
    padding-left: 70px;
    padding-right: 70px;
  }
}
@media (max-width: 1150px) {
  .workspace {
    grid-template-columns: minmax(0, 720px);
    gap: 0;
  }
  .aside {
    display: none;
  }
  .composer-position {
    max-width: 720px;
    padding: 0;
  }
  .main {
    padding-left: 35px;
    padding-right: 35px;
  }
  .composer-wrap {
    padding-left: 35px;
    padding-right: 35px;
  }
}
@media (max-width: 760px) {
  .layout {
    display: block;
  }
  .sidebar {
    inset: auto 0 0;
    width: 100%;
    height: 67px;
    padding: 0 14px;
    padding-bottom: env(safe-area-inset-bottom);
    border-right: 0;
    border-top: 1px solid #e8e9ef;
    z-index: 9;
    background: #ffffff;
  }
  .sidebar .brand,
  .sidebar-bottom {
    display: none;
  }
  .nav {
    display: flex;
    justify-content: space-around;
    gap: 0;
    height: 100%;
  }
  .nav button {
    flex-direction: column;
    gap: 5px;
    font-size: 10px;
    border-radius: 0;
    padding: 10px 30px 6px;
  }
  .nav button.active {
    background: transparent;
    color: #6656cd;
  }
  .nav svg {
    width: 19px;
    height: 19px;
  }
  .main {
    padding: 20px 20px 230px;
  }
  .topbar {
    margin-bottom: 24px;
    padding-bottom: 17px;
    font-size: 10px;
  }
  .topbar .place {
    display: none;
  }
  .mobile-brand {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 17px;
    letter-spacing: -0.4px;
    font-weight: 600;
    color: #393549;
  }
  .mobile-brand img {
    height: 24px;
    width: 24px;
  }
  h1 {
    font-size: 25px;
  }
  .subtitle {
    font-size: 12px;
  }
  .eyebrow {
    font-size: 10px;
    margin-top: 0;
  }
  .composer-wrap {
    bottom: 67px;
    left: 0;
    padding: 18px 15px 10px;
  }
  .composer {
    padding: 11px 12px 9px;
  }
  .composer textarea {
    font-size: 14px;
    min-height: 40px;
  }
  .bottom-caption {
    display: none;
  }
  .composer-hint {
    font-size: 9px;
  }
  .connection-note {
    font-size: 11px;
    margin: 18px 0;
  }
  .empty {
    padding: 28px 15px;
    margin-top: 27px;
  }
  .empty p {
    font-size: 12px;
  }
  .entry {
    padding: 15px;
  }
  .entry-actions {
    gap: 13px;
  }
  .stats-grid {
    gap: 7px;
  }
  .stat-card {
    padding: 15px 11px;
  }
  .stat-value {
    font-size: 23px;
  }
  .review-main {
    padding-bottom: 100px;
  }
  .review-intro {
    margin-bottom: 24px;
  }
  .stat-label {
    font-size: 10px;
  }
  .fields {
    grid-template-columns: 1fr;
  }
  .setting-card {
    padding: 18px;
  }
  .review-top {
    gap: 10px;
  }
  .date-control {
    max-width: 150px;
  }
  .photo-grid img {
    width: 90px;
    height: 90px;
  }
  #toast {
    bottom: 235px;
    left: 50%;
    width: max-content;
  }
  .login {
    margin: 10vh 18px;
    max-width: none;
  }
  .topbar-date {
    font-size: 10px;
  }
}
.field label:has(input[type="checkbox"]) {
  display: flex;
  align-items: center;
  gap: 8px;
}
.field input[type="checkbox"] {
  width: auto;
  margin: 0;
}
#beverage-filter {
  margin-left: auto;
  max-width: 55%;
  padding: 5px 8px;
  border: 1px solid var(--line, #d8ded1);
  border-radius: 6px;
  background: transparent;
  font-size: 12px;
}

@media (min-width: 761px) and (max-width: 1100px) {
  .layout {
    grid-template-columns: 84px minmax(0, 1fr);
  }
  .sidebar {
    width: 84px;
    padding: 27px 12px;
    align-items: center;
  }
  .sidebar .brand {
    gap: 0;
  }
  .sidebar .brand > div,
  .sidebar-bottom {
    display: none;
  }
  .nav {
    width: 100%;
    gap: 14px;
  }
  .nav button {
    flex-direction: column;
    justify-content: center;
    gap: 7px;
    padding: 12px 4px;
    font-size: 10px;
  }
  .main {
    padding: 26px 28px 190px;
  }
  .main.review-main {
    padding-bottom: 45px;
  }
  .composer-wrap {
    left: 84px;
    padding-left: 28px;
    padding-right: 28px;
  }
}
@media (max-width: 760px) {
  .main {
    padding: 20px 18px 240px;
  }
  .main.review-main {
    padding-bottom: 100px;
  }
  .sidebar {
    background: #fff;
    height: calc(67px + env(safe-area-inset-bottom));
  }
  .nav button.active {
    color: #6b5bd0;
  }
  .nav button {
    min-width: 76px;
    padding-left: 16px;
    padding-right: 16px;
  }
  .topbar {
    margin-bottom: 24px;
    padding-bottom: 17px;
  }
  .mobile-brand {
    color: #343342;
  }
  .review-heading {
    margin-bottom: 24px;
  }
  .review-heading h1 {
    font-size: 24px;
  }
  .review-heading .subtitle {
    font-size: 12px;
  }
  .review-heading .new-record {
    padding: 9px 12px;
    font-size: 11px;
  }
  .review-top {
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
  }
  .review-date-title h2 {
    font-size: 16px;
  }
  .review-date-title h2 > span {
    font-size: 11px;
    margin-left: 8px;
  }
  .date-control {
    width: 119px;
    padding: 7px;
  }
  .date-actions {
    gap: 0;
  }
  .date-actions .icon-btn {
    width: 24px;
  }
  .week-strip {
    gap: 3px;
    padding: 5px;
  }
  .week-day {
    flex-direction: column;
    gap: 4px;
    padding: 8px 2px 10px;
    min-height: 60px;
  }
  .week-day > strong {
    font-size: 17px;
  }
  .stats-grid {
    gap: 9px;
    margin-bottom: 24px;
  }
  .stat-card {
    padding: 14px 13px;
    border-radius: 12px;
  }
  .stat-label {
    font-size: 11px;
  }
  .stat-symbol {
    width: 24px;
    height: 24px;
  }
  .stat-value,
  .stat-calories .stat-value {
    font-size: 23px;
  }
  .records-heading {
    padding: 19px 16px 13px;
  }
  .records-heading h2 {
    font-size: 15px;
  }
  .records-heading > span {
    font-size: 10px;
  }
  .records-toolbar {
    padding: 0 16px 13px;
    flex-wrap: wrap;
  }
  .review-filters {
    gap: 3px;
  }
  .review-filters button {
    padding: 6px 10px;
    font-size: 11px;
  }
  .day-timeline {
    padding: 0 16px;
  }
  .day-entry > summary {
    gap: 12px;
    padding: 18px 0;
  }
  .entry-visual {
    width: 68px;
    height: 76px;
    border-radius: 10px;
  }
  .day-entry-title {
    font-size: 14px;
  }
  .day-entry-description {
    font-size: 11px;
  }
  .entry-metrics {
    gap: 5px 10px;
    margin-top: 7px;
  }
  .entry-metric {
    font-size: 10px;
  }
  .day-entry-meta {
    font-size: 9px;
  }
  .day-entry-details {
    padding-left: 0;
  }
  .review-item > summary {
    flex-wrap: wrap;
  }
  .review-item-title {
    flex-basis: 65%;
  }
  .review-originals {
    padding: 0 16px;
  }
  .composer-wrap {
    bottom: calc(67px + env(safe-area-inset-bottom));
  }
  .entry-actions {
    flex-wrap: wrap;
  }
}
@media (max-width: 520px) {
  .review-date-title h2 > span {
    display: none;
  }
  .today-tag {
    display: none;
  }
  .stats-grid {
    grid-template-columns: 1fr 1fr;
    border: 0;
    border-radius: 0;
    overflow: visible;
  }
  .stat-calories {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    column-gap: 12px;
    padding: 16px;
  }
  .stat-calories .stat-label {
    grid-column: 1;
    grid-row: 1;
    justify-content: flex-start;
    flex-direction: row;
  }
  .stat-calories .stat-value {
    grid-column: 2;
    grid-row: 1 / span 2;
    font-size: 27px;
    margin: 0;
    justify-content: flex-end;
  }
  .stat-calories .stat-foot {
    grid-column: 1;
    grid-row: 2;
    margin-left: 0;
  }
  .stat-expense,
  .stat-water {
    padding: 13px 16px;
  }
  .stat-value {
    margin-top: 5px;
    font-size: 25px;
  }
  .day-entry > summary > .item-chevron {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

.mixed-record-lines {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}
.mixed-record-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  font-size: 12px;
  color: #737383;
}
.mixed-record-line > span {
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.mixed-record-line > strong {
  white-space: nowrap;
  font-size: 11px;
  font-weight: 500;
  color: #75688e;
}
@media (max-width: 520px) {
  .mixed-record-line {
    flex-wrap: wrap;
    gap: 0 8px;
    font-size: 11px;
  }
  .mixed-record-line > strong {
    font-size: 10px;
  }
}
