/* MAYUMA CHAT Web-Client – Grundlagen (eigener Code). */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; height: 100%; background: var(--bg); }
body {
  margin: 0; height: 100%; min-height: 100dvh;
  font-family: var(--font); font-size: var(--fs-m); line-height: var(--lh);
  color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums;
  overflow: hidden;
}
#app { height: 100%; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: var(--title-tracking); color: var(--heading); }
p { margin: 0; }
a { color: var(--accent); text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
img, svg { display: block; }
svg.ic { flex: none; }
ul.list, ul.action-list { list-style: none; margin: 0; padding: 0; }
[hidden] { display: none !important; }

:focus { outline: none; }
:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; border-radius: var(--radius-s); }
::selection { background: var(--primary-soft); color: var(--text); }

.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; inset-inline-start: var(--space-3); top: -100px; z-index: 100; background: var(--surface); color: var(--text); padding: var(--space-3) var(--space-4); border-radius: var(--radius-m); box-shadow: var(--shadow-3); font-weight: var(--fw-bold); }
.skip-link:focus { top: var(--space-3); }

.muted { color: var(--text-2); }
.small { font-size: var(--fs-s); }
.row { display: flex; align-items: center; gap: var(--space-2); min-width: 0; flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: var(--space-3); }
.center { text-align: center; }
.mono { font-family: var(--font-mono); }
.nowrap { white-space: nowrap; }

@media (forced-colors: active) {
  .btn, .icon-btn, .list-row, .input, .toggle { border: 1px solid CanvasText; }
  .bubble { border: 1px solid CanvasText; }
}

/* Schreibrichtung (DEC-53/54): Richtungs-Icons spiegeln sich bei dir="rtl"; Telefonnummern bleiben links-nach-rechts */
[dir="rtl"] .ic-back, [dir="rtl"] .ic-forward, [dir="rtl"] .ic-send, [dir="rtl"] .ic-reply { transform: scaleX(-1); }
[dir="rtl"] .toggle[aria-checked="true"]::after { transform: translateX(-1.25rem); }
