/* Podstawa: reset, układ strony, nagłówek, sekcje, dolna nawigacja i komunikaty. */
* {
  box-sizing: border-box;
}
/* Safari na iOS bierze kolor paska adresu z koloru tła strony (theme-color pomija), więc html i body mają kolor góry.
   Ciemny dół rysuje sam gradient, który pokrywa całe body. */
html {
  background: var(--bg-top);
}
body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, var(--bg-top) 0, var(--bg) 600px, var(--bg) 100%) var(--bg-top);
  color: var(--text);
}
button,
input {
  font: inherit;
  -webkit-tap-highlight-color: transparent;
}
/* Przytrzymanie palca na przycisku lub karcie nie zaznacza tekstu i nie otwiera menu kopiowania. */
button,
.card {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
.app-shell {
  position: relative;
  /* Zorza w tle leży pod treścią, ale nad tłem strony. Wystające plamy przycinamy, żeby nie było przewijania w bok. */
  isolation: isolate;
  overflow-x: clip;
  width: min(100%, 560px);
  margin: 0 auto;
  padding: calc(56px + env(safe-area-inset-top)) var(--gutter) calc(108px + env(safe-area-inset-bottom));
}
.topbar {
  padding-inline: var(--text-inset);
  margin-bottom: 16px;
}
.topbar h1 {
  font-size: 1.3125rem;
  font-weight: 600;
  line-height: 1.15;
  margin: 0;
}
/* Nazwa miejsca otwiera ekran wyboru miejsca. Wygląda jak zwykły nagłówek. */
.place-name {
  border: 0;
  padding: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.topbar-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 6px;
  font-size: 0.9375rem;
  line-height: 20px;
  color: var(--sub-65);
}
.section {
  margin-top: 32px;
}
.section-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.9375rem;
  font-weight: 600;
  margin: 0 0 16px;
  padding-inline: var(--text-inset);
}
/* Wartość po prawej od tytułu sekcji, np. poziom aktywności zorzy. */
.section-value {
  font-weight: 400;
  color: var(--sub);
}
/* Pływające przyciski mapy i miejsc (72×48, 24 px od krawędzi). Treść przewija się pod nimi, stąd rozmycie tła. */
.fab-bar {
  position: fixed;
  z-index: 10;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(100%, 560px);
  padding-inline: 24px;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}
.fab {
  pointer-events: auto;
  display: grid;
  place-items: center;
  width: 72px;
  height: 48px;
  border: 1px solid var(--card-border);
  border-radius: 24px;
  background: var(--fab);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  color: var(--text);
  cursor: pointer;
  transition: var(--press);
}
.fab:active {
  transform: scale(var(--press-scale));
}
.toast {
  position: fixed;
  z-index: 40;
  left: 50%;
  bottom: 100px;
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  background: #e9fff5;
  color: #09231a;
  padding: 11px 16px;
  border-radius: 12px;
  font-size: 0.82rem;
  font-weight: 700;
  transition: 0.25s;
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
@media (min-width: 700px) {
  body {
    padding: 24px;
  }
  .app-shell {
    border: 1px solid var(--line);
    border-radius: 36px;
    /* To samo tło co na telefonie, żeby ramka nie zmieniała kolorów. */
    background: linear-gradient(180deg, var(--bg-top) 0, var(--bg) 600px, var(--bg) 100%) var(--bg-top);
    min-height: 900px;
  }
}
