:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f6f3ec;
  color: #16211d;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100dvh;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0)),
    #f6f3ec;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
}

button {
  border: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.app {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(12px, 2.5vw, 22px);
  min-height: 100dvh;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}

.counter {
  display: grid;
  grid-template-rows: auto minmax(250px, 1fr) auto;
  gap: 14px;
  min-width: 0;
  min-height: 0;
  border-radius: 8px;
  padding: clamp(14px, 2.4vw, 24px);
  box-shadow: 0 24px 60px rgba(20, 32, 36, 0.16);
}

.counter-green {
  background: linear-gradient(180deg, #28b66f, #13804f);
  color: #f3fff7;
}

.counter-blue {
  background: linear-gradient(180deg, #2495e8, #1762be);
  color: #f3f9ff;
}

.counter-top,
.stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

h1 {
  margin: 0;
  font-size: clamp(1.15rem, 2.1vw, 1.65rem);
  font-weight: 800;
  letter-spacing: 0;
}

.icon-button,
.stepper button {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.icon-button {
  font-size: 1.45rem;
}

.tap-zone {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  width: 100%;
  min-height: 250px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.2),
    inset 0 -28px 60px rgba(0, 0, 0, 0.08);
}

.tap-zone:active,
.stepper button:active,
.icon-button:active {
  transform: scale(0.985);
}

.count {
  display: block;
  max-width: 100%;
  overflow-wrap: anywhere;
  font-size: clamp(4rem, 15vw, 11rem);
  line-height: 0.95;
  font-weight: 900;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}

.tap-label {
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  opacity: 0.82;
}

.stepper button {
  flex: 1;
  height: 64px;
  font-size: 2rem;
  font-weight: 800;
}

@media (max-width: 720px) {
  .app {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(2, minmax(0, 1fr));
  }

  .counter {
    grid-template-rows: auto minmax(170px, 1fr) auto;
  }

  .tap-zone {
    min-height: 170px;
  }
}
