/* Home System — style bazowe, mobile-first */

:root {
  --tlo: #f5f6f8;
  --karta: #ffffff;
  --tekst: #1c1f26;
  --tekst-slaby: #6b7280;
  --akcent: #2563eb;
  --obrys: #e5e7eb;
  --zaokraglenie: 16px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--tlo);
  color: var(--tekst);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

/* marginesy bezpieczne dla wycięć ekranu */
.ekran {
  max-width: 480px;
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top) + 24px)
           calc(env(safe-area-inset-right) + 16px)
           calc(env(safe-area-inset-bottom) + 24px)
           calc(env(safe-area-inset-left) + 16px);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.naglowek { text-align: center; margin-bottom: 28px; }
.naglowek h1 { margin: 0; font-size: 1.9rem; letter-spacing: -0.02em; }
.podtytul { margin: 6px 0 0; color: var(--tekst-slaby); }

/* kafelki modułów — duże pola dotykowe, jedna dłoń */
.kafelki {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.kafelek {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 128px;
  padding: 18px 12px;
  background: var(--karta);
  border: 1px solid var(--obrys);
  border-radius: var(--zaokraglenie);
  text-decoration: none;
  color: var(--tekst);
  font-weight: 600;
  text-align: center;
  -webkit-tap-highlight-color: transparent;
}

.kafelek:active { transform: scale(0.97); }

.kafelek__ikona { font-size: 2.1rem; }
.kafelek__nazwa { font-size: 1rem; }

.kafelek--wkrotce {
  opacity: 0.55;
  pointer-events: none;
}

.kafelek__etykieta {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--tekst-slaby);
  background: var(--tlo);
  border-radius: 999px;
  padding: 2px 10px;
}

.stopka {
  margin-top: auto;
  padding-top: 32px;
  text-align: center;
  color: var(--tekst-slaby);
  font-size: 0.85rem;
}

/* większe ekrany — rozszerzenie, nie osobny projekt */
@media (min-width: 700px) {
  .ekran { max-width: 720px; }
  .kafelki { grid-template-columns: repeat(4, 1fr); }
}
