:root {
  --bg: #0a1a33;
  --bg-deep: #061024;
  --surface: #12254a;
  --text: #f2f6ff;
  --muted: #9fb3d4;
  --accent: #f6821f;
  --accent-ink: #11223d;
  --border: rgba(255, 255, 255, 0.12);
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  background: var(--bg);
  background-image: linear-gradient(170deg, var(--bg) 0%, var(--bg-deep) 100%);
  background-attachment: fixed;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

.app {
  min-height: 100svh;
  max-width: 30rem;
  margin: 0 auto;
  padding:
    calc(2rem + env(safe-area-inset-top))
    calc(1.25rem + env(safe-area-inset-right))
    calc(2rem + env(safe-area-inset-bottom))
    calc(1.25rem + env(safe-area-inset-left));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  text-align: center;
}

.headline {
  margin: 0;
  font-size: clamp(2rem, 11vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 800;
  text-wrap: balance;
}

.counter {
  width: 100%;
  padding: 1.5rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  box-shadow: var(--shadow);
}

.counter__label {
  margin: 0 0 0.25rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.counter__value {
  display: block;
  font-size: clamp(3.5rem, 22vw, 5.5rem);
  line-height: 1;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
}

.tap, .reset {
  width: 100%;
  min-height: 3.75rem;
  border-radius: 1rem;
  font-family: inherit;
  font-size: 1.125rem;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  transition: transform 0.08s ease, opacity 0.15s ease;
}

.tap {
  border: none;
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: var(--shadow);
}

.reset {
  min-height: 3.25rem;
  font-size: 1rem;
  font-weight: 600;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  box-shadow: none;
}

.tap:active { transform: scale(0.97); }
.reset:active { opacity: 0.6; }

.tap:focus-visible, .reset:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.note {
  margin: 0;
  min-height: 1.25rem;
  font-size: 0.8125rem;
  color: var(--muted);
}

@media (prefers-reduced-motion: reduce) {
  .tap, .reset { transition: none; }
}
