:root {
  --bg: #f6f7f3;
  --surface: #ffffff;
  --surface-soft: #fbfcf9;
  --text: #1f2723;
  --muted: #788079;
  --faint: #a8b0a9;
  --line: #e5e9e3;
  --line-strong: #d7ddd5;
  --accent: #7d986e;
  --accent-deep: #506d4c;
  --accent-soft: #eaf1e6;
  --work: #809bc0;
  --personal: #d59b76;
  --shadow: 0 18px 45px rgba(53, 68, 58, 0.06);
  --radius: 14px;
  font-family: "Avenir Next", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
}

button,
input,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(125, 152, 110, 0.24);
  outline-offset: 2px;
}

.app-shell {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: #f2f4ef;
  padding: 30px 18px 24px;
}

.brand,
.mobile-brand {
  display: flex;
  align-items: center;
  gap: 11px;
}

.brand {
  padding: 0 12px;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  background: var(--accent-deep);
  font-size: 17px;
  font-weight: 700;
  box-shadow: 0 7px 14px rgba(80, 109, 76, 0.18);
}

.brand-name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0;
}

.brand-caption {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.primary-nav {
  display: grid;
  gap: 5px;
  margin-top: 45px;
}

.nav-item,
.category-link {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 10px;
  color: var(--muted);
  background: transparent;
  text-align: left;
  transition: 160ms ease;
}

.nav-item:hover,
.category-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.6);
}

.nav-item.is-active {
  color: var(--accent-deep);
  background: #e6eee2;
  font-weight: 700;
}

.nav-icon {
  width: 17px;
  color: currentColor;
  font-size: 17px;
  line-height: 1;
  text-align: center;
}

.nav-count {
  margin-left: auto;
  color: var(--faint);
  font-size: 12px;
}

.nav-item.is-active .nav-count {
  color: var(--accent-deep);
}

.sidebar-section {
  margin-top: 36px;
}

.sidebar-label {
  margin: 0 12px 11px;
  color: var(--faint);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.category-link {
  min-height: 37px;
  gap: 10px;
  font-size: 13px;
}

.category-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: 0 0 auto;
}

.work-dot {
  background: var(--work);
}

.personal-dot {
  background: var(--personal);
}

.sidebar-footer {
  margin-top: auto;
  padding: 22px 12px 0;
  color: var(--faint);
  font-size: 11px;
  line-height: 1.7;
}

.sidebar-footer p {
  max-width: 110px;
  margin: 0 0 15px;
}

.text-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0;
  color: var(--accent-deep);
  background: transparent;
  font-size: 12px;
  font-weight: 700;
}

.main-content {
  min-width: 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 72px;
  padding: 0 5.3vw;
}

.mobile-brand {
  display: none;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.sync-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.58);
  font-size: 11px;
  white-space: nowrap;
}

.sync-button:hover {
  color: var(--text);
  background: var(--surface);
}

.sync-indicator {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #b8c0b9;
}

.sync-indicator.is-connected {
  background: #6e9b68;
  box-shadow: 0 0 0 3px rgba(110, 155, 104, 0.13);
}

.sync-indicator.is-syncing {
  background: #d39b54;
  animation: sync-pulse 1s ease-in-out infinite alternate;
}

@keyframes sync-pulse {
  to { opacity: 0.45; }
}

.icon-button {
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.58);
  font-size: 18px;
  line-height: 1;
  transition: 160ms ease;
}

.icon-button:hover {
  border-color: var(--line-strong);
  color: var(--text);
  background: var(--surface);
}

.icon-button.small {
  width: 32px;
  height: 32px;
  background: transparent;
  font-size: 22px;
}

.content-wrap {
  width: min(1180px, calc(100% - 10.6vw));
  margin: 0 auto;
  padding: 28px 0 64px;
}

.view-panel {
  display: none;
}

.view-panel.is-visible {
  display: block;
}

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  min-height: 128px;
  padding-bottom: 28px;
}

.eyebrow {
  margin: 0 0 9px;
  color: var(--accent-deep);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 8px;
  font-size: clamp(28px, 3.1vw, 43px);
  letter-spacing: 0;
  line-height: 1.05;
}

h2 {
  margin-bottom: 5px;
  font-size: 17px;
  letter-spacing: 0;
}

.heading-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.date-stepper {
  display: flex;
  align-items: center;
  gap: 3px;
}

.date-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
}

.date-button:hover {
  color: var(--text);
  background: var(--surface);
}

.capture-box {
  padding: 21px 23px 23px;
  border: 1px solid #dce5d9;
  border-radius: var(--radius);
  background: #f1f6ee;
}

.capture-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.capture-title {
  font-size: 13px;
  font-weight: 700;
}

.save-hint {
  color: var(--accent-deep);
  font-size: 11px;
}

.capture-row {
  display: flex;
  gap: 16px;
}

.capture-row > input {
  min-width: 0;
  flex: 1;
  height: 43px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: var(--text);
  background: var(--surface);
  box-shadow: 0 4px 15px rgba(79, 103, 79, 0.05);
}

.capture-row > input::placeholder,
textarea::placeholder {
  color: #b0b9b1;
}

.capture-row > input:focus {
  border-color: #c8d8c2;
  outline: 0;
}

.capture-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.attach-button {
  width: 38px;
  height: 38px;
  font-size: 20px;
}

.photo-attachment {
  display: flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  max-width: 100%;
  margin-top: 12px;
  padding: 6px 10px 6px 6px;
  border: 1px solid #d9e3d6;
  border-radius: 9px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
  font-size: 11px;
}

.photo-attachment[hidden] {
  display: none;
}

.photo-attachment img {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  object-fit: cover;
}

.photo-attachment .note-action {
  margin-left: 4px;
  opacity: 1;
}

.type-segment {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  border: 1px solid #d9e3d6;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.66);
}

.type-option,
.filter-pill,
.range-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 31px;
  padding: 0 10px;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  white-space: nowrap;
}

.type-option.is-active,
.filter-pill.is-active,
.range-button.is-active {
  color: var(--text);
  background: var(--surface);
  box-shadow: 0 2px 7px rgba(64, 82, 65, 0.08);
}

.add-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 38px;
  padding: 0 15px;
  border-radius: 8px;
  color: #fff;
  background: var(--accent-deep);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  transition: 160ms ease;
}

.add-button:hover {
  background: #405b3d;
  transform: translateY(-1px);
}

.today-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 285px;
  gap: 46px;
  padding-top: 45px;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.section-subtitle {
  color: var(--faint);
  font-size: 11px;
}

.filter-pills {
  display: flex;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.45);
}

.filter-pill {
  min-height: 28px;
  padding: 0 8px;
  font-size: 11px;
}

.notes-list {
  min-height: 140px;
}

.note-item {
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr) auto;
  align-items: start;
  gap: 13px;
  padding: 15px 3px 16px;
  border-bottom: 1px solid var(--line);
}

.note-item:first-child {
  border-top: 1px solid var(--line);
}

.note-item.is-completed .note-text {
  color: var(--faint);
  text-decoration: line-through;
}

.note-text {
  margin: -2px 0 6px;
  font-size: 13px;
  line-height: 1.55;
  word-break: break-word;
}

.note-photo {
  display: block;
  width: min(280px, 100%);
  max-height: 260px;
  margin: 8px 0 2px;
  border: 1px solid var(--line);
  border-radius: 8px;
  object-fit: contain;
  object-position: left center;
  background: var(--surface-soft);
}

.note-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--faint);
  font-size: 10px;
}

.note-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.note-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  opacity: 0;
  transition: 160ms ease;
}

.note-item:hover .note-actions,
.note-actions:focus-within {
  opacity: 1;
}

.note-action {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 7px;
  color: var(--faint);
  background: transparent;
  font-size: 15px;
}

.note-action:hover {
  color: var(--text);
  background: var(--surface-soft);
}

.note-action.delete:hover {
  color: #b56f61;
}

.empty-state {
  display: grid;
  min-height: 205px;
  place-items: center;
  padding: 32px;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  color: var(--faint);
  text-align: center;
}

.empty-state strong {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
}

.empty-state p {
  margin: 0;
  font-size: 11px;
}

.daily-summary {
  align-self: start;
  padding: 23px 22px 21px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.summary-kicker {
  color: var(--accent-deep);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.summary-heading h2 {
  margin-top: 7px;
  font-size: 19px;
}

.summary-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 24px;
}

.summary-stat strong {
  display: block;
  margin-bottom: 4px;
  color: var(--accent-deep);
  font-size: 24px;
  line-height: 1;
}

.summary-stat span {
  color: var(--faint);
  font-size: 10px;
}

.summary-divider {
  height: 1px;
  margin: 24px 0 19px;
  background: var(--line);
}

.reflection-label {
  display: block;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

#reflectionInput {
  display: block;
  width: 100%;
  min-height: 88px;
  resize: vertical;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: var(--surface-soft);
  font-size: 12px;
  line-height: 1.6;
}

#reflectionInput:focus {
  border-color: #c4d4bf;
  outline: 0;
}

.reflection-status {
  margin-top: 8px;
  color: var(--faint);
  font-size: 10px;
}

.review-heading {
  min-height: 146px;
}

.review-range {
  display: flex;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.45);
}

.review-overview {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(150px, 1fr) minmax(150px, 1fr);
  gap: 14px;
}

.overview-card {
  min-height: 179px;
  padding: 21px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.overview-main {
  position: relative;
  overflow: hidden;
  background: #f0f5ed;
}

.overview-label {
  display: block;
  margin-bottom: 15px;
  color: var(--muted);
  font-size: 11px;
}

.overview-card strong {
  color: var(--text);
  font-size: 35px;
  line-height: 1;
}

.overview-unit {
  margin-left: 5px;
  color: var(--muted);
  font-size: 12px;
}

.overview-foot {
  display: block;
  margin-top: 25px;
  color: var(--faint);
  font-size: 10px;
}

.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 7px;
  height: 55px;
  margin-top: 22px;
}

.bar-item {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 1;
  height: 100%;
  flex-direction: column;
  gap: 6px;
}

.bar-fill {
  width: 100%;
  min-height: 4px;
  border-radius: 3px 3px 1px 1px;
  background: #9ab492;
}

.bar-fill.is-today {
  background: var(--accent-deep);
}

.bar-label {
  color: var(--faint);
  font-size: 9px;
}

.mini-progress {
  width: 100%;
  height: 5px;
  margin-top: 22px;
  overflow: hidden;
  border-radius: 3px;
  background: var(--line);
}

.mini-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--work);
  transition: width 220ms ease;
}

.history-section {
  margin-top: 46px;
}

.history-list {
  border-top: 1px solid var(--line);
}

.history-day {
  display: grid;
  grid-template-columns: 145px minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  padding: 16px 3px;
  border-bottom: 1px solid var(--line);
}

.history-date strong {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
}

.history-date span {
  color: var(--faint);
  font-size: 10px;
}

.history-preview {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
}

.history-preview span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-count {
  color: var(--faint);
  font-size: 11px;
  white-space: nowrap;
}

.history-empty {
  padding: 39px 0;
  color: var(--faint);
  font-size: 12px;
  text-align: center;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 5;
  max-width: calc(100vw - 44px);
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--text);
  background: var(--surface);
  box-shadow: 0 12px 28px rgba(39, 54, 42, 0.12);
  font-size: 12px;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.cloud-dialog {
  width: min(480px, calc(100vw - 28px));
  max-height: min(88vh, 720px);
  padding: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text);
  background: var(--surface);
  box-shadow: 0 28px 90px rgba(24, 35, 27, 0.24);
}

.cloud-dialog::backdrop {
  background: rgba(22, 30, 24, 0.38);
  backdrop-filter: blur(3px);
}

.cloud-dialog-card {
  padding: 25px;
}

.cloud-dialog-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.cloud-dialog-heading .eyebrow {
  margin-bottom: 6px;
}

.cloud-dialog-heading h2 {
  margin: 0;
  font-size: 21px;
}

.cloud-config-fields,
.cloud-field {
  display: grid;
  gap: 9px;
}

.cloud-config-fields {
  gap: 13px;
}

.cloud-config-fields label,
.cloud-field {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.cloud-config-fields input,
.cloud-field input {
  width: 100%;
  height: 40px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: var(--surface-soft);
  font-size: 12px;
  font-weight: 400;
}

.cloud-config-fields input:focus,
.cloud-field input:focus {
  border-color: #c4d4bf;
  outline: 0;
}

.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: var(--surface);
  font-size: 11px;
  font-weight: 700;
}

.secondary-button:hover {
  border-color: var(--line-strong);
  color: var(--text);
}

.setup-link {
  width: fit-content;
  color: var(--accent-deep);
  font-size: 11px;
  text-decoration: none;
}

.setup-link:hover {
  text-decoration: underline;
}

.cloud-divider {
  height: 1px;
  margin: 20px 0;
  background: var(--line);
}

.cloud-status-copy {
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.cloud-field {
  margin-bottom: 13px;
}

.cloud-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 17px;
}

.cloud-account-panel {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.cloud-account-panel[hidden] {
  display: none;
}

.account-avatar {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 50%;
  color: var(--accent-deep);
  background: var(--accent-soft);
  font-size: 16px;
  font-weight: 700;
}

.account-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.account-copy strong {
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  text-overflow: ellipsis;
}

.account-copy span {
  color: var(--muted);
  font-size: 10px;
}

.cloud-account-panel > .secondary-button,
.cloud-account-panel > .signout-button {
  grid-column: span 2;
  width: 100%;
  margin-top: 5px;
}

.cloud-account-panel > .signout-button {
  justify-content: center;
  min-height: 32px;
  margin-top: 0;
  color: #a16c61;
}

.cloud-footnote {
  margin: 19px 0 0;
  color: var(--faint);
  font-size: 10px;
  line-height: 1.6;
}

body.is-dark {
  --bg: #1c211e;
  --surface: #252c27;
  --surface-soft: #202721;
  --text: #e5ebe4;
  --muted: #a2aea3;
  --faint: #728075;
  --line: #344039;
  --line-strong: #46554a;
  --accent: #9bb690;
  --accent-deep: #a9c39d;
  --accent-soft: #2b392c;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.13);
}

body.is-dark .sidebar {
  background: #202621;
}

body.is-dark .nav-item.is-active {
  color: #c8dfbd;
  background: #2e3b30;
}

body.is-dark .capture-box,
body.is-dark .overview-main {
  border-color: #3d5040;
  background: #263328;
}

body.is-dark .brand-mark {
  color: #253125;
  background: #a9c39d;
}

body.is-dark .icon-button,
body.is-dark .sync-button,
body.is-dark .date-button,
body.is-dark .filter-pills,
body.is-dark .review-range,
body.is-dark .type-segment {
  background: rgba(37, 44, 39, 0.72);
}

body.is-dark .type-option.is-active,
body.is-dark .filter-pill.is-active,
body.is-dark .range-button.is-active {
  background: #323d34;
}

body.is-dark .add-button {
  color: #243025;
  background: #a9c39d;
}

body.is-dark .add-button:hover {
  background: #bed6b2;
}

body.is-dark .photo-attachment {
  border-color: #3d5040;
  background: #29352b;
}

body.is-dark .cloud-dialog {
  color: var(--text);
  background: var(--surface);
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 200px minmax(0, 1fr);
  }

  .content-wrap {
    width: min(100% - 54px, 780px);
  }

  .today-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .daily-summary {
    width: min(100%, 480px);
  }

  .review-overview {
    grid-template-columns: 1.4fr 1fr;
  }

  .overview-card:last-child {
    grid-column: span 2;
    min-height: 130px;
  }
}

@media (max-width: 700px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    display: none;
  }

  .topbar {
    justify-content: space-between;
    min-height: 64px;
    padding: 0 20px;
  }

  .mobile-brand {
    display: flex;
    font-size: 14px;
    font-weight: 700;
  }

  .mobile-brand .brand-mark {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    font-size: 15px;
  }

  .content-wrap {
    width: auto;
    padding: 12px 20px 40px;
  }

  .page-heading {
    display: block;
    min-height: 0;
    padding-bottom: 22px;
  }

  h1 {
    margin-bottom: 10px;
    font-size: 34px;
  }

  .date-stepper {
    justify-content: flex-end;
    margin-top: 17px;
  }

  .capture-box {
    padding: 17px;
  }

  .capture-row {
    display: block;
  }

  .capture-row > input {
    width: 100%;
  }

  .capture-actions {
    justify-content: flex-start;
    margin-top: 11px;
  }

  .capture-actions .type-segment {
    margin-left: auto;
  }

  .today-grid {
    padding-top: 31px;
  }

  .section-heading {
    display: block;
  }

  .filter-pills {
    width: max-content;
    margin-top: 14px;
  }

  .note-actions {
    opacity: 1;
  }

  .daily-summary {
    width: 100%;
  }

  .review-heading {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 17px;
  }

  .review-range {
    align-self: stretch;
    width: max-content;
  }

  .review-overview {
    grid-template-columns: 1fr 1fr;
  }

  .overview-card.overview-main {
    grid-column: span 2;
  }

  .overview-card:last-child {
    grid-column: span 1;
  }

  .history-day {
    grid-template-columns: 1fr auto;
    gap: 8px 14px;
  }

  .history-preview {
    grid-column: span 2;
    grid-row: 2;
  }
}

@media (max-width: 420px) {
  .topbar {
    padding: 0 15px;
  }

  .content-wrap {
    padding-right: 15px;
    padding-left: 15px;
  }

  .capture-actions {
    display: grid;
    grid-template-columns: 38px 1fr auto;
    gap: 7px;
  }

  .type-segment {
    min-width: 0;
    margin-left: 0 !important;
  }

  .type-option {
    flex: 1;
    justify-content: center;
    padding: 0 6px;
  }

  .summary-stats {
    gap: 6px;
  }

  .sync-button {
    gap: 6px;
    padding: 0 8px;
    font-size: 10px;
  }

  .cloud-dialog-card {
    padding: 20px;
  }
}
