:root {
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --paper: #151915;
    --white: #1d231e;
    --ink: #e4e9e2;
    --muted: #a0a89e;
    --line: #303831;
    --green: #9bb19b;
    --green-dark: #c5d5c3;
    --soft-green: #252f26;
  }
  body {
    background: var(--paper);
    color: var(--ink);
  }
  .sidebar {
    background: #1a201b;
    border-color: #2b332c;
  }
  .brand,
  .nav-item,
  .profile strong,
  .habit-title,
  .section-heading h2,
  .view-heading h1,
  .modal-top h2,
  .settings-section h3,
  .field-label {
    color: var(--ink);
  }
  .nav-item {
    color: #b0b8ad;
  }
  .nav-item.active {
    background: #2d392e;
    color: #d7e5d4;
  }
  .nav-icon {
    color: #a5b89f;
  }
  .nav-count {
    background: #718b70;
  }
  .sidebar-divider,
  .sidebar-quote,
  .profile,
  .topbar,
  .filter-row {
    border-color: #303831;
  }
  .sidebar-quote p {
    color: #b8c5b3;
  }
  .quote-caption,
  .workspace-label,
  .sidebar-section-title,
  .breadcrumb,
  .breadcrumb b {
    color: #a0a89e;
  }
  .settings-link,
  .profile-more {
    color: #b5bdb2;
  }
  .week-day {
    color: #a0a89e;
  }
  .week-day.today span:last-child {
    background: #6d876d;
  }
  .week-day.done span:last-child {
    background: #2e3b2f;
    color: #c2d1bd;
  }
  .breadcrumb span {
    color: #697168;
  }
  .icon-button,
  .button-quiet {
    background: #1b211c;
    border-color: #384139;
    color: #c1c9bd;
  }
  .button-dark {
    background: #6c876c;
    color: #fff;
  }
  .button-dark:hover {
    background: #7b987b;
  }
  h1 {
    color: #e4e9e2;
  }
  h1 em {
    color: #a9bba7;
  }
  .greeting-note,
  .summary-copy,
  .summary-copy b,
  .summary-percent,
  .text-button {
    color: #abb3a8;
  }
  .progress-track {
    background: #303831;
  }
  .progress-fill {
    background: #8da58b;
  }
  .summary-dot {
    background: #9eb398;
  }
  .section-heading p,
  .view-heading p {
    color: #a0a89e;
  }
  .heading-count {
    color: #929b90;
  }
  .habit-card,
  .insight-tile,
  .weekly-chart {
    background: #1d231e;
    border-color: #303831;
  }
  .habit-card:hover {
    border-color: #465349;
    box-shadow: 0 4px 14px #0004;
  }
  .habit-card.completed {
    background: #1a201b;
  }
  .check-button {
    background: #1b211c;
    border-color: #566055;
    color: white;
  }
  .completed .check-button {
    background: #718b70;
    border-color: #718b70;
  }
  .completed .habit-title {
    color: #a0a89e;
  }
  .habit-meta,
  .habit-time,
  .schedule-label,
  .card-menu,
  .small-action {
    color: #a0a89e;
  }
  .mark-sage {
    background: #29362a;
    color: #a4c19e;
  }
  .mark-peach {
    background: #3d3027;
    color: #e3ae85;
  }
  .mark-lavender {
    background: #342f40;
    color: #b7a9d4;
  }
  .mark-blue {
    background: #27363d;
    color: #9bc1d2;
  }
  .add-inline,
  .filter-chip {
    background: transparent;
    border-color: #3b443c;
    color: #adb7aa;
  }
  .add-inline:hover,
  .filter-chip.selected {
    background: #283329;
    border-color: #344235;
    color: #c5d5c2;
  }
  .reflection-card {
    background: #232d24;
    color: #d1dbcd;
  }
  .reflection-card p {
    color: #abb5a8;
  }
  .reflection-soft {
    background: #272824;
  }
  .reflection-arrow {
    color: #acb7a8;
  }
  .empty-state p,
  .empty-state h3 {
    color: #c1c9bd;
  }
  .empty-art {
    color: #a9bd9f;
  }
  .insight-label,
  .insight-sub,
  .chart-day,
  .chart-value {
    color: #a0a89e;
  }
  .insight-number {
    color: #a9c1a5;
  }
  .chart-bar {
    background: #344235;
  }
  .chart-bar.today-bar {
    background: #829b80;
  }
  .page-footer {
    color: #a0a89e;
  }
  .modal {
    background: #1c231d;
    color: #e4e9e2;
  }
  .modal::backdrop {
    background: #050805bb;
  }
  .close-button {
    color: #aab3a8;
  }
  .text-input {
    background: #161c17;
    border-color: #3b453d;
    color: #e0e6de;
  }
  .text-input::placeholder {
    color: #778174;
  }
  .text-input:focus {
    border-color: #92a98c;
    box-shadow: 0 0 0 3px #526b5480;
  }
  .field-label {
    color: #c4ccc1;
  }
  .field-label span {
    color: #929b90;
  }
  .weekday-picker label {
    border-color: #3b453d;
    color: #b0b9ad;
  }
  .weekday-picker label:has(input:checked) {
    background: #2e3c2f;
    border-color: #4a634b;
    color: #c6d7c2;
  }
  .settings-section {
    border-color: #303831;
  }
  .settings-section p,
  .setup-details,
  .integration-note {
    color: #adb6aa;
  }
  .integration-note {
    background: #262e27;
  }
  .setup-details summary {
    color: #c1cfbc;
  }
  .setup-details code {
    background: #2d382e;
    color: #d3ddd0;
  }
  .button-outline {
    background: #202821;
    border-color: #465247;
    color: #c0d2bc;
  }
  .button-outline:hover {
    background: #29362b;
  }
  .setting-status {
    color: #a9c7a7;
  }
  .danger-text {
    color: #df9585;
  }
}
