:root {
  --green: #4caf50;
  --yellow: #f2c94c;
  --gray: #d9d9d9;
  --bg: #f5f5f7;
  --card-bg: #ffffff;
  --text: #1c1c1e;
  --muted: #6b6b70;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  padding: 24px 12px;
}

.card {
  width: 100%;
  max-width: 420px;
  background: var(--card-bg);
  border-radius: 16px;
  padding: 20px 16px 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

h1 {
  font-size: 1.15rem;
  font-weight: 600;
  text-align: center;
  margin: 0 0 18px;
}

.weekday-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-bottom: 6px;
}

.weekday-row span {
  text-align: center;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.day {
  aspect-ratio: 1 / 1;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
}

.day.empty {
  background: transparent;
}

.day.green {
  background: var(--green);
  color: #fff;
}

.day.yellow {
  background: var(--yellow);
  color: #4a3b00;
}

.day.gray {
  background: var(--gray);
  color: #6b6b70;
}

.legend {
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.swatch {
  width: 16px;
  height: 16px;
  border-radius: 5px;
  display: inline-block;
  flex-shrink: 0;
}

.swatch.green { background: var(--green); }
.swatch.yellow { background: var(--yellow); }
.swatch.gray { background: var(--gray); }

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f0f10;
    --card-bg: #1c1c1e;
    --text: #f2f2f2;
    --muted: #9a9a9e;
    --gray: #3a3a3c;
  }

  .day.gray {
    color: #b0b0b3;
  }
}
