:root {
  color-scheme: light dark;
  --tlo: #f4f7f6;
  --tekst: #10201c;
  --slaby: #4a5d58;
  --akcent: #0f5c4d;
  --akcent-tekst: #ffffff;
  --czerwony: #b3261e;
  --pole: #ffffff;
  --ramka: #9fb3ad;
  --fokus: #1a73e8;
}

@media (prefers-color-scheme: dark) {
  :root {
    --tlo: #0b1f1b;
    --tekst: #e8f0ee;
    --slaby: #a9bcb6;
    --akcent: #3fbf9f;
    --akcent-tekst: #04130f;
    --czerwony: #ff8a80;
    --pole: #132b26;
    --ramka: #4f6a63;
    --fokus: #8ab4f8;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--tlo);
  color: var(--tekst);
  font: 18px/1.5 -apple-system, system-ui, "Segoe UI", Roboto, sans-serif;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

main {
  max-width: 28rem;
  margin: 0 auto;
  padding: 2rem 1.25rem;
  text-align: center;
}

h1 { font-size: 1.6rem; margin: 1rem 0; }
h1:focus { outline: none; }

[hidden] { display: none !important; }

.status { min-height: 1.5em; color: var(--slaby); font-size: 0.95rem; margin: 0; }
.blad { color: var(--czerwony); }

label { display: block; font-weight: 600; margin-bottom: 0.5rem; }

input {
  width: 100%;
  min-height: 56px;
  font: inherit;
  font-size: 1.4rem;
  letter-spacing: 0.15em;
  text-align: center;
  text-transform: uppercase;
  color: var(--tekst);
  background: var(--pole);
  border: 2px solid var(--ramka);
  border-radius: 12px;
  padding: 0.5rem;
}

button { font: inherit; cursor: pointer; }

.przycisk {
  min-height: 56px;
  min-width: 8rem;
  margin: 1rem 0.25rem 0;
  padding: 0.75rem 1.5rem;
  border: 2px solid var(--akcent);
  border-radius: 999px;
  background: transparent;
  color: var(--tekst);
  font-weight: 600;
}

form .przycisk { width: 100%; background: var(--akcent); color: var(--akcent-tekst); }

.zadzwon {
  width: 11rem;
  height: 11rem;
  margin: 2rem auto 1rem;
  display: block;
  border: none;
  border-radius: 50%;
  background: var(--akcent);
  color: var(--akcent-tekst);
  font-size: 1.6rem;
  font-weight: 700;
}

.zadzwon:disabled { opacity: 0.4; cursor: not-allowed; }

.zakoncz { background: var(--czerwony); border-color: var(--czerwony); color: #fff; }

.przycisk[aria-pressed="true"] { background: var(--akcent); color: var(--akcent-tekst); }

button:focus-visible, input:focus-visible {
  outline: 3px solid var(--fokus);
  outline-offset: 3px;
}

.czas { font-size: 2.5rem; font-variant-numeric: tabular-nums; margin: 0.5rem 0; }

.poziom {
  height: 10px;
  border-radius: 5px;
  background: var(--ramka);
  overflow: hidden;
  margin: 1rem auto;
  max-width: 16rem;
}

#poziom-pasek {
  height: 100%;
  background: var(--akcent);
  transform-origin: left center;
  transform: scaleX(0);
}

.podpowiedz { color: var(--slaby); min-height: 1.5em; }
.napisy { min-height: 3em; font-size: 1.05rem; }
.przyciski { display: flex; justify-content: center; flex-wrap: wrap; }
