/* DrSn33dl3 · Sprechstunde
   Farben aus dem Bild des Doktors: Kittel-Türkis, Blut, das warme Schwarz dahinter. */

@font-face {
  font-family: 'Bricolage';
  src: url('../fonts/bricolage.woff2') format('woff2-variations');
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-display: swap;
}
@font-face {
  font-family: 'Outfit';
  src: url('../fonts/outfit.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: 'Mono';
  src: url('../fonts/mono.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}

:root {
  --nacht: #070807;
  --nacht-2: #0d0f0d;
  --kittel: #6eaba8;
  --kittel-hell: #b4e2dc;
  --kittel-tief: #2c5654;
  --blut: #b8372d;
  --blut-hell: #ef6b5b;
  --blut-tief: #4d120d;
  --jod: #d9a24a;
  --jod-hell: #f3c67a;
  --haut: #ece5d8;
  --haut-2: rgba(236, 229, 216, 0.66);
  --haut-3: rgba(236, 229, 216, 0.40);
  --linie: rgba(180, 226, 220, 0.13);

  --r-s: 12px;
  --r-m: 20px;
  --r-l: 30px;
  --r-xl: 40px;

  --titel: 'Bricolage', 'Outfit', system-ui, sans-serif;
  --text: 'Outfit', system-ui, sans-serif;
  --mono: 'Mono', ui-monospace, monospace;

  --sanft: cubic-bezier(0.22, 1, 0.36, 1);
  --weich: cubic-bezier(0.16, 1, 0.3, 1);
  --federnd: cubic-bezier(0.34, 1.56, 0.64, 1);

  --stufe-ok: var(--kittel);
  --stufe-warnung: var(--jod);
  --stufe-ausfall: var(--blut-hell);
  --stufe-unbekannt: rgba(236, 229, 216, 0.35);

  color-scheme: dark;
}

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

/* Ausgeblendet bleibt ausgeblendet, auch wenn eine Klasse display setzt. */
[hidden] {
  display: none !important;
}

html {
  background: var(--nacht);
  -webkit-text-size-adjust: 100%;
}

/* body ohne eigenen Hintergrund: Er würde über der Flüssigkeit liegen, die mit negativem z-index dahinter läuft. */
body {
  margin: 0;
  min-height: 100dvh;
  background: transparent;
  color: var(--haut);
  font: 400 15px/1.5 var(--text);
  font-feature-settings: 'ss01';
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection {
  background: rgba(184, 55, 45, 0.55);
  color: #fff;
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

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

:focus-visible {
  outline: 2px solid var(--kittel-hell);
  outline-offset: 3px;
  border-radius: 10px;
}

/* ───────────── Hintergrund: Flüssigkeit, Körnung ───────────── */

#fluessigkeit {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -3;
  display: block;
}

#fluessigkeit.ohne-webgl {
  background:
    radial-gradient(60% 50% at 20% 25%, rgba(110, 171, 168, 0.20), transparent 70%),
    radial-gradient(50% 45% at 80% 70%, rgba(184, 55, 45, 0.18), transparent 70%),
    var(--nacht);
}

.rauschen {
  position: fixed;
  inset: -50%;
  z-index: -2;
  pointer-events: none;
  opacity: 0.09;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='k'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.9 0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23k)'/%3E%3C/svg%3E");
  animation: rauschen 1.2s steps(6) infinite;
  mix-blend-mode: overlay;
}

@keyframes rauschen {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-4%, 3%); }
  40% { transform: translate(3%, -5%); }
  60% { transform: translate(-6%, -2%); }
  80% { transform: translate(5%, 4%); }
  100% { transform: translate(0, 0); }
}

/* ───────────── Glas ───────────── */

.glas {
  position: relative;
  border-radius: var(--r-l);
  background:
    linear-gradient(158deg, rgba(180, 226, 220, 0.105) 0%, rgba(110, 171, 168, 0.04) 36%, rgba(7, 8, 7, 0.32) 100%);
  -webkit-backdrop-filter: blur(26px) saturate(165%);
  backdrop-filter: blur(26px) saturate(165%);
  border: 1px solid var(--linie);
  box-shadow:
    inset 0 1px 0 rgba(230, 255, 250, 0.16),
    inset 1px 0 0 rgba(230, 255, 250, 0.05),
    inset 0 -1px 0 rgba(0, 0, 0, 0.5),
    inset 0 0 60px rgba(110, 171, 168, 0.045),
    0 1px 0 rgba(0, 0, 0, 0.6),
    0 50px 90px -50px rgba(0, 0, 0, 0.95);
  isolation: isolate;
}

/* Spiegelung: ein schräger Lichtstreif wie auf gewölbtem Laborglas */
.glas::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(112deg, rgba(255, 255, 255, 0.11) 0%, rgba(255, 255, 255, 0.025) 18%, transparent 34%),
    radial-gradient(120% 60% at 50% -10%, rgba(180, 226, 220, 0.10), transparent 60%);
  mix-blend-mode: screen;
  z-index: -1;
}

.glas--tief {
  background: linear-gradient(160deg, rgba(180, 226, 220, 0.07), rgba(7, 8, 7, 0.55) 70%);
}

.glas--blut {
  background:
    linear-gradient(158deg, rgba(239, 107, 91, 0.16) 0%, rgba(184, 55, 45, 0.07) 40%, rgba(20, 6, 5, 0.45) 100%);
  border-color: rgba(239, 107, 91, 0.25);
  box-shadow:
    inset 0 1px 0 rgba(255, 220, 214, 0.18),
    inset 0 0 70px rgba(184, 55, 45, 0.12),
    0 50px 90px -50px rgba(0, 0, 0, 0.95);
}

.glas--jod {
  background: linear-gradient(158deg, rgba(243, 198, 122, 0.14), rgba(217, 162, 74, 0.05) 40%, rgba(20, 14, 5, 0.45));
  border-color: rgba(243, 198, 122, 0.24);
}

.tafel {
  padding: clamp(18px, 2.2vw, 30px);
}

/* ───────────── Grundgerüst ───────────── */

.app {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 22px;
  max-width: 1580px;
  min-height: 100dvh;
  margin: 0 auto;
  padding: 22px;
}

.app--eingang {
  display: block;
  padding: 0;
}

.saal {
  min-width: 0;
  padding-bottom: 40px;
}

/* Schiene: die senkrechte Glasleiste links */
.schiene {
  position: sticky;
  top: 22px;
  height: calc(100dvh - 44px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 14px 0 16px;
  border-radius: 46px;
}

.bullauge {
  --ring: var(--kittel);
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  flex: none;
  padding: 3px;
  background: conic-gradient(from var(--dreh, 0deg), var(--ring), rgba(255, 255, 255, 0.08) 30%, var(--ring) 55%, rgba(255, 255, 255, 0.06) 80%, var(--ring));
  animation: drehen 9s linear infinite;
  box-shadow: 0 0 0 4px rgba(7, 8, 7, 0.6), 0 0 28px -4px var(--ring);
}

.bullauge img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.05);
}

.bullauge::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px solid var(--ring);
  opacity: 0;
  animation: puls 2.4s var(--sanft) infinite;
}

.bullauge[data-stufe='ausfall'] {
  --ring: var(--blut-hell);
}

.bullauge[data-stufe='warnung'] {
  --ring: var(--jod);
}

@property --dreh {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}

@keyframes drehen {
  to { --dreh: 360deg; }
}

@keyframes puls {
  0% { transform: scale(0.92); opacity: 0.8; }
  70% { transform: scale(1.18); opacity: 0; }
  100% { opacity: 0; }
}

.reiter {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

.reiter a {
  position: relative;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 22px;
  color: var(--haut-2);
  text-decoration: none;
  transition: background 0.35s var(--sanft), color 0.35s var(--sanft), transform 0.35s var(--federnd);
}

.reiter a:hover {
  color: var(--haut);
  background: rgba(180, 226, 220, 0.07);
  transform: translateY(-1px);
}

.reiter a[aria-current='page'] {
  color: var(--nacht);
  background: radial-gradient(120% 120% at 30% 20%, var(--kittel-hell), var(--kittel) 55%, var(--kittel-tief));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 10px 30px -10px rgba(110, 171, 168, 0.8);
}

.reiter a[aria-current='page']::before {
  content: '';
  position: absolute;
  left: -16px;
  width: 6px;
  height: 22px;
  border-radius: 6px;
  background: var(--kittel-hell);
  box-shadow: 0 0 14px var(--kittel);
}

.reiter svg,
.knopf svg,
.symbol {
  width: 24px;
  height: 24px;
  flex: none;
}

.reiter .beschriftung {
  position: absolute;
  left: calc(100% + 16px);
  padding: 6px 12px;
  border-radius: 999px;
  white-space: nowrap;
  font-size: 13px;
  color: var(--haut);
  background: rgba(13, 15, 13, 0.92);
  border: 1px solid var(--linie);
  opacity: 0;
  transform: translateX(-6px);
  pointer-events: none;
  transition: opacity 0.2s, transform 0.25s var(--sanft);
}

.reiter a:hover .beschriftung,
.reiter a:focus-visible .beschriftung {
  opacity: 1;
  transform: none;
}

.ich {
  margin-top: auto;
  display: grid;
  justify-items: center;
  gap: 10px;
}

.ich img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--linie);
}

.ich-platzhalter {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--kittel-tief);
  font-weight: 700;
}

.abmelden {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 16px;
  border: 0;
  background: transparent;
  color: var(--haut-3);
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}

.abmelden:hover {
  color: var(--blut-hell);
  background: rgba(184, 55, 45, 0.12);
}

.abmelden svg {
  width: 20px;
  height: 20px;
}

/* ───────────── Schrift ───────────── */

.dachzeile {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  font: 500 11px/1 var(--mono);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--kittel-hell);
}

.dachzeile::before {
  content: '';
  width: 18px;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}

.titel {
  margin: 0;
  font-family: var(--titel);
  font-weight: 780;
  font-stretch: 78%;
  font-size: clamp(2.5rem, 5.2vw, 4.7rem);
  line-height: 0.92;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.titel--mittel {
  font-size: clamp(1.7rem, 3vw, 2.5rem);
}

.untertitel {
  margin: 0;
  font-family: var(--titel);
  font-weight: 650;
  font-stretch: 85%;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
}

.leise {
  color: var(--haut-2);
}

.mono {
  font-family: var(--mono);
  font-size: 0.86em;
  letter-spacing: -0.01em;
}

/* ───────────── Kopf einer Ansicht ───────────── */

.kopf {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px 28px;
  margin: 6px 4px 26px;
}

.kopf p {
  margin: 12px 0 0;
  max-width: 60ch;
}

.ansicht {
  animation: auftauchen 0.85s var(--weich) both;
}

@keyframes auftauchen {
  from { opacity: 0; transform: translateY(14px) scale(0.995); filter: blur(6px); }
  to { opacity: 1; transform: none; filter: none; }
}

/* ───────────── Knöpfe, Chips, Eingaben ───────────── */

.knopf {
  --farbe: var(--haut);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid var(--linie);
  background: linear-gradient(180deg, rgba(180, 226, 220, 0.10), rgba(180, 226, 220, 0.03));
  color: var(--farbe);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transition: transform 0.3s var(--federnd), box-shadow 0.3s var(--sanft), background 0.3s, opacity 0.2s;
}

.knopf:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 14px 30px -18px rgba(180, 226, 220, 0.7);
}

.knopf:active:not(:disabled) {
  transform: translateY(0) scale(0.98);
}

.knopf:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Hauptknopf: ein Tropfen Kittel-Flüssigkeit mit Glanz */
.knopf--haupt {
  color: #04100f;
  border-color: rgba(220, 255, 250, 0.4);
  background:
    radial-gradient(130% 160% at 28% 0%, rgba(255, 255, 255, 0.55), transparent 42%),
    linear-gradient(180deg, var(--kittel-hell), var(--kittel) 55%, #3f7f7b);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    inset 0 -6px 14px rgba(20, 60, 58, 0.45),
    0 18px 40px -16px rgba(110, 171, 168, 0.85);
}

.knopf--haupt:hover:not(:disabled) {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    inset 0 -6px 14px rgba(20, 60, 58, 0.45),
    0 24px 50px -16px rgba(110, 171, 168, 1);
}

.knopf--blut {
  color: #fff3f1;
  border-color: rgba(255, 180, 170, 0.35);
  background:
    radial-gradient(130% 160% at 28% 0%, rgba(255, 255, 255, 0.35), transparent 42%),
    linear-gradient(180deg, var(--blut-hell), var(--blut) 55%, #6d1912);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 18px 40px -16px rgba(184, 55, 45, 0.9);
}

.knopf--leise {
  background: transparent;
  border-color: transparent;
  color: var(--haut-2);
  box-shadow: none;
}

.knopf--leise:hover:not(:disabled) {
  color: var(--haut);
  background: rgba(180, 226, 220, 0.06);
  box-shadow: none;
}

.knopf--dick {
  min-height: 60px;
  padding: 0 30px;
  font-size: 17px;
  font-family: var(--titel);
  font-stretch: 90%;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.knopf--breit {
  width: 100%;
}

.knopfreihe {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 15px;
  border-radius: 999px;
  border: 1px solid var(--linie);
  background: rgba(180, 226, 220, 0.04);
  color: var(--haut-2);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.28s var(--sanft);
}

.chip:hover {
  color: var(--haut);
  border-color: rgba(180, 226, 220, 0.3);
}

.chip[aria-pressed='true'] {
  color: #04100f;
  font-weight: 600;
  border-color: rgba(220, 255, 250, 0.5);
  background: radial-gradient(140% 160% at 30% 0%, rgba(255, 255, 255, 0.45), transparent 45%), var(--kittel);
  box-shadow: 0 8px 22px -12px rgba(110, 171, 168, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.chip[aria-pressed='true']::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #04100f;
}

.feld {
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  border-radius: var(--r-m);
  border: 1px solid var(--linie);
  background: rgba(4, 6, 5, 0.45);
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.45);
  resize: vertical;
  transition: border-color 0.25s, box-shadow 0.25s;
}

.feld::placeholder {
  color: var(--haut-3);
}

.feld:focus {
  outline: none;
  border-color: rgba(180, 226, 220, 0.45);
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.45), 0 0 0 4px rgba(110, 171, 168, 0.14);
}

textarea.feld {
  min-height: 110px;
  line-height: 1.5;
}

select.feld {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--haut-2) 50%), linear-gradient(135deg, var(--haut-2) 50%, transparent 50%);
  background-position: calc(100% - 22px) 52%, calc(100% - 16px) 52%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 44px;
}

select.feld option {
  background: var(--nacht-2);
}

.frage {
  margin: 0 0 22px;
  padding: 0;
  border: 0;
}

.frage legend,
.frage label.beschriftung {
  display: block;
  margin-bottom: 11px;
  font-family: var(--titel);
  font-weight: 650;
  font-stretch: 88%;
  font-size: 1.05rem;
}

.frage small {
  display: block;
  margin-top: -6px;
  margin-bottom: 10px;
  color: var(--haut-3);
  font-size: 13px;
}

/* Kippschalter wie ein Kontrolllämpchen */
.schalter {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}

.schalter input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.schalter .bahn {
  position: relative;
  width: 54px;
  height: 30px;
  border-radius: 999px;
  background: rgba(4, 6, 5, 0.6);
  border: 1px solid var(--linie);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.6);
  transition: background 0.3s;
}

.schalter .bahn::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, #b9b2a6);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.6);
  transition: transform 0.35s var(--federnd), background 0.3s;
}

.schalter input:checked + .bahn {
  background: rgba(110, 171, 168, 0.35);
}

.schalter input:checked + .bahn::after {
  transform: translateX(24px);
  background: radial-gradient(circle at 35% 30%, #fff, var(--kittel-hell));
  box-shadow: 0 0 14px var(--kittel), 0 3px 8px rgba(0, 0, 0, 0.6);
}

.schalter input:focus-visible + .bahn {
  outline: 2px solid var(--kittel-hell);
  outline-offset: 3px;
}

/* ───────────── Fläschchen, Reagenzgläser, Monitor ───────────── */

.phiole {
  --farbe: var(--stufe-ok);
  position: relative;
  width: 14px;
  height: 30px;
  flex: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.16);
  overflow: hidden;
  box-shadow: 0 0 18px -4px var(--farbe);
}

.phiole::before {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: var(--pegel, 72%);
  background: linear-gradient(180deg, color-mix(in srgb, var(--farbe), #fff 30%), var(--farbe));
  box-shadow: 0 -2px 8px var(--farbe);
}

.phiole::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 3px;
  height: 60%;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.45);
}

.phiole[data-stufe='warnung'] {
  --farbe: var(--stufe-warnung);
}

.phiole[data-stufe='ausfall'] {
  --farbe: var(--stufe-ausfall);
  --pegel: 30%;
  animation: flackern 1.1s steps(2) infinite;
}

.phiole[data-stufe='unbekannt'] {
  --farbe: var(--stufe-unbekannt);
  --pegel: 15%;
}

@keyframes flackern {
  50% { box-shadow: 0 0 26px 0 var(--farbe); }
}

.punkt {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--stufe-ok);
  box-shadow: 0 0 10px var(--stufe-ok);
  flex: none;
}

.punkt[data-stufe='warnung'] {
  background: var(--stufe-warnung);
  box-shadow: 0 0 10px var(--stufe-warnung);
}

.punkt[data-stufe='ausfall'] {
  background: var(--stufe-ausfall);
  box-shadow: 0 0 12px var(--stufe-ausfall);
}

.punkt[data-stufe='unbekannt'] {
  background: var(--stufe-unbekannt);
  box-shadow: none;
}

/* Reagenzglas mit Flüssigkeitsstand */
.reagenz {
  --farbe: var(--kittel);
  display: grid;
  justify-items: center;
  gap: 12px;
}

.reagenz .glaskolben {
  position: relative;
  width: 58px;
  height: 170px;
  border-radius: 14px 14px 29px 29px;
  border: 1px solid rgba(220, 255, 250, 0.22);
  background: rgba(255, 255, 255, 0.03);
  overflow: hidden;
  box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.6), inset 4px 0 0 rgba(255, 255, 255, 0.05);
}

.reagenz .inhalt {
  position: absolute;
  inset: auto 0 0;
  height: var(--pegel, 50%);
  background: linear-gradient(180deg, color-mix(in srgb, var(--farbe), #fff 25%), var(--farbe) 30%, color-mix(in srgb, var(--farbe), #000 45%));
  transition: height 1.4s var(--sanft);
  box-shadow: 0 0 30px -4px var(--farbe);
}

.reagenz .inhalt::before {
  content: '';
  position: absolute;
  top: -9px;
  left: -50%;
  width: 200%;
  height: 18px;
  background: radial-gradient(12px 9px at 12px 9px, color-mix(in srgb, var(--farbe), #fff 25%) 98%, transparent) 0 0 / 24px 18px repeat-x;
  animation: welle 3.2s linear infinite;
}

.reagenz .glaskolben::after {
  content: '';
  position: absolute;
  top: 10px;
  left: 9px;
  width: 7px;
  height: 70%;
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.35), transparent);
}

.reagenz .skala {
  position: absolute;
  right: 8px;
  top: 16px;
  bottom: 22px;
  width: 8px;
  background: repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.25) 0 1px, transparent 1px 16px);
  opacity: 0.6;
}

.reagenz[data-stufe='warnung'] {
  --farbe: var(--jod);
}

.reagenz[data-stufe='ausfall'] {
  --farbe: var(--blut-hell);
}

@keyframes welle {
  to { transform: translateX(24px); }
}

.reagenz .wert {
  font-family: var(--titel);
  font-weight: 750;
  font-stretch: 80%;
  font-size: 1.5rem;
  line-height: 1;
}

.reagenz .name {
  font: 500 11px/1 var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--haut-2);
}

.reagenz .rest {
  font-size: 12px;
  color: var(--haut-3);
  text-align: center;
}

/* EKG-Spur in einer Zeile */
.ekg {
  width: 100%;
  height: 36px;
  overflow: visible;
}

.ekg path {
  fill: none;
  stroke: var(--kittel);
  stroke-width: 1.6;
  stroke-linejoin: round;
  stroke-linecap: round;
  filter: drop-shadow(0 0 4px rgba(110, 171, 168, 0.75));
  stroke-dasharray: 1200;
  stroke-dashoffset: 1200;
  animation: zeichnen 2.4s var(--sanft) forwards;
}

.ekg .ausfall {
  stroke: var(--blut-hell);
  filter: drop-shadow(0 0 4px rgba(239, 107, 91, 0.8));
}

@keyframes zeichnen {
  to { stroke-dashoffset: 0; }
}

/* ───────────── Visite ───────────── */

.raster {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 20px;
}

.spanne-4 { grid-column: span 4; }
.spanne-5 { grid-column: span 5; }
.spanne-7 { grid-column: span 7; }
.spanne-8 { grid-column: span 8; }
.spanne-12 { grid-column: 1 / -1; }

.monitor {
  min-height: 330px;
  overflow: hidden;
  display: grid;
  align-content: space-between;
}

.monitor canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  border-radius: inherit;
}

.monitor .gitter {
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background:
    linear-gradient(rgba(180, 226, 220, 0.05) 1px, transparent 1px) 0 0 / 100% 28px,
    linear-gradient(90deg, rgba(180, 226, 220, 0.05) 1px, transparent 1px) 0 0 / 28px 100%;
  mask-image: radial-gradient(80% 80% at 50% 50%, #000, transparent);
}

.monitor .anzeige {
  display: flex;
  align-items: flex-end;
  gap: 18px;
}

.monitor .riesig {
  font-family: var(--titel);
  font-weight: 800;
  font-stretch: 75%;
  font-size: clamp(5rem, 11vw, 9.5rem);
  line-height: 0.8;
  letter-spacing: -0.04em;
  color: var(--kittel-hell);
  text-shadow: 0 0 40px rgba(110, 171, 168, 0.55);
}

.monitor[data-stufe='ausfall'] .gross {
  color: var(--blut-hell);
  text-shadow: 0 0 40px rgba(239, 107, 91, 0.6);
}

.monitor[data-stufe='warnung'] .gross {
  color: var(--jod-hell);
  text-shadow: 0 0 40px rgba(217, 162, 74, 0.55);
}

.monitor .riesig small {
  font-size: 0.42em;
  color: var(--haut-3);
  text-shadow: none;
  letter-spacing: -0.02em;
}

.monitor .sockel {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font: 500 12px/1 var(--mono);
  color: var(--haut-2);
  letter-spacing: 0.06em;
}

.vitale .reagenzien {
  display: flex;
  justify-content: space-around;
  gap: 12px;
  margin-top: 8px;
}

.projektliste {
  display: grid;
  gap: 4px;
}

.projekt {
  display: grid;
  grid-template-columns: 14px minmax(0, 1.4fr) minmax(90px, 1fr) 82px 104px 66px;
  align-items: center;
  gap: 18px;
  padding: 12px 16px;
  border-radius: var(--r-m);
  transition: background 0.25s;
}

.projekt:hover {
  background: rgba(180, 226, 220, 0.05);
}

.projekt .name {
  font-weight: 600;
  line-height: 1.25;
}

.projekt .name a {
  display: block;
  font-weight: 400;
  font-size: 13px;
  color: var(--haut-3);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.projekt .name a:hover {
  color: var(--kittel-hell);
}

.projekt .grund {
  display: block;
  font-size: 13px;
  color: var(--blut-hell);
}

.projekt[data-stufe='warnung'] .grund {
  color: var(--jod-hell);
}

.projekt .zahl {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--haut-2);
  text-align: right;
  white-space: nowrap;
}

.liste {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.liste li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 14px;
}

.liste .zeit {
  flex: none;
  min-width: 48px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--haut-3);
}

.liste .punkt {
  transform: translateY(-1px);
}

.dienste {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dienst {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  border-radius: 999px;
  border: 1px solid var(--linie);
  background: rgba(4, 6, 5, 0.35);
  font-size: 13px;
}

.abschnitt + .abschnitt {
  margin-top: 26px;
}

.abschnitt h3 {
  margin: 0 0 14px;
}

/* ───────────── Wartezimmer ───────────── */

.patienten {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}

.patient {
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: 30px 22px 24px;
  text-align: center;
  text-decoration: none;
  border-radius: var(--r-xl);
  transition: transform 0.5s var(--federnd), box-shadow 0.4s var(--sanft);
}

.patient:hover {
  transform: translateY(-6px) rotate(-0.4deg);
  box-shadow:
    inset 0 1px 0 rgba(230, 255, 250, 0.2),
    0 40px 70px -30px rgba(0, 0, 0, 0.95),
    0 0 0 1px rgba(180, 226, 220, 0.25);
}

.patient .bild {
  --durchmesser: 104px;
}

.patient strong {
  font-family: var(--titel);
  font-weight: 720;
  font-stretch: 84%;
  font-size: 1.35rem;
  line-height: 1.05;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.marken {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}

.marke {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  font: 500 11px/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid var(--linie);
  color: var(--haut-2);
}

.marke--kittel {
  color: var(--kittel-hell);
  border-color: rgba(110, 171, 168, 0.4);
  background: rgba(110, 171, 168, 0.1);
}

.marke--blut {
  color: var(--blut-hell);
  border-color: rgba(239, 107, 91, 0.4);
  background: rgba(184, 55, 45, 0.12);
}

.marke--jod {
  color: var(--jod-hell);
  border-color: rgba(243, 198, 122, 0.4);
  background: rgba(217, 162, 74, 0.1);
}

/* Rundes Bild in Glasfassung: Server-Symbol, Doktor */
.bild {
  --durchmesser: 80px;
  position: relative;
  width: var(--durchmesser);
  height: var(--durchmesser);
  border-radius: 50%;
  padding: 4px;
  flex: none;
  background: linear-gradient(150deg, rgba(220, 255, 250, 0.4), rgba(110, 171, 168, 0.08) 40%, rgba(0, 0, 0, 0.4));
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(180, 226, 220, 0.12);
}

.bild img,
.bild .ersatz {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.bild .ersatz {
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 30% 25%, var(--kittel), var(--kittel-tief) 70%);
  color: #04100f;
  font-family: var(--titel);
  font-weight: 800;
  font-stretch: 80%;
  font-size: calc(var(--durchmesser) * 0.34);
}

.bild::after {
  content: '';
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.35), transparent 35%);
  pointer-events: none;
}

.leer {
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: clamp(40px, 8vw, 90px) 24px;
  text-align: center;
}

.leer p {
  margin: 0;
  max-width: 46ch;
}

/* ───────────── Akte ───────────── */

.aktenkopf {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px;
  margin-bottom: 20px;
}

.aktenkopf .bild {
  --durchmesser: 116px;
}

.aktenkopf .daten {
  flex: 1 1 300px;
  min-width: 0;
}

.werte {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  margin-top: 14px;
}

.werte div {
  display: grid;
  gap: 2px;
}

.werte strong {
  font-family: var(--titel);
  font-weight: 760;
  font-stretch: 80%;
  font-size: 1.8rem;
  line-height: 1;
}

.werte span {
  font: 500 11px/1 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--haut-3);
}

.brotkrume {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--haut-2);
  text-decoration: none;
  font-size: 14px;
}

.brotkrume:hover {
  color: var(--kittel-hell);
}

.brotkrume svg {
  width: 18px;
  height: 18px;
}

/* Baum: Kategorien, Kanäle, Rollen */
.baum {
  display: grid;
  gap: 6px;
}

.zweig {
  border-radius: var(--r-m);
}

.zweig > summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--r-m);
  list-style: none;
  cursor: pointer;
  font: 500 12px/1.2 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--haut-2);
  transition: background 0.2s, color 0.2s;
}

.zweig > summary::-webkit-details-marker {
  display: none;
}

.zweig > summary:hover {
  color: var(--haut);
  background: rgba(180, 226, 220, 0.05);
}

.zweig > summary .pfeil {
  width: 14px;
  height: 14px;
  transition: transform 0.3s var(--sanft);
}

.zweig[open] > summary .pfeil {
  transform: rotate(90deg);
}

.zweig .astwerk {
  display: grid;
  gap: 2px;
  margin: 2px 0 8px 18px;
  padding-left: 14px;
  border-left: 1px dashed rgba(180, 226, 220, 0.16);
}

.blatt {
  --marker: transparent;
  position: relative;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 10px;
  padding: 8px 12px;
  border-radius: 14px;
  transition: background 0.2s;
}

.blatt:hover {
  background: rgba(180, 226, 220, 0.045);
}

.blatt::before {
  content: '';
  position: absolute;
  left: -15px;
  top: 50%;
  width: 4px;
  height: 60%;
  border-radius: 4px;
  transform: translateY(-50%);
  background: var(--marker);
  box-shadow: 0 0 10px var(--marker);
}

.blatt .symbol {
  width: 18px;
  height: 18px;
  color: var(--haut-3);
}

.blatt .name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.blatt .thema {
  grid-column: 2 / -1;
  font-size: 13px;
  color: var(--haut-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.blatt .zeichen {
  display: inline-flex;
  gap: 6px;
  color: var(--haut-3);
}

.blatt .zeichen svg {
  width: 15px;
  height: 15px;
}

.rollen {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rolle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px 7px 9px;
  border-radius: 999px;
  border: 1px solid var(--linie);
  background: rgba(4, 6, 5, 0.3);
  font-size: 13px;
}

.rolle i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--farbe, rgba(236, 229, 216, 0.35));
  box-shadow: 0 0 8px var(--farbe, transparent);
}

.rolle svg {
  width: 13px;
  height: 13px;
  color: var(--haut-3);
}

.verlauf {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
}

.verlauf li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(4, 6, 5, 0.3);
}

/* ───────────── Befund ───────────── */

.legende {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.anzahl {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 9px 15px;
  border-radius: 999px;
  border: 1px solid var(--linie);
  background: rgba(4, 6, 5, 0.35);
  font-size: 14px;
}

.anzahl b {
  font-family: var(--titel);
  font-stretch: 80%;
  font-size: 1.25rem;
  line-height: 1;
}

.anzahl[data-aktion='neu'] b { color: var(--kittel-hell); }
.anzahl[data-aktion='anpassen'] b { color: var(--jod-hell); }
.anzahl[data-aktion='nicht'] b { color: var(--blut-hell); }

.blatt[data-aktion='neu'] { --marker: var(--kittel); }
.blatt[data-aktion='anpassen'] { --marker: var(--jod); }
.blatt[data-aktion='nicht'] { --marker: var(--blut-hell); }
.blatt[data-aktion='bleibt'] { opacity: 0.62; }

.zweig[data-aktion='neu'] > summary { color: var(--kittel-hell); }
.zweig[data-aktion='anpassen'] > summary { color: var(--jod-hell); }

.aktion {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 8px;
  font: 600 13px/1 var(--mono);
  background: rgba(255, 255, 255, 0.06);
}

[data-aktion='neu'] > .aktion,
.aktion[data-aktion='neu'] {
  color: #04100f;
  background: var(--kittel);
}

[data-aktion='anpassen'] > .aktion,
.aktion[data-aktion='anpassen'] {
  color: #1b1204;
  background: var(--jod);
}

[data-aktion='nicht'] > .aktion,
.aktion[data-aktion='nicht'] {
  color: #fff;
  background: var(--blut);
}

.details {
  grid-column: 2 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.details span {
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--haut-2);
}

.details .grund {
  color: var(--blut-hell);
  background: rgba(184, 55, 45, 0.14);
}

.details .info {
  color: var(--kittel-hell);
  background: rgba(110, 171, 168, 0.12);
}

/* Sprechblase des Doktors */
.sprechblase {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-top: 22px;
}

.sprechblase .bild {
  --durchmesser: 54px;
}

.sprechblase p {
  position: relative;
  margin: 0;
  padding: 14px 18px;
  border-radius: 6px 22px 22px 22px;
  background: rgba(236, 229, 216, 0.08);
  border: 1px solid var(--linie);
  font-size: 15px;
  max-width: 62ch;
}

.aktionen {
  display: grid;
  gap: 12px;
}

.trenner {
  height: 1px;
  margin: 22px 0;
  background: linear-gradient(90deg, transparent, var(--linie), transparent);
}

/* ───────────── Warten, OP ───────────── */

.schleier {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(3, 4, 3, 0.55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  animation: einblenden 0.6s var(--weich);
}

@keyframes einblenden {
  from { opacity: 0; }
}

.wartekarte {
  width: min(480px, 100%);
  padding: 34px 30px 30px;
  text-align: center;
  animation: fensterAuf 0.9s var(--weich) both;
}

.wartekarte .bild {
  --durchmesser: 92px;
  margin: 0 auto 18px;
}

.wartekarte .ekg {
  height: 60px;
  margin: 10px 0 6px;
}

.wartekarte .ekg path {
  stroke-dasharray: 60 400;
  stroke-dashoffset: 0;
  animation: lauflicht 1.6s linear infinite;
}

@keyframes lauflicht {
  from { stroke-dashoffset: 460; }
  to { stroke-dashoffset: 0; }
}

.wartekarte .satz {
  min-height: 1.5em;
  margin: 8px 0 4px;
  color: var(--haut-2);
  animation: auftauchen 0.5s var(--sanft);
}

.wartekarte .uhr {
  font: 500 12px/1 var(--mono);
  color: var(--haut-3);
  letter-spacing: 0.1em;
}

.op {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.2fr);
  gap: 20px;
  align-items: start;
}

.ring {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  max-width: 340px;
  margin: 0 auto;
}

.ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
  overflow: visible;
}

.ring circle {
  fill: none;
  stroke-width: 14;
}

.ring .bahn {
  stroke: rgba(180, 226, 220, 0.08);
}

.ring .stand {
  stroke: url(#ringverlauf);
  stroke-linecap: round;
  transition: stroke-dashoffset 0.8s var(--sanft);
  filter: drop-shadow(0 0 10px rgba(110, 171, 168, 0.7));
}

.ring .mitte {
  position: absolute;
  display: grid;
  justify-items: center;
  gap: 4px;
}

.ring .mitte strong {
  font-family: var(--titel);
  font-weight: 800;
  font-stretch: 75%;
  font-size: clamp(3.4rem, 7vw, 5rem);
  line-height: 0.9;
  color: var(--kittel-hell);
  text-shadow: 0 0 30px rgba(110, 171, 168, 0.6);
}

.ring .mitte span {
  font: 500 12px/1 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--haut-3);
}

.oplog {
  display: grid;
  gap: 6px;
  max-height: 520px;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  list-style: none;
  mask-image: linear-gradient(180deg, #000 85%, transparent);
}

.oplog li {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 14px;
  background: rgba(4, 6, 5, 0.3);
  font-size: 14px;
  animation: auftauchen 0.45s var(--sanft) both;
}

.oplog .fehler {
  color: var(--blut-hell);
}

/* ───────────── Anmeldung ───────────── */

.eingang {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: clamp(24px, 6vw, 90px);
  min-height: 100dvh;
  max-width: 1280px;
  margin: 0 auto;
  padding: clamp(24px, 6vw, 80px);
}

.eingang .bildnis {
  position: relative;
  justify-self: center;
  width: min(460px, 80vw);
  aspect-ratio: 1;
}

.eingang .bildnis .bild {
  --durchmesser: 100%;
  padding: 10px;
  animation: schweben 7s ease-in-out infinite;
}

.eingang .bildnis::before {
  content: '';
  position: absolute;
  inset: -12%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(184, 55, 45, 0.35), transparent 70%);
  filter: blur(20px);
  z-index: -1;
  animation: atmen 5s ease-in-out infinite;
}

.eingang .bildnis::after {
  content: '';
  position: absolute;
  inset: -4%;
  border-radius: 50%;
  border: 1px solid rgba(180, 226, 220, 0.18);
  box-shadow: inset 0 0 60px rgba(110, 171, 168, 0.1);
}

@keyframes schweben {
  50% { transform: translateY(-12px) rotate(1deg); }
}

@keyframes atmen {
  50% { transform: scale(1.08); opacity: 0.7; }
}

.eingang .titel {
  font-size: clamp(3.4rem, 9vw, 7.6rem);
}

.eingang .titel span {
  display: block;
  color: var(--kittel-hell);
  text-shadow: 0 0 50px rgba(110, 171, 168, 0.5);
}

.eingang .text {
  margin: 22px 0 34px;
  font-size: 1.15rem;
  color: var(--haut-2);
  max-width: 34ch;
}

.eingang .hinweis {
  margin-top: 22px;
  padding: 14px 18px;
  font-size: 14px;
}

.discord-logo {
  width: 24px;
  height: 24px;
}

/* ───────────── Meldungen ───────────── */

.toasts {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 60;
  display: grid;
  gap: 10px;
  max-width: min(420px, calc(100vw - 44px));
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  font-size: 14px;
  border-radius: var(--r-m);
  animation: meldungAuf 0.7s var(--weich);
}

.toast--weg {
  opacity: 0;
  transform: translateY(8px);
  transition: all 0.35s var(--sanft);
}

.lader {
  display: grid;
  place-items: center;
  min-height: 50vh;
}

.lader .ekg {
  width: 220px;
  height: 60px;
}

.lader .ekg path {
  stroke-dasharray: 60 400;
  animation: lauflicht 1.4s linear infinite;
}

.fehlerkarte {
  padding: 28px;
  display: grid;
  gap: 14px;
  justify-items: start;
}

/* ───────────── Schmale Bildschirme ───────────── */

@media (max-width: 1180px) {
  .spanne-4,
  .spanne-5,
  .spanne-7,
  .spanne-8 {
    grid-column: 1 / -1;
  }

  .projekt {
    grid-template-columns: 14px minmax(0, 1fr) 90px 70px;
  }

  .projekt .verlauf-zelle,
  .projekt .seit-zelle {
    display: none;
  }
}

@media (max-width: 900px) {
  .app {
    display: block;
    padding: 14px 14px 120px;
  }

  .schiene {
    position: fixed;
    top: auto;
    left: 12px;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    z-index: 40;
    height: auto;
    flex-direction: row;
    justify-content: space-between;
    padding: 9px 12px;
    border-radius: 34px;
  }

  .bullauge {
    width: 50px;
    height: 50px;
  }

  .reiter {
    flex-direction: row;
    margin: 0;
  }

  .reiter a {
    width: 52px;
    height: 52px;
  }

  .reiter a[aria-current='page']::before,
  .reiter .beschriftung {
    display: none;
  }

  .ich {
    margin: 0;
    grid-auto-flow: column;
  }

  .ich img,
  .ich-platzhalter {
    display: none;
  }

  .eingang {
    grid-template-columns: 1fr;
    text-align: center;
    padding-top: 40px;
  }

  .eingang .bildnis {
    width: min(300px, 70vw);
    grid-row: 1;
  }

  .eingang .text {
    margin-inline: auto;
  }

  .op {
    grid-template-columns: 1fr;
  }

  .toasts {
    right: 14px;
    left: 14px;
    bottom: 100px;
    max-width: none;
  }
}

@media (max-width: 560px) {
  .projekt {
    grid-template-columns: 14px minmax(0, 1fr) 64px;
    gap: 12px;
  }

  .projekt .ram-zelle {
    display: none;
  }

  .vitale .reagenz .glaskolben {
    width: 46px;
    height: 140px;
  }

  .patienten {
    grid-template-columns: 1fr;
  }
}

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

  .ekg path {
    stroke-dashoffset: 0;
  }
}

/* ───────────── Sprache ───────────── */

.sprachschalter {
  display: grid;
  place-items: center;
  width: 42px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid var(--linie);
  background: rgba(4, 6, 5, 0.4);
  color: var(--haut-2);
  font: 600 11px/1 var(--mono);
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.sprachschalter:hover {
  color: var(--kittel-hell);
  border-color: rgba(180, 226, 220, 0.35);
}

.eingang-sprache {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 5;
}

/* ───────────── Akte: Reiter, Werkbank, Zeilen ───────────── */

.akte-reiter {
  position: relative;
  display: flex;
  gap: 6px;
  width: fit-content;
  max-width: 100%;
  margin: 2px 0 20px;
  padding: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  border-radius: 999px;
  border: 1px solid var(--linie);
  background: rgba(4, 6, 5, 0.35);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.akte-reiter::-webkit-scrollbar {
  display: none;
}

.akte-reiter [role='tab'] {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--haut-2);
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.25s, background 0.25s, box-shadow 0.3s;
}

.akte-reiter [role='tab'] svg {
  width: 18px;
  height: 18px;
}

.akte-reiter [role='tab']:hover {
  color: var(--haut);
  background: rgba(180, 226, 220, 0.06);
}

.akte-reiter [role='tab'] {
  position: relative;
  z-index: 1;
}

.akte-reiter [role='tab'][aria-selected='true'] {
  color: #04100f;
}

.akte-reiter [role='tab'][aria-selected='true']:hover {
  background: transparent;
}

.reiter-zeiger {
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 0;
  width: 0;
  border-radius: 999px;
  background:
    radial-gradient(130% 160% at 28% 0%, rgba(255, 255, 255, 0.5), transparent 42%),
    linear-gradient(180deg, var(--kittel-hell), var(--kittel));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 10px 26px -14px rgba(110, 171, 168, 0.9);
  transition: transform 0.6s var(--weich), width 0.6s var(--weich);
  pointer-events: none;
}

.betreiberleiste {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  margin: -4px 0 20px;
}

.leer .knopf {
  margin-top: 6px;
}

.hinweisband {
  margin-bottom: 20px;
}

.schmal {
  max-width: 780px;
}

.werkbank {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.knopf--klein {
  min-height: 38px;
  padding: 0 16px;
  font-size: 14px;
  gap: 8px;
}

.knopf--klein svg {
  width: 17px;
  height: 17px;
}

.knopf--gefahr {
  color: var(--blut-hell);
}

.knopf--gefahr:hover:not(:disabled) {
  color: #fff3f1;
  background: rgba(184, 55, 45, 0.22);
}

.hinweiszeile {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0 0 16px;
  font-size: 14px;
}

.hinweiszeile svg {
  width: 16px;
  height: 16px;
  margin-top: 2px;
}

.werkbaum {
  display: grid;
  gap: 16px;
}

.gruppe-kopf {
  margin: 0 0 6px;
  padding: 0 12px;
  font: 500 11px/1.2 var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--haut-3);
}

.gruppe-inhalt {
  display: grid;
  gap: 2px;
}

.zeile--kategorie + .gruppe-inhalt {
  margin: 2px 0 0 20px;
  padding-left: 12px;
  border-left: 1px dashed rgba(180, 226, 220, 0.16);
}

.gruppe-leer {
  margin: 6px 12px;
  font-size: 13px;
}

.zeile {
  display: flex;
  align-items: center;
  gap: 6px;
  border-radius: 16px;
  transition: background 0.2s;
}

.zeile:hover,
.zeile:focus-within {
  background: rgba(180, 226, 220, 0.05);
}

.zeile-name {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 2px 10px;
  padding: 9px 12px;
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
}

button.zeile-name {
  cursor: pointer;
}

.zeile-name .symbol {
  width: 18px;
  height: 18px;
  color: var(--haut-3);
}

.zeile-name .name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.zeile--kategorie .zeile-name .name {
  font: 500 12px/1.3 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--haut-2);
}

.zeile-name .thema {
  grid-column: 2 / -1;
  font-size: 13px;
  color: var(--haut-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.zeile-name .zeichen {
  display: inline-flex;
  gap: 6px;
  color: var(--haut-3);
}

.zeile-name .zeichen svg {
  width: 15px;
  height: 15px;
}

.zeile-name .rolle {
  justify-self: start;
  grid-column: 1 / 3;
}

.zeile[data-gesperrt='true'] .rolle {
  opacity: 0.6;
}

.zeile-knoepfe {
  display: inline-flex;
  gap: 4px;
  padding-right: 6px;
  opacity: 0.5;
  transition: opacity 0.2s;
}

.zeile:hover .zeile-knoepfe,
.zeile:focus-within .zeile-knoepfe {
  opacity: 1;
}

@media (hover: none) {
  .zeile-knoepfe {
    opacity: 1;
  }
}

.mini {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 50%;
  border: 1px solid var(--linie);
  background: rgba(4, 6, 5, 0.4);
  color: var(--haut-2);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s, transform 0.3s var(--federnd);
}

.mini svg {
  width: 16px;
  height: 16px;
}

.mini:hover:not(:disabled) {
  color: var(--kittel-hell);
  border-color: rgba(180, 226, 220, 0.4);
  transform: translateY(-1px);
}

.mini:disabled {
  opacity: 0.25;
  cursor: default;
}

/* ───────────── Fenster ───────────── */

html:has(dialog.fenster[open]) {
  overflow: hidden;
}

dialog.fenster {
  position: fixed;
  inset: 0;
  width: min(620px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100dvh - 48px);
  margin: auto;
  padding: 0;
  color: var(--haut);
  border-radius: var(--r-xl);
  overflow: hidden;
}

dialog.fenster[open] {
  display: flex;
  flex-direction: column;
  animation: fensterAuf 0.8s var(--weich) both;
}

dialog.fenster[open]::backdrop {
  animation: schleierAuf 0.6s var(--weich) both;
}

dialog.fenster.fenster--zu {
  animation: fensterZu 0.32s cubic-bezier(0.4, 0, 1, 1) both;
}

dialog.fenster.fenster--zu::backdrop {
  animation: schleierZu 0.32s ease both;
}

@keyframes fensterAuf {
  from { opacity: 0; transform: translateY(30px) scale(0.94); filter: blur(12px); }
  55% { filter: blur(0); }
  to { opacity: 1; transform: none; filter: none; }
}

@keyframes fensterZu {
  to { opacity: 0; transform: translateY(16px) scale(0.96); filter: blur(8px); }
}

@keyframes schleierAuf {
  from { opacity: 0; }
}

@keyframes schleierZu {
  to { opacity: 0; }
}

@keyframes meldungAuf {
  from { opacity: 0; transform: translateX(28px) scale(0.96); filter: blur(6px); }
}

/* Teile reihen sich nacheinander ein: Felder im Fenster, Zeilen nach einem Reiterwechsel */
.einreihen {
  animation: einreihen 0.7s var(--weich) both;
  animation-delay: calc(70ms + var(--i, 0) * 28ms);
}

.fenster .einreihen {
  animation-delay: calc(170ms + var(--i, 0) * 55ms);
}

@keyframes einreihen {
  from { opacity: 0; transform: translateY(14px); }
}

/* Karten einer Ansicht schweben nacheinander ein (nur beim Öffnen, sie werden nicht neu gezeichnet) */
.ansicht .patienten > *,
.ansicht .raster > * {
  animation: einreihen 0.8s var(--weich) both;
}
.ansicht .patienten > :nth-child(2),
.ansicht .raster > :nth-child(2) {
  animation-delay: 70ms;
}

.ansicht .patienten > :nth-child(3),
.ansicht .raster > :nth-child(3) {
  animation-delay: 140ms;
}

.ansicht .patienten > :nth-child(4),
.ansicht .raster > :nth-child(4) {
  animation-delay: 210ms;
}

.ansicht .patienten > :nth-child(5),
.ansicht .raster > :nth-child(5) {
  animation-delay: 280ms;
}

.ansicht .patienten > :nth-child(6),
.ansicht .raster > :nth-child(6) {
  animation-delay: 350ms;
}

.ansicht .patienten > :nth-child(7),
.ansicht .raster > :nth-child(7) {
  animation-delay: 420ms;
}

.ansicht .patienten > :nth-child(8),
.ansicht .raster > :nth-child(8) {
  animation-delay: 490ms;
}

.ansicht .patienten > :nth-child(9),
.ansicht .raster > :nth-child(9) {
  animation-delay: 560ms;
}

.ansicht .patienten > :nth-child(10),
.ansicht .raster > :nth-child(10) {
  animation-delay: 630ms;
}


.akte-inhalt.reiter-wechsel > * {
  animation: reiterAuf 0.7s var(--weich) both;
}

@keyframes reiterAuf {
  from { opacity: 0; transform: translateY(18px) scale(0.99); filter: blur(8px); }
}

.iconwahl:not([hidden]) {
  animation: aufklappen 0.5s var(--weich) both;
}

@keyframes aufklappen {
  from { opacity: 0; transform: translateY(-8px); clip-path: inset(0 0 100% 0 round 20px); }
  to { clip-path: inset(0 0 0 0 round 20px); }
}

dialog.fenster::backdrop {
  background: rgba(3, 4, 3, 0.62);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.fenster-kopf {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 22px 24px 8px;
}

.fenster-inhalt {
  min-height: 0;
  padding: 12px 24px 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.fenster-fuss {
  position: sticky;
  bottom: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 8px -24px 0;
  padding: 16px 24px 22px;
  border-top: 1px solid var(--linie);
  background: rgba(9, 11, 10, 0.985);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.fuss-rechts {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-left: auto;
}

.feld--kurz {
  max-width: 220px;
}

.feld--emoji {
  padding-inline: 8px;
  text-align: center;
}

/* Auswahl als Chips: echte Optionsfelder, nur anders angezogen */
.wahl {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.wahl label {
  position: relative;
}

.wahl input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.wahl span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--linie);
  background: rgba(180, 226, 220, 0.04);
  color: var(--haut-2);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.25s var(--sanft);
}

.wahl span svg {
  width: 16px;
  height: 16px;
}

.wahl span:hover {
  color: var(--haut);
  border-color: rgba(180, 226, 220, 0.3);
}

.wahl input:checked + span {
  color: #04100f;
  font-weight: 600;
  border-color: rgba(220, 255, 250, 0.5);
  background: radial-gradient(140% 160% at 30% 0%, rgba(255, 255, 255, 0.45), transparent 45%), var(--kittel);
  box-shadow: 0 8px 22px -12px rgba(110, 171, 168, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.wahl input:focus-visible + span {
  outline: 2px solid var(--kittel-hell);
  outline-offset: 3px;
}

.rollenwahl {
  margin-top: 12px;
}

.chip .farbpunkt {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--farbe, rgba(236, 229, 216, 0.35));
}

.chip[aria-pressed='true'] .farbpunkt {
  box-shadow: 0 0 0 2px rgba(4, 16, 15, 0.45);
}

/* Rollen-Chips haben ihren Farbpunkt, der Punkt für "gewählt" entfällt. */
.chip:has(.farbpunkt)[aria-pressed='true']::before {
  display: none;
}

.farben {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.farbe {
  position: relative;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--farbe);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16), 0 6px 14px -8px rgba(0, 0, 0, 0.9);
  cursor: pointer;
  transition: transform 0.25s var(--federnd);
}

.farbe:hover {
  transform: scale(1.08);
}

.farbe[aria-pressed='true'],
.farbe[data-an='true'] {
  outline: 2px solid var(--haut);
  outline-offset: 2px;
}

.farbe--keine {
  background:
    linear-gradient(135deg, transparent 45%, var(--blut-hell) 45%, var(--blut-hell) 55%, transparent 55%),
    rgba(4, 6, 5, 0.6);
}

.farbe--eigen {
  background: var(--farbe, conic-gradient(#e74c3c, #f1c40f, #2ecc71, #3498db, #9b59b6, #e74c3c));
}

.farbe--eigen input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.schalterreihe {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 28px;
}

.rechtegruppe {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.rechtegruppe .gruppe-kopf {
  padding: 0;
}

.schalter:has(input:disabled) {
  color: var(--haut-3);
  cursor: not-allowed;
}

.schalter input:disabled + .bahn {
  opacity: 0.45;
}

.schalter--gefahr input:checked + .bahn {
  background: rgba(184, 55, 45, 0.45);
}

.schalter--gefahr input:checked + .bahn::after {
  background: radial-gradient(circle at 35% 30%, #fff, var(--blut-hell));
  box-shadow: 0 0 14px var(--blut), 0 3px 8px rgba(0, 0, 0, 0.6);
}

.tagliste {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}

.tagzeile {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 8px;
}

/* ───────────── Guthaben, Kasse ───────────── */

.guthaben {
  margin: 14px 0 0;
  font-size: 13.5px;
  text-align: center;
  color: var(--haut-2);
}

.guthaben[data-art='frei'] {
  color: var(--kittel-hell);
}

.konten {
  display: grid;
  gap: 10px;
}

.konto {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 20px;
  background: rgba(4, 6, 5, 0.3);
}

.konto-bild {
  width: 42px;
  height: 42px;
  border-radius: 50%;
}

.konto-name {
  display: grid;
  min-width: 0;
}

.konto-name strong,
.konto-name span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.konto-name span {
  font-size: 12px;
}

.konto-zahlen {
  display: flex;
  gap: 16px;
}

.konto-zahlen span {
  display: grid;
  justify-items: center;
  font: 500 10px/1.2 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--haut-3);
}

.konto-zahlen b {
  font: 760 1.25rem/1 var(--titel);
  font-stretch: 80%;
  color: var(--haut);
}

.konto-zahlen [data-rest='true'] b {
  color: var(--kittel-hell);
}

.konto-knoepfe {
  display: flex;
  gap: 6px;
}

.liste .kasse-server {
  align-items: center;
  justify-content: space-between;
}

.kasse-server-name {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  text-decoration: none;
}

.kasse-server-name .bild {
  padding: 2px;
}

.kasse-server-name .bild .ersatz {
  font-size: 12px;
}

/* ───────────── Schmale Bildschirme: neue Teile ───────────── */

@media (max-width: 900px) {
  .akte-reiter {
    width: 100%;
  }

  .akte-reiter [role='tab'] {
    padding: 0 14px;
  }

  .ich .sprachschalter {
    width: 40px;
    height: 40px;
  }

  .eingang-sprache {
    top: 14px;
    right: 14px;
  }
}

@media (max-width: 560px) {
  dialog.fenster {
    width: 100vw;
    max-height: 92dvh;
    margin: auto 0 0;
    border-radius: 30px 30px 0 0;
  }

  dialog.fenster[open] {
    animation-name: blattHoch;
  }

  dialog.fenster.fenster--zu {
    animation-name: blattRunter;
  }

  @keyframes blattHoch {
    from { opacity: 0.6; transform: translateY(100%); }
  }

  @keyframes blattRunter {
    to { opacity: 0.6; transform: translateY(100%); }
  }

  .fenster-kopf {
    padding: 20px 18px 6px;
  }

  .fenster-inhalt {
    padding: 10px 18px 0;
  }

  .fenster-fuss {
    margin: 8px -18px 0;
    padding: 14px 18px calc(18px + env(safe-area-inset-bottom));
  }

  .fuss-rechts {
    width: 100%;
  }

  .fuss-rechts .knopf {
    flex: 1;
  }

  .konto {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .konto-zahlen,
  .konto-knoepfe {
    grid-column: 1 / -1;
  }

  .konto-zahlen {
    justify-content: space-around;
  }

  .konto-knoepfe .knopf {
    flex: 1;
  }

  .akte-reiter [role='tab'] span {
    display: none;
  }

  .akte-reiter [role='tab'][aria-selected='true'] span {
    display: inline;
  }
}

/* ───────────── Rechtstexte ───────────── */

body.recht {
  background:
    radial-gradient(60% 50% at 15% 8%, rgba(110, 171, 168, 0.16), transparent 70%),
    radial-gradient(50% 45% at 85% 85%, rgba(184, 55, 45, 0.13), transparent 70%),
    var(--nacht);
  background-attachment: fixed;
}

.rechtsseite {
  max-width: 880px;
  margin: 0 auto;
  padding: 22px 20px 56px;
}

.rechtskopf {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
}

.rechtskopf .brotkrume {
  margin: 0;
}

a.sprachschalter {
  text-decoration: none;
}

.rechtstitel {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 0 0 24px;
}

.rechtstitel .bild {
  --durchmesser: 72px;
}

.rechtstitel .leise {
  margin: 10px 0 0;
  font-size: 14px;
}

.rechtstext {
  font-size: 16px;
  line-height: 1.7;
}

.rechtstext h2 {
  margin: 34px 0 10px;
  font-family: var(--titel);
  font-weight: 680;
  font-stretch: 88%;
  font-size: 1.3rem;
  line-height: 1.2;
  color: var(--haut);
}

.rechtstext h2:first-of-type {
  margin-top: 4px;
}

.rechtstext p,
.rechtstext li {
  max-width: 72ch;
  color: var(--haut-2);
}

.rechtstext p {
  margin: 0 0 12px;
}

.rechtstext ul {
  margin: 0 0 14px;
  padding-left: 22px;
}

.rechtstext li {
  margin: 6px 0;
}

.rechtstext li::marker {
  color: var(--kittel);
}

.rechtstext strong {
  font-weight: 600;
  color: var(--haut);
}

.rechtstext a,
.zustimmung a {
  color: var(--kittel-hell);
  text-underline-offset: 3px;
}

.rechtstext table {
  width: 100%;
  margin: 6px 0 12px;
  border-collapse: collapse;
  font-size: 15px;
}

.rechtstext th,
.rechtstext td {
  padding: 10px 12px 10px 0;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--linie);
}

.rechtstext th {
  width: 46%;
  font-weight: 600;
  color: var(--haut);
}

.rechtstext td {
  color: var(--haut-2);
}

.rechtstext .uebersetzung {
  max-width: none;
  margin: 0 0 22px;
  padding: 12px 16px;
  border-radius: 16px;
  border: 1px solid rgba(243, 198, 122, 0.24);
  background: rgba(217, 162, 74, 0.1);
  color: var(--jod-hell);
  font-size: 14px;
}

.rechtsleiste {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 20px;
  margin-top: 26px;
  font-size: 13px;
}

.rechtsleiste a {
  color: var(--haut-3);
  text-decoration: none;
  transition: color 0.2s;
}

.rechtsleiste a:hover {
  color: var(--kittel-hell);
}

.app > .rechtsleiste {
  grid-column: 2;
  margin: 0 0 6px;
}

.zustimmung {
  margin: 14px 0 0;
  font-size: 13px;
  color: var(--haut-3);
}

.eingang .eingang-fuss {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 18px;
  margin: 0;
}

@media (max-width: 900px) {
  .eingang .eingang-fuss {
    position: static;
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .rechtstitel .bild {
    --durchmesser: 56px;
  }

  .rechtstext tr {
    display: block;
    padding: 10px 0;
    border-bottom: 1px solid var(--linie);
  }

  .rechtstext th,
  .rechtstext td {
    display: block;
    width: auto;
    padding: 2px 0;
    border: 0;
  }
}

/* ───────────── Icon vor dem Namen ───────────── */

.namenszeile {
  display: flex;
  gap: 10px;
}

.iconknopf,
.icon {
  font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', var(--text);
}

.iconknopf {
  flex: none;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: var(--r-m);
  border: 1px solid var(--linie);
  background: rgba(4, 6, 5, 0.45);
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.45);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.25s, box-shadow 0.25s;
}

.iconknopf:hover,
.iconknopf[aria-expanded='true'] {
  border-color: rgba(180, 226, 220, 0.45);
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.45), 0 0 0 4px rgba(110, 171, 168, 0.14);
}

.iconknopf .symbol {
  width: 20px;
  height: 20px;
  color: var(--haut-3);
}

.iconwahl {
  max-height: 290px;
  margin-top: 10px;
  padding: 12px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border-radius: var(--r-m);
  border: 1px solid var(--linie);
  background: rgba(4, 6, 5, 0.6);
}

.icongruppe + .icongruppe {
  margin-top: 12px;
}

.icongruppe .gruppe-kopf {
  padding: 0;
}

.icons {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(38px, 1fr));
  gap: 4px;
}

.icon {
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  font-size: 21px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s, transform 0.2s var(--federnd);
}

.icon:hover {
  background: rgba(180, 226, 220, 0.1);
  transform: scale(1.12);
}

.icon[aria-pressed='true'] {
  background: rgba(110, 171, 168, 0.28);
  box-shadow: inset 0 0 0 1px rgba(180, 226, 220, 0.5);
}

.iconeigen {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}

.iconeigen .feld {
  width: 72px;
  min-height: 40px;
  padding: 8px;
}
