/* Grundstil, ikoner och knappar. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
body.has-sheet { overflow: hidden; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
/* Trycket svarar direkt: ingen väntan på dubbeltryck och ingen grå blinkning, eftersom knapparna visar trycket själva. */
a, button, label, summary, input, textarea, select, [role="button"], [tabindex] { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 1.25em; height: 1.25em; flex: none; fill: currentColor; }

/* ---------- Knappar ---------- */
.btn {
  --face: var(--primary);
  --shadow: var(--primary-shadow);
  --text: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 0 24px;
  border: 0;
  border-radius: 16px;
  background: var(--face);
  box-shadow: 0 4px 0 var(--shadow);
  color: var(--text);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  user-select: none;
  transition: transform 60ms, box-shadow 60ms, filter 150ms;
}
@media (hover: hover) { .btn:hover:not(:disabled) { filter: brightness(1.07); } }
.btn:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 0 0 var(--shadow); }
.btn:disabled { --face: var(--line); --shadow: var(--line-strong); --text: var(--faint); cursor: default; }
.btn .icon { width: 20px; height: 20px; }
.btn--blue { --face: var(--blue-face); --shadow: var(--blue-shadow); }
.btn--red { --face: var(--red-face); --shadow: var(--red-shadow); }
.btn--tone { --face: var(--tone); --shadow: var(--tone-shadow); --text: var(--tone-text); }
.btn--white { --face: #ffffff; --shadow: rgba(0, 0, 0, 0.2); --text: var(--tone-ink); }
@media (prefers-color-scheme: dark) { .btn--white { --text: var(--tone-shadow); } .tone-8 .btn--white { --text: #6b4f00; } }
.btn--ghost { --face: var(--panel); --shadow: var(--line); --text: var(--muted); border: 2px solid var(--line); }
@media (hover: hover) { .btn--ghost:hover:not(:disabled) { filter: none; background: var(--soft); } }
.btn--danger { --text: var(--red-ink); }
.btn--small { min-height: 42px; padding: 0 16px; font-size: 13px; border-radius: 14px; }
.btn--block { display: flex; width: 100%; }
.text-btn { padding: 8px 4px; border: 0; background: none; color: inherit; font-size: 15px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.text-btn:disabled { opacity: 0.6; cursor: default; }
