*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; height: 100%; }
body {
  margin: 0; min-height: 100dvh; background: var(--bg); color: var(--ink);
  font-family: var(--font-ui); line-height: 1.4; -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}
h1, h2, h3 { margin: 0; font-family: var(--font-display); line-height: 1.1; font-weight: 600; }
p { margin: 0; }
button, input, select { font: inherit; color: inherit; }
button {
  cursor: pointer; border: 0; background: none; padding: 0; touch-action: manipulation;
  -webkit-tap-highlight-color: transparent; user-select: none; -webkit-touch-callout: none; -webkit-user-select: none;
}
:focus-visible { outline: 3px solid var(--info); outline-offset: 2px; border-radius: var(--r-sm); }
[tabindex="-1"]:focus { outline: none; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tnum { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }

/* Screens */
.screen { min-height: 100dvh; display: flex; flex-direction: column; padding: max(var(--gutter), env(safe-area-inset-top)) var(--gutter) max(var(--gutter), env(safe-area-inset-bottom)); container-type: inline-size; container-name: screen; }
.screen[data-enter] { animation: rise-fade var(--t-base) var(--ease-out); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 48px; padding: 0 var(--s-5); border-radius: var(--r-pill);
  background: var(--surface-2); color: var(--ink); font-weight: 600;
  transition: transform var(--t-fast) var(--ease-out), background var(--t-fast);
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-ghost { background: transparent; }
.btn-icon { width: 44px; height: 44px; min-height: 44px; padding: 0; border-radius: var(--r-pill); }
.btn:disabled { opacity: .45; cursor: default; }
a.btn { text-decoration: none; }
.shelf-link { margin-right: 2px; }
.icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.stack { display: flex; flex-direction: column; gap: var(--s-4); }
.row { display: flex; align-items: center; gap: var(--s-3); }
.grow { flex: 1; }
