/* Grundstil: Reset, Typografie, Fokus */

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

/* Das hidden-Attribut muss immer gewinnen: Komponenten mit display: grid/flex (z. B. Tour-Schritte)
   überschreiben sonst die Browser-Regel, und „versteckte“ Inhalte bleiben sichtbar */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; accent-color: var(--s-accent); }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--s-bg);
  color: var(--s-text);
  font-family: var(--s-font);
  font-size: var(--s-text-base);
  line-height: 1.55;
  letter-spacing: -0.003em;
  /* Plus Jakarta Sans hat ein sehr schmales Leerzeichen -> etwas Wortabstand */
  word-spacing: 0.06em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  caret-color: var(--s-accent);
}

/* Japanisch (V1.9): strenger Zeilenumbruch nach JIS (kein „。“ oder kleines „ッ“ am Zeilenanfang),
   etwas mehr Zeilenhöhe für Kanji, kein negatives Zeichen-/Wortabstand-Tuning der Lateinschrift.
   Überschriften und Knöpfe brechen nach Sinnabschnitten statt mitten im Wort (auto-phrase,
   Browser ohne Unterstützung ignorieren die Zeile). */
:lang(ja) { line-break: strict; }
html:lang(ja) body { line-height: 1.7; letter-spacing: 0; word-spacing: normal; }
html:lang(ja) :is(h1, h2, h3, h4, .btn, [class*="__title"]) { letter-spacing: 0; word-break: auto-phrase; }

button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; word-spacing: inherit; }
img, svg, iframe { display: block; max-width: 100%; }
svg { flex-shrink: 0; }

h1, h2, h3, h4 { margin: 0; color: var(--s-text); line-height: 1.25; }
h1, h2 { font-family: var(--s-font-head); font-weight: 800; letter-spacing: -0.01em; }
h1 { font-size: var(--s-text-2xl); }
h2 { font-size: var(--s-text-xl); }
h3 { font-size: var(--s-text-base); font-weight: 600; }
p { margin: 0; }

a { color: var(--s-accent-text); text-decoration: none; }
a:hover { color: var(--s-accent-hover); }

code, pre, kbd, .mono { font-family: var(--s-font-mono); font-size: .86em; word-spacing: 0; }
pre { margin: 0; white-space: pre-wrap; word-break: break-word; }

mark { background: var(--s-mark); color: var(--s-text); padding: 0 .12em; border-radius: var(--s-radius-sm); }
::selection { background: var(--s-accent-soft-2); color: inherit; }

hr { border: 0; border-top: 1px solid var(--s-border); margin: var(--s-space-5) 0; }

/* Tastatur-Fokus: Ring wie in Musubi, nur bei Tastaturbedienung */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--s-accent);
  outline-offset: 2px;
  border-radius: var(--s-radius-sm);
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.muted { color: var(--s-text-3); }
.text-2 { color: var(--s-text-2); }
.nowrap { white-space: nowrap; }
.tabular { font-variant-numeric: tabular-nums; }

/* Scrollbars dezent */
* { scrollbar-width: thin; scrollbar-color: var(--s-border-strong) transparent; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
