:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --text: #152033;
  --muted: #5f6f86;
  --accent: #3df9ff;
  --accent-strong: #24bde3;
  --ring: #ffd8cc;
  --shadow: 0 12px 30px rgba(21, 32, 51, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  min-height: 100dvh;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 15%, #fff1cc 0%, transparent 40%),
    radial-gradient(circle at 80% 25%, #d7ecff 0%, transparent 45%),
    var(--bg);
  display: grid;
  place-items: center;
  padding: 24px;
  overflow-x: hidden;
}

.bg-shape {
  position: fixed;
  border-radius: 999px;
  filter: blur(40px);
  opacity: 0.55;
  z-index: -1;
}

.bg-shape-a {
  width: 280px;
  height: 280px;
  background: #ffe4ba;
  top: -70px;
  left: -60px;
}

.bg-shape-b {
  width: 320px;
  height: 320px;
  background: #cae2ff;
  bottom: -90px;
  right: -90px;
}

.app {
  width: min(820px, 100%);
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr;
}

.today-card,
.history-card {
  background: color-mix(in oklab, var(--surface) 92%, white 8%);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  backdrop-filter: blur(8px);
  animation: rise 420ms ease both;
}

.history-card {
  animation-delay: 80ms;
}

.eyebrow {
  margin: 0;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  font-size: 0.76rem;
}

h1 {
  margin: 6px 0 2px;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
}

.count-label {
  margin: 0;
  color: var(--muted);
}

.count-value {
  margin: 8px 0 16px;
  font-size: clamp(2.6rem, 8vw, 4rem);
  line-height: 1;
  font-weight: 700;
}

button {
  font: inherit;
  border: 0;
  border-radius: 14px;
  padding: 12px 16px;
  cursor: pointer;
  transition: transform 140ms ease, background-color 140ms ease, opacity 140ms ease;
}

#incrementBtn {
  background: var(--accent);
  color: #fff;
  font-weight: 700;
}

#incrementBtn:hover {
  background: var(--accent-strong);
  transform: translateY(-1px);
}

#incrementBtn:focus-visible,
.ghost:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 2px;
}

#incrementBtn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.history-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

h2 {
  margin: 0;
  font-size: 1.15rem;
}

.ghost {
  background: #edf3fb;
  color: #1f3554;
}

.history-list {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid #e2eaf4;
  border-radius: 12px;
  padding: 11px 13px;
  background: #fbfdff;
}

.history-date {
  color: #243d5f;
  font-weight: 500;
}

.history-count {
  font-weight: 700;
}

.empty {
  color: var(--muted);
  font-size: 0.95rem;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 760px) {
  .app {
    grid-template-columns: 340px 1fr;
    align-items: start;
  }
}
