:root {
  color-scheme: light;
  --bg: #f7f4ee;
  --surface: #ffffff;
  --surface-soft: #eef4f1;
  --text: #23302f;
  --muted: #5c6b68;
  --accent: #3f7d6a;
  --accent-deep: #2e5f51;
  --line: #d8ddd6;
  --focus: #b15f37;
  --shadow: 0 18px 45px rgba(42, 55, 52, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(238, 244, 241, 0.85), rgba(247, 244, 238, 0.6)),
    var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

button,
input,
textarea {
  font: inherit;
}

button,
input[type="checkbox"] {
  cursor: pointer;
}

.app-shell {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: 28px 16px 44px;
}

.hero {
  padding: 28px 4px 18px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent-deep);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0;
}

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

h1 {
  margin-bottom: 8px;
  font-size: clamp(2.25rem, 9vw, 4rem);
  line-height: 1.05;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 16px;
  font-size: 1.2rem;
  letter-spacing: 0;
}

.subtitle {
  max-width: 34rem;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.1rem;
}

.panel {
  margin-top: 16px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.date-label,
.quiet-text {
  color: var(--muted);
  font-size: 0.96rem;
}

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

.step-item {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  align-items: center;
  min-height: 58px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.step-item input {
  width: 28px;
  height: 28px;
  accent-color: var(--accent);
}

.step-item span {
  font-size: 1.04rem;
  font-weight: 650;
}

.support-message,
.reminder-message {
  margin: 16px 0 0;
  color: var(--accent-deep);
  font-weight: 700;
}

.reminder-row {
  display: grid;
  gap: 8px;
}

.reminder-row label,
.prompt-label {
  color: var(--muted);
  font-weight: 650;
}

input[type="time"],
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
}

input[type="time"] {
  min-height: 52px;
  padding: 0 14px;
  font-size: 1.1rem;
}

textarea {
  min-height: 118px;
  margin-top: 8px;
  padding: 14px;
  resize: vertical;
}

input:focus-visible,
textarea:focus-visible,
button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.button-row {
  margin-top: 12px;
}

.secondary-button,
.reset-button {
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  font-weight: 750;
}

.secondary-button {
  padding: 0 16px;
  background: var(--accent);
  color: #ffffff;
}

.secondary-button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.week-view {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.week-day {
  display: grid;
  place-items: center;
  min-height: 78px;
  padding: 10px 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.day-name {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.day-symbol {
  margin-top: 4px;
  color: var(--accent-deep);
  font-size: 1.8rem;
  line-height: 1;
}

.history-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.history-list li {
  padding: 12px;
  border-left: 4px solid var(--accent);
  border-radius: 6px;
  background: var(--surface-soft);
}

.history-date {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 750;
}

.empty-history {
  color: var(--muted);
}

.reset-section {
  padding: 20px 0 0;
  text-align: center;
}

.reset-button {
  padding: 0 14px;
  background: transparent;
  color: var(--accent-deep);
  text-decoration: underline;
}

@media (max-width: 520px) {
  .app-shell {
    padding: 18px 12px 36px;
  }

  .hero {
    padding-top: 18px;
  }

  .panel {
    padding: 16px;
  }

  .section-heading {
    display: block;
  }

  .week-view {
    gap: 6px;
  }

  .week-day {
    min-height: 68px;
  }

  .day-symbol {
    font-size: 1.55rem;
  }
}
