/*
  Мобильная вёрстка: крупные цифры, удобная кнопка, без лишнего.
*/

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  color: #0f172a;
  background: linear-gradient(165deg, #ecfdf5 0%, #e0f2fe 100%);
}

.app {
  max-width: 28rem;
  margin: 0 auto;
  padding: max(1rem, env(safe-area-inset-top)) 1.25rem max(1.5rem, env(safe-area-inset-bottom));
}

.app__header {
  text-align: center;
  margin-bottom: 1.75rem;
}

.app__title {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.app__hint {
  margin: 0;
  font-size: 0.875rem;
  color: #475569;
  line-height: 1.4;
}

.readouts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.readout--current {
  grid-column: 1 / -1;
}

.readout {
  background: #fff;
  border-radius: 1rem;
  padding: 1.25rem 1rem;
  text-align: center;
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.readout__label {
  margin: 0 0 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
}

.readout__value {
  margin: 0;
  font-size: 2.25rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  color: #0d7c66;
}

.readout__current-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.readout__value--current {
  flex: 0 0 auto;
  min-width: 4ch;
}

.reset-current {
  padding: 0.5rem 1rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #475569;
  background: #f1f5f9;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 0.75rem;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.reset-current:hover {
  background: #e2e8f0;
  border-color: rgba(15, 23, 42, 0.18);
}

.reset-current:active {
  transform: scale(0.98);
}

.toggle {
  display: block;
  width: 100%;
  padding: 1rem 1.25rem;
  font-size: 1.125rem;
  font-weight: 700;
  color: #fff;
  background: #0d7c66;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(13, 124, 102, 0.35);
  transition: background 0.15s ease, transform 0.08s ease;
}

.toggle:active {
  transform: scale(0.98);
}

.toggle:hover {
  background: #0a6b56;
}

.toggle[aria-pressed="true"] {
  background: #b91c1c;
  box-shadow: 0 8px 24px rgba(185, 28, 28, 0.35);
}

.toggle[aria-pressed="true"]:hover {
  background: #991b1b;
}

.status {
  margin: 1rem 0 0;
  font-size: 0.8125rem;
  color: #64748b;
  text-align: center;
  min-height: 2.5em;
  line-height: 1.4;
}

@media (min-width: 380px) {
  .readout__value {
    font-size: 2.75rem;
  }

  .readout__value--current {
    font-size: 2.75rem;
  }
}
