/* Base: reset, page column, type scale. */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.45;
  -webkit-tap-highlight-color: transparent;
}
body.modal-open { overflow: hidden; }

/* One phone-width column, clear of the tab bar (and the rest timer when it shows). */
.view {
  max-width: 560px;
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-top: calc(18px + env(safe-area-inset-top, 0px));
  padding-bottom: calc(var(--tabbar-h) + 40px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  gap: 24px;
}
body.timing .view { padding-bottom: calc(var(--tabbar-h) + 170px + env(safe-area-inset-bottom, 0px)); }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.05;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: 2.6rem; text-transform: uppercase; }
h2 { font-size: 1.6rem; text-transform: uppercase; }
h3 { font-size: 1.25rem; font-weight: 600; }
p { margin: 0; }
b { font-weight: 650; }
img { max-width: 100%; }
button, input, select { font: inherit; color: inherit; }
a { color: var(--accent-ink); }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.loading { padding: 48px 0; text-align: center; color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
