/* MedType – Seite „Funktionen“: je Funktion eine Vorführung (App auf dem Smartphone, daneben der PC mit dem Dongle)
   und daneben Schritte und Hinweise. Die Vorführungen steuert funktionen.js; hier stehen Aussehen, Zustände und
   Übergänge. Grundlage für das Smartphone sind die Bausteine aus devices.css (.dv-phone, .dv-nav, .dv-tabs …).
   Größen der Szenen in em: Die Schriftgröße folgt der Breite der Bühne (Containerabfrage), so wächst alles gemeinsam. */

.fx-band .doc-hero { max-width: 50rem; }

/* ---------- Abschnitte ---------- */
.fx-main {
  max-width: calc(var(--wide) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 1rem var(--gutter) 3rem;
}
/* Abschnitt: Kopf, Vorführung, Schritte und „Gut zu wissen“ stehen in einem Raster (.fx-split). Die Vorführung kann
   nur innerhalb dieses Rasters mitlaufen und überdeckt deshalb nie den nächsten Abschnitt. */
.fx {
  display: grid; gap: 1.5rem;
  padding: 3rem 0;
  border-top: 1px solid var(--line);
  scroll-margin-top: 1rem;
}
.fx-main > .fx:first-child { border-top: 0; }
.fx-split { display: grid; gap: 1.5rem; grid-template-areas: "head" "demo" "body" "extra"; min-width: 0; }
.fx-extra { grid-area: extra; max-width: 40rem; }
.fx-head, .fx-body { max-width: 40rem; }
.fx-head { grid-area: head; }
.fx-body { grid-area: body; }
.fx-demo { grid-area: demo; margin: 0; min-width: 0; }
.fx h2 {
  font-size: clamp(1.75rem, 1.35rem + 1.7vw, 2.6rem);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -.032em;
  margin: 0 0 .9rem;
  text-wrap: balance;
}
.fx-lead { margin: 0; font-size: 1.1rem; line-height: 1.55; }
.fx-where {
  display: inline-flex; align-items: center; gap: .45rem;
  margin: 1rem 0 0; padding: .3rem .8rem .3rem .35rem;
  border-radius: 99px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: .9rem; font-weight: 600;
}
.fx-where img { width: 1.5rem; height: 1.5rem; border-radius: 22.5%; }
.fx-where b { color: var(--text); font-weight: 650; }

.fx-body h3, .fx-extra h3 {
  margin: 0 0 .6rem;
  color: var(--muted);
  font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
}

/* Schritte wie „Erste Schritte“ in der Hilfe: große rote Zahl, Trennlinien. Während die Vorführung einen Schritt
   zeigt, treten die anderen etwas zurück. */
.fx-steps { list-style: none; counter-reset: fx; margin: 0 0 1.5rem; padding: 0; }
.fx-steps li {
  counter-increment: fx;
  display: grid; grid-template-columns: 1.6rem minmax(0, 1fr); gap: .9rem; align-items: baseline;
  margin: 0; padding: .9rem 0;
  border-top: 1px solid var(--line);
  line-height: 1.5;
  transition: opacity .35s ease;
}
.fx-steps li:first-child { border-top: 0; padding-top: .2rem; }
.fx-steps li::before {
  content: counter(fx);
  color: var(--accent);
  font-size: 1.6rem; font-weight: 800; line-height: 1;
  font-variant-numeric: tabular-nums;
}
.fx-steps:has(.is-now) li:not(.is-now) { opacity: .45; }

/* Gut zu wissen */
.fx-notes {
  list-style: none; display: grid; gap: .55rem;
  margin: 0; padding: 1rem 1.15rem;
  border-radius: var(--radius);
  background: var(--surface-2);
  font-size: .96rem; line-height: 1.5;
}
.fx-notes li { position: relative; margin: 0; padding-left: 1.4rem; }
.fx-notes li::before {
  content: ""; position: absolute; left: .1rem; top: .55em;
  width: .5rem; height: .5rem; border-radius: 50%;
  background: var(--accent);
}

/* Breit: links bzw. rechts die Vorführung, daneben Kopf, Schritte und „Gut zu wissen“ (kompakt). Ist der Text höher,
   läuft die Vorführung beim Lesen mit und bleibt am Ende des Abschnitts stehen; ist sie höher, steht der Text mittig
   daneben (leere Zeilen oben und unten fangen den Unterschied auf). */
@media (min-width: 70rem) {
  .fx { padding: 4.5rem 0; }
  .fx-split {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    grid-template-areas: "demo ." "demo head" "demo body" "demo extra" "demo .";
    grid-template-rows: 1fr auto auto auto 1fr;
    column-gap: 3.5rem; row-gap: 0;
    align-items: start;
  }
  .fx--flip .fx-split {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    grid-template-areas: ". demo" "head demo" "body demo" "extra demo" ". demo";
  }
  /* Nur das Smartphone: schmalere Bühne, mehr Platz für den Text */
  .fx--solo .fx-split { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); }
  .fx--solo.fx--flip .fx-split { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); }
  .fx-head { margin-bottom: 1.75rem; }
  .fx-steps { margin-bottom: 0; }
  .fx-demo { position: sticky; top: 1.5rem; }
  /* „Gut zu wissen“ kompakt unter den Schritten */
  .fx-extra { margin-top: 1.75rem; }
  .fx-extra .fx-notes { gap: .45rem; padding: .85rem 1rem; font-size: .9rem; line-height: 1.45; }
  .fx-extra .fx-notes li { padding-left: 1.2rem; }
  .fx-extra .fx-notes li::before { width: .42rem; height: .42rem; }
}

/* ---------- Bühne ---------- */
.fx-stage {
  --dot: rgba(120, 60, 60, .13);
  position: relative;
  container: fx / inline-size;
  padding: 1.75rem .75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: radial-gradient(var(--dot) 1px, transparent 1.5px) 0 0 / 18px 18px, var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}
@media (prefers-color-scheme: dark) {
  .fx-stage { --dot: rgba(255, 255, 255, .07); }
}
.fx-demo > figcaption { margin-top: .8rem; color: var(--muted); font-size: .92rem; line-height: 1.5; }

/* Szene: schmal untereinander (PC oben, Smartphone darunter), breit nebeneinander. Die Größe folgt der Breite der Bühne
   und der Höhe des Fensters: Szene, aktueller Schritt und Knopf passen zusammen auf einen Bildschirm (--fx-reserve ist
   der Platz für Schrittzeile und Ränder). */
.fx-stage { --fx-reserve: 12.5rem; }
.fx-scene {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 1.2em;
  width: 26em;
  margin-inline: auto;
  font-size: 10px; /* ohne Containerabfragen */
  font-size: min(15px, 100cqi / 26);
  font-size: min(15px, 100cqi / 26, (100vh - var(--fx-reserve)) / 41);
  font-size: min(15px, 100cqi / 26, (100svh - var(--fx-reserve)) / 41);
  line-height: 1.25;
}
.fx-scene .dv-phone { --dv-size: .8em; }
.fx-scene--solo { width: 16em; font-size: min(15px, 100cqi / 16, (100svh - var(--fx-reserve)) / 30); }
.fx-scene--solo .dv-phone { --dv-size: 1em; }
@container fx (min-width: 31rem) {
  /* Breit: das Smartphone steht links vor dem größeren Tablet-PC und überdeckt nur dessen Rand */
  .fx-scene {
    flex-direction: row-reverse; justify-content: center; gap: 0; width: 43em;
    font-size: min(15px, 100cqi / 43, (100svh - var(--fx-reserve)) / 30);
  }
  .fx-scene .dv-phone { --dv-size: 1em; z-index: 2; margin-right: -3em; }
  .fx-scene .fx-pc { font-size: 1.2em; }
  .fx-scene--solo { width: 16em; font-size: min(15px, 100cqi / 16, (100svh - var(--fx-reserve)) / 30); }
}
:where(.fx-scene) svg { display: block; }

/* ---------- PC: robuster Tablet-PC wie auf der Startseite (roter Rahmen mit Griff, dunkle Fachanwendung),
   der Dongle steckt rechts unten seitlich. Maße wie in flow.css, hier in em der Szene. ---------- */
.fx-pc {
  --shell-hi: #e8443b;
  --shell-lo: #b81f22;
  --bumper: #8b8d92;
  --bezel: #141416;
  position: relative; flex: none;
  width: 26em;
}
@media (prefers-color-scheme: dark) {
  .fx-pc { --shell-hi: #c83a33; --shell-lo: #8e181c; --bumper: #5d5f64; --bezel: #0b0b0c; }
}
.fx-pad {
  position: relative;
  width: 21.6em; aspect-ratio: 1380 / 1000;
  filter: drop-shadow(0 1.2em 1.4em rgba(70, 8, 18, .22)) drop-shadow(0 .3em .4em rgba(0, 0, 0, .15));
}
@media (prefers-color-scheme: dark) {
  .fx-pad { filter: drop-shadow(0 1.2em 1.4em rgba(0, 0, 0, .55)); }
}
.fx-pad-art { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.fx-shell-hi { stop-color: var(--shell-hi); }
.fx-shell-lo { stop-color: var(--shell-lo); }
.fx-bumper { fill: var(--bumper); }
.fx-bezel { fill: var(--bezel); }
.fx-cam { fill: #2a2d33; }
.fx-port { fill: #2a2a2c; }

/* Bildschirm (x 120–1260, y 206–890 der Grafik): Werkzeugleiste, nummerierte Abschnitte, Textfeld mit Cursor */
.fx-screen {
  position: absolute;
  left: 8.696%; top: 20.6%; width: 82.609%; height: 68.4%;
  display: flex; flex-direction: column;
  overflow: hidden;
  border-radius: .2em;
  background: #1b1c1f;
  color: #ececee;
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
  font-size: .66em;
}
.fx-screen :where(span, b, i, em, small) { display: block; font-style: normal; }
.fx-t-toolbar { display: flex !important; align-items: stretch; height: 2.5em; flex: none; background: #111214; border-bottom: 1px solid #2c2d31; }
.fx-t-apps {
  display: grid !important; grid-template-columns: repeat(3, .32em); gap: .2em; place-content: center;
  width: 2.6em; border-right: 1px solid #2c2d31;
}
.fx-t-apps i { width: .32em; height: .32em; border-radius: 1px; background: #f2f2f4; }
.fx-t-tool { display: grid !important; justify-items: center; align-content: center; gap: .1em; width: 3.4em; border-right: 1px solid #2c2d31; }
.fx-t-tool svg { width: 1.1em; height: 1.1em; fill: none; stroke: #f2f2f4; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.fx-t-tool em { font-size: .5em; color: #c9c9cd; }
.fx-t-clock { margin-left: auto; display: grid !important; justify-items: end; align-content: center; padding: 0 .7em; line-height: 1.05; }
.fx-t-clock b { font-size: 1.05em; font-weight: 400; }
.fx-t-clock small { font-size: .48em; color: #c9c9cd; }
.fx-t-body { flex: 1; display: flex !important; min-height: 0; }
.fx-t-nav { width: 5em; flex: none; background: #232428; }
.fx-t-nav > span {
  position: relative;
  display: flex !important; align-items: center; gap: .35em;
  padding: .5em .45em;
  border-bottom: 1px solid #303136;
  color: #d9d9dc;
  font-size: .56em; font-weight: 600;
}
.fx-t-nav b { font-size: 1.7em; font-weight: 300; line-height: 1; color: #bcbcc1; }
.fx-t-nav > span:first-child::before { content: ""; position: absolute; left: 0; top: .5em; bottom: .5em; width: .22em; background: #2fbf5b; }
.fx-t-nav .is-on { background: #3a3c42; color: #ffffff; }
.fx-t-nav .is-on b { color: #ffffff; }
.fx-t-main { flex: 1; min-width: 0; display: flex !important; flex-direction: column; padding: .55em .6em .4em; }
.fx-t-card { padding: .45em .6em .6em; border-left: .22em solid #e0261f; background: #2b2c30; }
.fx-t-card > b { font-size: .95em; font-weight: 600; }
.fx-t-card > em { margin-top: .3em; color: #a9a9ae; font-size: .55em; }
.fx-t-doc {
  min-height: 5.6em;
  margin-top: .2em; padding: .35em .45em;
  border-left: .2em solid #2fbf5b;
  background: #1f2023;
  font-size: 1.15em; line-height: 1.35;
  white-space: pre-wrap; overflow-wrap: break-word;
}
.fx-screen .fx-t-doc > span { display: inline; }
.fx-caret {
  display: inline-block !important;
  width: 1.5px; height: 1.1em;
  margin: 0 -1.5px -.2em 0;
  background: #ffffff;
}
.fx-t-pages { display: flex !important; justify-content: center; gap: .3em; margin-top: auto; padding-top: .4em; }
.fx-t-pages i { width: 1em; height: .2em; background: #4a4b50; }
.fx-t-pages .is-on { background: #3b82d6; }

/* Dongle in der weißen Hülle, rechts unten seitlich eingesteckt; LED-Zustände wie am echten Gerät */
.fx-usb {
  position: absolute; left: calc(100% - .35em); top: 78%;
  width: 4.6em; height: auto;
  translate: 0 -50%;
  overflow: visible;
  color: var(--dv-led-blue);
  filter: drop-shadow(0 .15em .2em rgba(0, 0, 0, .25));
}
.fx-case-edge { fill: none; stroke: #cfcfcb; stroke-width: 1; }
/* Funkwellen über der LED, solange Text über Bluetooth ankommt */
.fx-waves {
  position: absolute; left: calc(100% - .5em); top: calc(78% - 3em);
  width: 2.4em; height: auto;
  overflow: visible;
  fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linecap: round;
  opacity: 0;
  transition: opacity .3s ease;
}
.is-air .fx-waves { opacity: 1; }

/* LED-Zustände des Dongles */
.fx-led-on, .fx-led-typing { color: var(--dv-led-green); }
@media (prefers-reduced-motion: no-preference) {
  .fx-led-typing .hs-on { animation: fx-flicker .16s steps(2, jump-none) infinite; }
  .is-air .fx-waves path { animation: fx-wave 1s ease-out infinite; }
  .is-air .fx-waves path:nth-child(2) { animation-delay: .2s; }
  .is-air .fx-waves path:nth-child(3) { animation-delay: .4s; }
}
@keyframes fx-flicker { from { opacity: 1; } to { opacity: .2; } }
@keyframes fx-wave { 0% { opacity: 0; } 30% { opacity: 1; } 100% { opacity: 0; } }

/* ---------- Smartphone: Ergänzungen zu devices.css ---------- */
.fx-phone {
  --kb-bg: #d1d3d9;
  --kb-key: #ffffff;
  --kb-key2: #abb0ba;
  --kb-down: #b9bdc6;
  --app-bubble: rgba(10, 132, 255, .16);
  --app-lift: 0 .5em 1.2em rgba(0, 0, 0, .18);
}
@media (prefers-color-scheme: dark) {
  .fx-phone {
    --kb-bg: #2b2b2e;
    --kb-key: #6b6b70;
    --kb-key2: #47474b;
    --kb-down: #8a8a90;
    --app-bubble: rgba(10, 132, 255, .3);
    --app-lift: 0 .5em 1.2em rgba(0, 0, 0, .6);
  }
}
.fx-phone .dv-app { overflow: hidden; }
.fx-phone .dv-form { display: flex; flex-direction: column; }
.fx-caret-blue {
  display: inline-block !important;
  width: .1em; height: 1.15em;
  margin: 0 -.1em -.2em 0;
  border-radius: 1px;
  background: var(--app-link);
}

/* Fingertipp: Kreis an der angetippten Stelle (Lage setzt funktionen.js) */
.fx-touch {
  position: absolute; z-index: 30; left: 50%; top: 50%;
  width: 2.5em; height: 2.5em; margin: -1.25em 0 0 -1.25em;
  border-radius: 50%;
  background: var(--app-tap);
  box-shadow: 0 0 0 .12em rgba(255, 255, 255, .55);
  opacity: 0;
  pointer-events: none;
}
.fx-touch.is-tap { animation: fx-tap .6s ease-out; }
.fx-touch.is-hold { opacity: 1; transform: scale(.8); transition: left .7s var(--ease-out), top .7s var(--ease-out); }
@keyframes fx-tap {
  0% { opacity: 1; transform: scale(.45); }
  35% { opacity: .9; transform: scale(.8); }
  100% { opacity: 0; transform: scale(1.35); }
}
.is-pressed { filter: brightness(.88); }
@media (prefers-color-scheme: dark) { .is-pressed { filter: brightness(1.35); } }

/* Navigationsleiste: Symbolgruppe rechts (Tastatur ausblenden, Papierkorb) und „+“ */
.fx-roundpair {
  display: flex; align-items: center; gap: .55em;
  height: 1.75em; padding: 0 .55em;
  border-radius: 99px;
  background: var(--app-card);
  box-shadow: 0 .1em .45em rgba(0, 0, 0, .08), inset 0 0 0 1px rgba(120, 120, 128, .12);
}
.fx-roundpair svg { width: .95em; height: .95em; }
.fx-nav-plain { grid-template-columns: auto 1fr auto; }
.fx-back svg { width: .8em; height: .8em; }

/* Verbindungsstatus: sichtbar ist der Eintrag mit .is-on */
.fx-chip > * { transition: opacity .25s ease; }
.fx-chip > :not(.is-on) { opacity: 0; }

/* Großer Titel, Suchfeld und Listen (Bausteine, Einfügen) */
.fx-big { margin: .1em .7em .35em; font-size: 1.05em; font-weight: 800; letter-spacing: -.01em; }
.fx-search {
  display: flex; align-items: center; gap: .35em;
  margin: 0 .7em .5em; padding: .42em .6em;
  border-radius: 99px;
  background: var(--app-fill);
  color: var(--app-muted);
}
.fx-search svg { width: .8em; height: .8em; }
.fx-search em { font-size: .5em; }
.fx-search .fx-q { color: var(--app-text); }
.fx-list { position: relative; margin: 0 .7em; border-radius: .9em; background: var(--app-card); }
.fx-row {
  position: relative;
  display: flex; align-items: center; gap: .5em;
  height: 3.05em;
  padding: 0 .7em;
  background: var(--app-card);
  border-radius: .9em;
  transition: transform .45s var(--ease-out), box-shadow .3s ease, opacity .3s ease;
}
.fx-row::after {
  content: ""; position: absolute; left: .7em; right: 0; bottom: 0;
  height: 1px; background: var(--app-sep);
}
.fx-row:last-child::after { display: none; }
.fx-row-text { flex: 1; min-width: 0; }
.fx-row-text b { font-size: .56em; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fx-row-text em {
  margin-top: .2em;
  color: var(--app-muted);
  font-size: .46em; line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fx-row > svg { width: 1em; height: 1em; color: var(--app-faint); }
.fx-row > .fx-ins { color: var(--app-link); }
.fx-row.is-lift { z-index: 3; box-shadow: var(--app-lift); }
.fx-row.is-lift::after { display: none; }
.fx-row.is-new { animation: fx-new 1.4s ease; }
@keyframes fx-new { 0%, 30% { background: var(--app-bubble); } 100% { background: var(--app-card); } }
.fx-row.is-hidden { display: none; }
.fx-foot { margin: .4em 1.3em 0; color: var(--app-muted); }
.fx-foot em { font-size: .42em; line-height: 1.35; }

/* Fortschritt beim Tippen (Aufbau aus devices.css, hier von funktionen.js geschaltet) */
.fx-phone .dv-progress { transform: translateY(.6em); transition: opacity .3s ease, transform .4s var(--ease-out); }
.fx-phone.is-busy .dv-progress { opacity: 1; transform: none; }
.fx-phone .dv-busy, .fx-phone .dv-cancel { transition: opacity .2s ease; }
.fx-phone .dv-done { transition: opacity .25s ease; }
.fx-phone.is-done .dv-busy, .fx-phone.is-done .dv-cancel { opacity: 0; }
.fx-phone.is-done .dv-done { opacity: 1; }
.fx-phone .dv-pbar i { transform: scaleX(var(--p, 0)); }
.fx-phone .dv-cancel { padding: .3em .6em; border-radius: 99px; background: var(--app-fill); color: var(--app-link); }
.fx-phone .dv-cancel em { font-size: .48em; font-weight: 600; }
.fx-phone .dv-send-on { opacity: 1; transition: opacity .2s ease; }
.fx-phone.is-empty .dv-send-on, .fx-phone.is-busy .dv-send-on { opacity: 0; }
.fx-phone .dv-send-off { opacity: 1; }

/* ---------- Vorschreiben ---------- */
.fx-field {
  position: relative;
  height: 8.6em;
  padding: .5em .6em;
  border-radius: .9em;
  background: var(--app-card);
  overflow: hidden;
}
.fx-field > * { font-size: .58em; line-height: 1.38; }
.fx-field .fx-text { white-space: pre-wrap; overflow-wrap: break-word; }
.fx-field .fx-text > span { display: inline; }
.fx-field .fx-ph { position: absolute; left: 1.03em; right: 1.03em; top: .86em; color: var(--app-faint); }
.fx-field:not(.is-empty) .fx-ph { display: none; }
.fx-hl { background: var(--app-bubble); border-radius: .2em; transition: background-color 1.2s ease; }
.fx-hl.is-faded { background: transparent; }

/* ---------- Live tippen ---------- */
.fx-history {
  flex: 1; min-height: 0;
  display: flex; flex-wrap: wrap; align-content: flex-end; justify-content: flex-end; gap: .3em;
  padding: .5em .7em .55em;
  overflow: hidden;
}
.fx-history > i {
  padding: .3em .55em;
  border-radius: 99px;
  background: var(--app-bubble);
  animation: fx-bubble .35s var(--ease-out) both;
}
.fx-history > i em { font-size: .5em; white-space: pre; }
/* Taste im Verlauf (Pfeile), wiederholte Tasten mit Zähler */
.fx-history > .fx-keychip { display: flex; align-items: center; gap: .2em; background: var(--app-fill); color: var(--app-muted); }
.fx-keychip svg { width: .78em; height: .78em; }
.fx-keychip em { font-weight: 600; font-variant-numeric: tabular-nums; }
@keyframes fx-bubble { from { opacity: 0; transform: translateY(.8em) scale(.9); } to { opacity: 1; transform: none; } }
.fx-liveline {
  display: flex; align-items: center; gap: .4em;
  margin: 0 .7em; padding: .45em .6em;
  border-radius: 99px;
  background: var(--app-fill);
}
.fx-liveline > svg { width: .9em; height: .9em; color: var(--app-link); }
.fx-liveline .fx-text { flex: 1; min-width: 0; font-size: .56em; white-space: pre; overflow: hidden; }
.fx-liveline .fx-text > span { display: inline; }
.fx-badge { display: flex !important; align-items: center; gap: .3em; color: var(--app-muted); }
.fx-badge::before { content: ""; width: .45em; height: .45em; border-radius: 50%; background: var(--app-green); }
.fx-badge em { font-size: .44em; font-weight: 600; }
.fx-wave { display: flex !important; align-items: center; gap: .1em; height: .9em; }
.fx-wave i { width: .12em; height: 30%; border-radius: 99px; background: var(--app-link); }
@media (prefers-reduced-motion: no-preference) {
  .is-dictating .fx-wave i { animation: fx-voice .5s ease-in-out infinite alternate; }
  .is-dictating .fx-wave i:nth-child(2) { animation-delay: .15s; }
  .is-dictating .fx-wave i:nth-child(3) { animation-delay: .3s; }
  .is-dictating .fx-wave i:nth-child(4) { animation-delay: .1s; }
}
@keyframes fx-voice { from { height: 25%; } to { height: 100%; } }
.fx-liveline .fx-wave { display: none !important; }
.is-dictating .fx-liveline .fx-wave { display: flex !important; }
.is-dictating .fx-liveline > svg { display: none; }
.fx-arrows { display: flex; gap: .45em; padding: .55em .7em; }
.fx-arrows > span {
  display: grid; place-items: center;
  width: 1.95em; height: 1.95em; border-radius: 50%;
  background: var(--app-fill);
  color: var(--app-link);
}
.fx-arrows svg { width: .85em; height: .85em; }

/* Bildschirmtastatur (Deutsch) */
.fx-kb { flex: none; padding: .45em .22em .4em; border-radius: 1em 1em 0 0; background: var(--kb-bg); }
.fx-kb-row { display: flex; justify-content: center; gap: .16em; }
.fx-kb-row + .fx-kb-row { margin-top: .3em; }
.fx-key {
  display: grid; place-items: center;
  width: 1.04em; height: 1.55em;
  border-radius: .24em;
  background: var(--kb-key);
  box-shadow: 0 .07em 0 rgba(0, 0, 0, .28);
  color: var(--app-text);
}
.fx-key em { font-size: .58em; }
.fx-key svg { width: .7em; height: .7em; }
.fx-key--wide { width: 1.6em; background: var(--kb-key2); }
.fx-key--mode { width: 2.6em; background: var(--kb-key2); }
.fx-key--mode em { font-size: .46em; }
.fx-key--space { flex: 1; max-width: 6.2em; }
.fx-key--ret { width: 2.6em; background: var(--kb-key2); }
.fx-key.is-down { background: var(--kb-down); }
.fx-kb-extra { display: flex; justify-content: space-between; padding: .35em .55em 0; color: var(--app-text); }
.fx-kb-extra svg { width: 1.05em; height: 1.05em; }
.fx-mic { display: grid; place-items: center; width: 1.6em; height: 1.6em; border-radius: 50%; transition: background-color .2s ease, color .2s ease; }
.is-dictating .fx-mic { background: var(--app-link); color: #ffffff; }

/* ---------- Blätter (von unten) ---------- */
.fx-dim { position: absolute; z-index: 10; inset: 0; background: rgba(0, 0, 0, .25); opacity: 0; transition: opacity .35s ease; pointer-events: none; }
.fx-sheet {
  position: absolute; z-index: 11; left: 0; right: 0; top: 4.2em; bottom: 0;
  padding: .45em .7em;
  border-radius: 1.4em 1.4em 0 0;
  background: var(--app-sheet);
  box-shadow: 0 -.3em 1.2em rgba(0, 0, 0, .14);
  transform: translateY(105%);
  transition: transform .5s var(--ease-out);
}
.is-sheet .fx-dim { opacity: 1; }
.is-sheet .fx-sheet { transform: none; }
.fx-sheet .fx-list, .fx-sheet .fx-row { background: var(--app-sheet-card); }
.fx-sheet .fx-list { margin: 0; }
.fx-sheet .fx-search { margin: 0 0 .55em; }
.fx-sheetnav { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; margin-bottom: .5em; }
.fx-sheetnav > b { grid-column: 2; font-size: .58em; font-weight: 700; white-space: nowrap; }
.fx-sheetnav > :first-child { justify-self: start; }
.fx-sheetnav > :last-child { justify-self: end; }
.fx-sheetnav .dv-pill { color: var(--app-text); }
.fx-sheetnav .fx-save { background: var(--app-blue); color: #ffffff; transition: opacity .2s ease; }
.fx-save.is-off { opacity: .35; }
.fx-input {
  display: block;
  padding: .55em .7em;
  border-radius: .8em;
  background: var(--app-sheet-card);
}
.fx-input > em { font-size: .56em; line-height: 1.35; white-space: pre-wrap; }
.fx-input .fx-ph { color: var(--app-faint); }
.fx-input--tall { height: 6.2em; }
.fx-sheet .dv-sec { margin: .55em .6em .3em; }
.fx-sheet .dv-sec:first-of-type { margin-top: 0; }

@media print {
  .fx-demo { display: none; }
  .fx { display: block; }
}

/* ---------- Ergänzungen: Zähler, Seiten, Zustände ---------- */
.fx-art { display: block; }
.fx-grow { flex: 1; min-height: 0; }
.fx-pcount { color: var(--app-muted); font-size: .42em; font-variant-numeric: tabular-nums; }
.fx-input .fx-caret-blue { display: none !important; }
.fx-input.is-focus .fx-caret-blue { display: inline-block !important; }
.fx-input > em > span { display: inline; }
@media (prefers-reduced-motion: no-preference) {
  .fx-caret, .fx-caret-blue { animation: fx-blink 1.06s steps(2, jump-none) infinite; }
}
@keyframes fx-blink { from { opacity: 1; } to { opacity: 0; } }

/* ---------- Felder in Bausteinen (MedType 1.3): leere Stellen im Text, Leiste mit Vorschlägen über der Tastatur ---------- */
.fx-phone {
  --slot-bg: #e5e5ea;
  --slot-line: #8e8e93;
  --slot-text: #3a3a3c;
  --tok-text: #0058b0;
  --slot-fill: rgba(0, 122, 255, .18);
  --slot-fill-on: rgba(0, 122, 255, .28);
  --pick: #0071e3;
}
@media (prefers-color-scheme: dark) {
  .fx-phone {
    --slot-bg: #3a3a3c; --slot-line: #8e8e93; --slot-text: #e5e5ea; --tok-text: #a8d1ff; --pick: #0a6dd9;
    --slot-fill: rgba(10, 132, 255, .32); --slot-fill-on: rgba(10, 132, 255, .45);
  }
}
.fx-field .fx-slot {
  display: inline-block;
  padding: 0 .3em;
  border: 1px dashed var(--slot-line);
  border-radius: .35em;
  background: var(--slot-bg);
  color: var(--slot-text);
  line-height: 1.3;
  transition: background-color .25s ease, border-color .25s ease, color .25s ease;
}
.fx-field .fx-slot.is-active { border-color: var(--app-link); background: transparent; color: var(--app-muted); }
/* Gefüllt: getönt und halbfett wie in der App; das aktuelle Feld kräftiger getönt und dick unterstrichen */
.fx-field .fx-slot.is-filled { padding: 0 .1em; border: 0; border-radius: .15em; background: var(--slot-fill); color: var(--tok-text); font-weight: 600; }
.fx-field .fx-slot.is-filled.is-active { background: var(--slot-fill-on); text-decoration: underline .14em var(--app-link); text-underline-offset: .18em; }
/* Liste: Abzeichen „2 Felder“ und Feldnamen in der Vorschau */
.fx-row-text b .fx-tag {
  display: inline-block;
  margin-left: .45em; padding: .05em .4em;
  border-radius: .4em;
  background: var(--app-bubble); color: var(--tok-text);
  font-size: .82em; font-weight: 650;
  vertical-align: .05em;
}
.fx-row-text em .fx-fname { display: inline; color: var(--tok-text); font-weight: 650; }
/* Leiste und Tastatur als ein Block mit oben abgerundeten Ecken, kommt beim Ausfüllen von unten */
.fx-fill {
  position: absolute; z-index: 6; left: 0; right: 0; bottom: 0;
  border-radius: 1em 1em 0 0;
  background: var(--kb-bg);
  box-shadow: 0 -.2em .8em rgba(0, 0, 0, .08);
  transform: translateY(105%);
  transition: transform .45s var(--ease-out);
}
.is-filling .fx-fill { transform: none; }
.fx-fill .fx-kb { border-radius: 0; padding-top: .35em; }
.fx-fillhead { display: flex !important; align-items: center; gap: .4em; padding: .45em .6em .1em .75em; }
.fx-fillhead b { font-size: .54em; font-weight: 650; white-space: nowrap; }
.fx-fillhead em { flex: 1; color: var(--app-muted); font-size: .46em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.fx-minisend {
  display: grid !important; place-items: center;
  width: 1.75em; height: 1.75em; border-radius: 50%;
  background: var(--app-off-bg); color: var(--app-off-text);
  transition: background-color .25s ease, color .25s ease;
}
.fx-minisend svg { width: .8em; height: .8em; }
.fx-minisend.is-on { background: var(--app-blue); color: #ffffff; }
/* „Weiter“ bei Mehrfachauswahl, solange es nicht das letzte Feld ist */
.fx-next {
  display: none !important; align-items: center; gap: .15em;
  height: 1.75em; padding: 0 .45em 0 .7em;
  border-radius: 99px;
  background: var(--app-blue); color: #ffffff;
}
.fx-next em { font-size: .5em; font-weight: 650; }
.fx-next svg { width: .7em; height: .7em; }
.is-next .fx-next { display: flex !important; }
.is-next .fx-minisend { display: none !important; }
.fx-chips { display: flex !important; gap: .3em; padding: .35em .6em .1em; overflow: hidden; }
.fx-chips > span {
  flex: none;
  display: flex !important; align-items: center; gap: .25em;
  padding: .38em .62em;
  border-radius: 99px;
  background: var(--kb-key);
  box-shadow: 0 .07em 0 rgba(0, 0, 0, .18);
  color: var(--app-text);
  transition: background-color .2s ease, color .2s ease;
}
.fx-chips em { font-size: .5em; white-space: nowrap; }
.fx-chips > .is-sel { background: var(--pick); color: #ffffff; box-shadow: none; }
.fx-chips > .is-sel em { font-weight: 650; }
.fx-chips > .is-sel em::before { content: "✓ "; content: "✓ " / ""; }
/* Hinweis „Kommt mit Version 1.3“ */
.fx-soon {
  display: inline-flex; align-items: center; gap: .4rem;
  margin: 0 0 .9rem; padding: .25rem .7rem;
  border-radius: 99px;
  background: var(--accent-soft); color: var(--accent);
  font-size: .85rem; font-weight: 700;
}

/* Schrittzeile in der Bühne: Nummer und Text des Schritts, den die Vorführung gerade zeigt, daneben Anhalten/Weiter */
.fx-bar {
  display: grid; grid-template-columns: 1.6rem minmax(0, 1fr) auto; gap: .9rem; align-items: center;
  margin: 1.4rem -.75rem -1.75rem; padding: .85rem 1rem .85rem 1.25rem;
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
}
.fx-now-no { color: var(--accent); font-size: 1.6rem; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.fx-now-text { margin: 0; display: flex; align-items: center; font-size: .95rem; line-height: 1.45; }
.fx-now.is-new .fx-now-no, .fx-now.is-new .fx-now-text { animation: fx-step-in .35s var(--ease-out); }
@keyframes fx-step-in { from { opacity: 0; transform: translateY(.3rem); } to { opacity: 1; transform: none; } }
.fx-now { display: contents; }
.fx-pause {
  display: grid; place-items: center;
  width: 2.75rem; height: 2.75rem;
  border: 1px solid var(--line); border-radius: 50%;
  background: var(--surface); color: var(--text);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease;
}
.fx-pause svg { width: 1.1rem; height: 1.1rem; }
.fx-pause:hover { border-color: var(--accent); background: var(--accent-soft); }
.fx-pause:active { transform: scale(.96); }
.fx-pause:focus-visible { border-radius: 50%; }

/* Angehalten: Blinken und Flackern stehen still (Übergänge hält funktionen.js über getAnimations an) */
.fx-demo.is-paused .fx-scene *,
.fx-demo.is-paused .fx-scene *::before,
.fx-demo.is-paused .fx-scene *::after { animation-play-state: paused !important; }
