/*
 * Base CSS — reset and global typography for the Peppi web SPA.
 * Builds on top of tokens.css (imported before this file in index.html).
 */

/* Modern CSS reset */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  tab-size: 4;
}

body {
  min-height: 100dvh;
  font-family: var(--font-sans);
  font-size: var(--font-size-16);
  line-height: var(--line-height-normal);
  color: var(--color-text-primary);
  background-color: var(--color-surface-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Root layout — full-height column with space for the bottom tab bar */
#app {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  padding-bottom: 92px; /* tab bar height */
}

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

input,
button,
textarea,
select {
  font: inherit;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

/* Focus visible ring — accessible outline */
:focus-visible {
  outline: 2px solid var(--color-brand-primary);
  outline-offset: 2px;
  border-radius: var(--border-radius-sm);
}

/* Screen container used by all screen Custom Elements */
.peppi-screen {
  flex: 1;
  padding: var(--space-4) var(--space-4) var(--space-6);
  max-width: 480px;
  margin: 0 auto;
  width: 100%;
}

.peppi-screen__title {
  font-family: var(--font-sans);
  font-size: var(--font-size-24);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-primary);
  margin-bottom: var(--space-2);
  letter-spacing: 0;
  line-height: var(--line-height-snug);
}

.peppi-screen__caption {
  font-size: var(--font-size-14);
  color: var(--color-text-secondary);
  line-height: var(--line-height-relaxed);
}
