/* ============================================================
   RESET
   ============================================================ */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: var(--body-weight);
  font-size: calc(1rem * var(--body-scale));
  letter-spacing: var(--body-tracking);
  line-height: var(--body-line);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  display: flex;
  justify-content: center;
  overflow-x: hidden;
}

body.sheet-open {
  overflow: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}

button,
input,
textarea,
select {
  font: inherit;
  letter-spacing: inherit;
  color: inherit;
}

button {
  background: none;
  border: none;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}

[hidden] {
  display: none !important;
}

/* Scrollbars stay out of the way; the app is phone-shaped. */
* {
  scrollbar-width: none;
}
::-webkit-scrollbar {
  width: 0;
  height: 0;
}

/* Display lettering. Every theme redefines what this looks like —
   family, weight, tracking and case all come from tokens. */
.display {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  letter-spacing: var(--display-tracking);
  text-transform: var(--display-transform);
  line-height: var(--display-line);
}

h1, h2, h3 {
  font-weight: var(--body-weight-strong);
  line-height: 1.2;
}
