.wellness-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-top: 22px;
}

.wellness-grid > .section {
  height: 100%;
  margin-top: 0;
}

.wellness-tracker {
  padding: 30px;
}

.wellness-tracker > h2 {
  margin: 10px 0 24px;
  font-size: clamp(34px, 5vw, 48px);
}

.wellness-total {
  display: block;
  margin-bottom: 16px;
  color: var(--accent);
  font-size: 23px;
}

.tracker-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.tracker-inputs label,
.steps-row label {
  color: var(--muted);
  font-size: 13px;
}

.tracker-inputs input,
.steps-row input {
  min-height: 66px;
  background: color-mix(in srgb, var(--paper) 92%, var(--soft));
  border-radius: 16px;
  font-size: 27px;
  font-weight: 600;
}

.wearable-panel {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  padding: 17px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
}

.wearable-panel span {
  display: grid;
  gap: 3px;
}

.wearable-panel strong {
  font-size: 16px;
}

.wearable-panel small {
  color: var(--muted);
}

.wearable-panel button {
  min-height: 44px;
  border: 0;
  border-radius: 12px;
  padding: 0 18px;
  background: var(--soft);
  font-weight: 600;
}

.wearable-panel .wearable-sync {
  background: transparent;
  color: var(--accent);
}

.steps-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 20px;
}

.steps-row label {
  margin-bottom: 0;
}

.step-progress {
  display: grid;
  justify-items: end;
  gap: 3px;
  padding-bottom: 13px;
}

.step-progress strong {
  color: var(--accent);
  font: 600 25px "Playfair Display";
}

.step-progress span {
  color: var(--muted);
  font-size: 12px;
}

.activity-meter {
  margin: 18px 0 22px;
}

.workout-check {
  display: flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  margin: 0;
  font-size: 17px;
}

.workout-check input {
  width: 24px;
  height: 24px;
  margin: 0;
  accent-color: var(--accent);
}

.mood-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.mood-options button {
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--paper) 92%, var(--soft));
  font-weight: 600;
}

.mood-options button.active {
  border-color: var(--accent);
  background: var(--accent);
  color: white;
}

.mood-options button:last-child {
  grid-column: 1 / -1;
}

.mood-question {
  margin: -12px 0 20px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.mood-note-field {
  margin-top: 18px;
  color: var(--muted);
}

.mood-note-field textarea {
  resize: vertical;
  background: color-mix(in srgb, var(--paper) 92%, var(--soft));
}

.daily-history .section-title {
  margin-bottom: 18px;
}

.history-list {
  display: grid;
  gap: 12px;
}

.history-day {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
}

.history-date {
  display: grid;
  align-content: start;
  gap: 4px;
}

.history-date strong {
  font: 600 21px "Playfair Display";
}

.history-date span,
.history-empty {
  color: var(--muted);
  font-size: 13px;
}

.history-day dl {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.history-day dl div {
  display: grid;
  gap: 4px;
}

.history-day dt {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.history-day dd {
  margin: 0;
  font-weight: 600;
}

.history-day > p {
  grid-column: 2;
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 13px;
}

html[data-theme="midnight"] .tracker-inputs input,
html[data-theme="midnight"] .steps-row input {
  color: var(--ink);
}

@media (max-width: 900px) {
  .wellness-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 580px) {
  .wellness-tracker {
    padding: 24px 20px;
  }

  .wearable-panel {
    grid-template-columns: 1fr auto;
  }

  .wearable-panel .wearable-sync {
    grid-column: 1 / -1;
    min-height: 32px;
    padding: 0;
    text-align: left;
  }

  .steps-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .step-progress {
    grid-template-columns: auto 1fr;
    justify-items: start;
    align-items: baseline;
    gap: 7px;
    padding: 10px 0 0;
  }

  .history-day {
    grid-template-columns: 1fr;
  }

  .history-day dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .history-day > p {
    grid-column: 1;
  }
}
