:root {
  --bg: #f4efe6;
  --ink: #172127;
  --muted: #5a6872;
  --panel: rgba(255, 252, 247, 0.88);
  --line: rgba(23, 33, 39, 0.08);
  --accent: #177e89;
  --accent-strong: #0e5e6f;
  --success: #1d8f5f;
  --shadow: 0 18px 60px rgba(23, 33, 39, 0.12);
  font-family: "ui-sans-serif", "system-ui", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(243, 177, 74, 0.35), transparent 32%),
    radial-gradient(circle at top right, rgba(59, 150, 171, 0.32), transparent 28%),
    linear-gradient(180deg, #f9f5ed 0%, #ede7dc 100%);
}

button,
input {
  font: inherit;
}

.shell {
  width: min(100%, 42rem);
  margin: 0 auto;
  padding: 1.25rem 1rem 2rem;
}

.hero {
  padding: 1rem 0 1.5rem;
}

.eyebrow,
.panel-kicker,
.habit-meta,
.today-label,
.stat-label {
  color: var(--muted);
  letter-spacing: 0.02em;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(2.3rem, 9vw, 4rem);
  line-height: 0.94;
  margin-top: 0.35rem;
}

.lede {
  margin-top: 0.85rem;
  font-size: 1rem;
  line-height: 1.5;
  max-width: 34rem;
}

.install-button,
.habit-form button,
.check-button,
.delete-button {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}

.install-button,
.habit-form button,
.check-button {
  background: var(--accent);
  color: white;
  padding: 0.85rem 1.1rem;
  font-weight: 700;
}

.install-button {
  margin-top: 1rem;
}

.delete-button {
  background: rgba(23, 33, 39, 0.08);
  color: var(--ink);
  padding: 0.75rem 0.95rem;
}

.panel {
  background: var(--panel);
  backdrop-filter: blur(18px);
  border: 1px solid var(--line);
  border-radius: 1.6rem;
  box-shadow: var(--shadow);
  padding: 1rem;
}

.panel + .panel {
  margin-top: 1rem;
}

.panel-header,
.habit-item,
.stats {
  display: flex;
  gap: 0.9rem;
}

.panel-header,
.habit-item {
  align-items: center;
  justify-content: space-between;
}

.habit-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
  margin-top: 1rem;
}

.habit-form input {
  width: 100%;
  border-radius: 1rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  padding: 0.95rem 1rem;
  color: var(--ink);
}

.habit-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: grid;
  gap: 0.75rem;
}

.habit-item {
  padding: 0.95rem;
  border-radius: 1.15rem;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid var(--line);
}

.habit-copy {
  min-width: 0;
}

.habit-name {
  font-weight: 700;
  font-size: 1rem;
}

.habit-meta {
  margin-top: 0.25rem;
  font-size: 0.92rem;
}

.habit-actions {
  display: flex;
  gap: 0.55rem;
  flex-shrink: 0;
}

.check-button.is-complete {
  background: var(--success);
}

.stats {
  margin-top: 1rem;
}

.stat-card {
  flex: 1;
  border-radius: 1.2rem;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  padding: 1rem;
}

.stat-value {
  margin-top: 0.35rem;
  font-size: 2rem;
  font-weight: 800;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@media (max-width: 640px) {
  .habit-form,
  .stats {
    grid-template-columns: 1fr;
  }

  .habit-item,
  .habit-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .habit-actions {
    width: 100%;
  }

  .habit-actions button {
    width: 100%;
  }
}
