/* Base element styles */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* The shell hides scrollbars; pages inside the webview keep their own. */
* {
  scrollbar-width: none;
  -webkit-tap-highlight-color: transparent;
}

*::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

html {
  height: 100vh;
  font-size: 100%;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

body {
  height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  background-color: var(--color-ground);
  color: var(--color-ink);
  font-family: var(--font-family-primary);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-base);
}

/* No zoom on the shell itself (app.js also blocks the zoom shortcuts). */
html,
body {
  zoom: 1;
  transform: none;
}

input,
textarea,
[contenteditable] {
  user-select: text;
  -webkit-user-select: text;
}

button,
input {
  font: inherit;
  color: inherit;
}

a {
  color: var(--color-accent);
}

/* Keyboard focus: 2px accent ring, 2px off the control. */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* Section header, iOS style: 13px / 600 / secondary, sentence case. */
.label {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-ink-muted);
}

/* Secondary caption text. */
.caption {
  font-size: var(--font-size-sm);
  color: var(--color-ink-muted);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0ms !important;
    animation: none !important;
  }
}
