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

html,
body {
  height: 100%;
  font-family: var(--font-family);
  font-size: var(--fontSize3);
  font-weight: var(--fontWeight1);
  line-height: 1.4;
  background-color: var(--bg-outer);
  color: var(--text-primary);
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none; /* ingen "træk for at genindlæse" / elastik-scroll på hele siden */
}

/* Telefon: langt tryk må ikke markere tekst eller åbne iOS' kopier-menu (bruges til attention) */
.app-shell {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation; /* ingen dobbelttryk-zoom */
}

.app-shell input {
  -webkit-user-select: text;
  user-select: text;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

button:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

/* Mobile-first full-height app shell; centered max-width on larger screens */
.app-shell {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  max-width: 540px;
  margin: 0 auto;
  padding: var(--space-xs);
  gap: var(--space-xs);
  position: relative;
}

@media (min-width: 541px) {
  body {
    background-color: var(--bg-page);
    padding: 8px 0;
  }

  .app-shell {
    height: calc(100dvh - 16px);
    background-color: var(--bg-outer);
    border: 2px solid var(--bg-card-border);
    border-radius: var(--radius-card);
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.45);
  }
}

.view {
  display: none;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

.view--active {
  display: flex;
}
