/* Formoteca – ein Stylesheet für alle Seiten.
   Werkstatt-Look: Graphit, Filament-Orange, Raster wie auf Druckbett und Schneidematte.
   Dunkel ist Standard; hell folgt der Systemeinstellung oder dem Knopf oben rechts (data-theme am html-Tag).
   Glas nur für schwebende Teile (Kopfleiste, Sprachmenü, Hinweis, Fenster). Keine Inline-Stile im HTML. */

@font-face { font-family: "Figtree"; src: url("/fonts/figtree-latin-wght.woff2") format("woff2"); font-weight: 300 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Unbounded"; src: url("/fonts/unbounded-latin-wght.woff2") format("woff2"); font-weight: 200 900; font-style: normal; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/fonts/jetbrains-mono-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }

:root {
  --f: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-display: "Unbounded", "Figtree", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --bg: #111316; --surface: #1a1d22; --surface-2: #22262c;
  --line: rgba(255, 255, 255, .08); --line-2: rgba(255, 255, 255, .15);
  --text: #eef0f2; --dim: #b3b9c1; --mute: #7f868f;
  --fil: #ff8a3d; --fil-hi: #ffb27a; --fil-edge: #c95a17; --fil-text: #ff9a55; --on-fil: #1f1205;
  --fil-soft: rgba(255, 138, 61, .13); --fil-glow: rgba(255, 138, 61, .16);
  --t-a: #ff8a3d; --t-b: #a8460f;
  --glass: rgba(22, 25, 29, .74); --glass-line: rgba(255, 255, 255, .1);
  --shadow: 0 18px 50px rgba(0, 0, 0, .38);
  --grid-1: rgba(255, 255, 255, .028); --grid-2: rgba(255, 255, 255, .055);
  --bed: #262b31; --warn: #ff7b72;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f2f1ee; --surface: #ffffff; --surface-2: #f4f3f0;
    --line: rgba(18, 22, 28, .1); --line-2: rgba(18, 22, 28, .18);
    --text: #15181c; --dim: #4c535d; --mute: #7a818b;
    --fil: #ff8a3d; --fil-hi: #ffb27a; --fil-edge: #d4661f; --fil-text: #b44c0b; --on-fil: #1f1205;
    --fil-soft: rgba(255, 138, 61, .15); --fil-glow: rgba(255, 138, 61, .2);
    --t-a: #e8711f; --t-b: #9e3f09;
    --glass: rgba(251, 250, 248, .8); --glass-line: rgba(18, 22, 28, .1);
    --shadow: 0 18px 50px rgba(40, 36, 30, .13);
    --grid-1: rgba(20, 24, 30, .045); --grid-2: rgba(20, 24, 30, .085);
    --bed: #e6e3dd; --warn: #c4372b;
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #f2f1ee; --surface: #ffffff; --surface-2: #f4f3f0;
  --line: rgba(18, 22, 28, .1); --line-2: rgba(18, 22, 28, .18);
  --text: #15181c; --dim: #4c535d; --mute: #7a818b;
  --fil: #ff8a3d; --fil-hi: #ffb27a; --fil-edge: #d4661f; --fil-text: #b44c0b; --on-fil: #1f1205;
  --fil-soft: rgba(255, 138, 61, .15); --fil-glow: rgba(255, 138, 61, .2);
  --t-a: #e8711f; --t-b: #9e3f09;
  --glass: rgba(251, 250, 248, .8); --glass-line: rgba(18, 22, 28, .1);
  --shadow: 0 18px 50px rgba(40, 36, 30, .13);
  --grid-1: rgba(20, 24, 30, .045); --grid-2: rgba(20, 24, 30, .085);
  --bed: #e6e3dd; --warn: #c4372b;
  color-scheme: light;
}

/* ------------------------------------------------------------------ Grundlagen */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--text);
  font: 400 16.5px/1.6 var(--f); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
/* Raster wie auf einer Schneidematte: fein alle 8 px, kräftiger alle 40 px, nach unten ausblendend */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(var(--grid-2) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(90deg, var(--grid-2) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(var(--grid-1) 1px, transparent 1px) 0 0 / 8px 8px,
    linear-gradient(90deg, var(--grid-1) 1px, transparent 1px) 0 0 / 8px 8px;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, .55) 55%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, .55) 55%, transparent 100%);
}
main { flex: 1 0 auto; }
a { color: var(--fil-text); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--fil); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; }
code { font: 500 .88em var(--f-mono); background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: .05em .35em; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.wrap.breit { width: calc(100% - 32px); }
.sr-only {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 50; padding: 10px 14px; border-radius: 10px;
  background: var(--fil); color: var(--on-fil); font-weight: 700; text-decoration: none;
}
.skip:focus { top: 12px; }

/* ------------------------------------------------------------------ Knöpfe */
.btn, .icon-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--text);
  font: 600 15px/1 var(--f); text-decoration: none; cursor: pointer;
  transition: background-color .15s, border-color .15s, transform .15s;
}
.btn { height: 42px; padding: 0 18px; border-radius: 12px; }
.btn:hover, .icon-btn:hover { background: var(--surface-2); border-color: var(--line-2); text-decoration: none; }
.btn:active, .icon-btn:active { transform: translateY(1px); }
.btn.primary { background: var(--fil); border-color: transparent; color: var(--on-fil); }
.btn.primary:hover { background: var(--fil-hi); }
.btn.ghost { background: transparent; }
.btn:disabled, .icon-btn:disabled { opacity: .45; cursor: not-allowed; pointer-events: none; }
.btn .ico, .icon-btn .ico { width: 19px; height: 19px; flex: none; }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; padding: 0; background: transparent; }
.icon-btn.wide { width: auto; padding: 0 11px; gap: 7px; font: 500 13px/1 var(--f-mono); letter-spacing: .04em; }
.ico.moon { display: none; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .ico.sun { display: none; }
  :root:not([data-theme="dark"]) .ico.moon { display: block; }
}
:root[data-theme="light"] .ico.sun { display: none; }
:root[data-theme="light"] .ico.moon { display: block; }

/* ------------------------------------------------------------------ Kopfleiste */
.bar {
  position: sticky; top: 0; z-index: 20;
  background: var(--glass); border-bottom: 1px solid var(--glass-line);
  -webkit-backdrop-filter: blur(16px) saturate(150%); backdrop-filter: blur(16px) saturate(150%);
  padding-top: env(safe-area-inset-top, 0px);
}
.bar-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; border-radius: 10px; }
.brand:hover { text-decoration: none; }
.mark { width: 30px; height: 30px; flex: none; }
.word { font: 600 17px/1 var(--f-display); letter-spacing: -.01em; }
.tools { display: flex; align-items: center; gap: 6px; }
.support { height: 40px; padding: 0 14px; }
.support .ico { color: var(--fil); }

/* Sprachmenü (details/summary, funktioniert auch ohne JavaScript) */
.lang { position: relative; }
.lang summary { list-style: none; }
.lang summary::-webkit-details-marker { display: none; }
.lang[open] summary { background: var(--surface-2); }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; min-width: 200px;
  margin: 0; padding: 6px; list-style: none; border-radius: 16px; box-shadow: var(--shadow);
}
.lang-menu a {
  display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 10px;
  color: var(--text); text-decoration: none; font-weight: 500;
}
.lang-menu a:hover { background: var(--fil-soft); text-decoration: none; }
.lang-menu a[aria-current] { background: var(--surface-2); }
.lang-menu .code {
  font: 500 11.5px/1 var(--f-mono); letter-spacing: .05em; color: var(--mute);
  border: 1px solid var(--line-2); border-radius: 6px; padding: 4px 5px; min-width: 30px; text-align: center;
}
.lang-menu a[aria-current] .code { color: var(--on-fil); background: var(--fil); border-color: transparent; }
.glass {
  background: var(--glass); border: 1px solid var(--glass-line);
  -webkit-backdrop-filter: blur(18px) saturate(150%); backdrop-filter: blur(18px) saturate(150%);
}

/* ------------------------------------------------------------------ Startseite: oben */
.hero {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); align-items: center;
  gap: clamp(28px, 5vw, 64px); padding: clamp(40px, 8vw, 96px) 0 clamp(32px, 6vw, 72px);
}
.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 5px 11px; border-radius: 999px;
  font: 500 12px/1.3 var(--f-mono); letter-spacing: .06em; text-transform: uppercase;
  color: var(--fil-text); background: var(--fil-soft); border: 1px solid rgba(255, 138, 61, .25);
}
.chip.small { padding: 3px 9px; font-size: 11px; }
.dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--fil); }
.dot::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--fil);
  opacity: 0; animation: ping 2.2s cubic-bezier(.2, .6, .3, 1) infinite;
}
@keyframes ping { 0% { transform: scale(.5); opacity: .7; } 80%, 100% { transform: scale(1.6); opacity: 0; } }
/* Name wie gedruckt: Orange mit feinen Schichtlinien. Größe passt sich der Spaltenbreite an (cqi). */
.hero-text { container-type: inline-size; min-width: 0; }
.title {
  margin: 18px 0 14px; font: 700 clamp(40px, 7vw, 80px)/1.02 var(--f-display); letter-spacing: -.035em;
  font-size: min(92px, 14.2cqi);
  background: repeating-linear-gradient(180deg, var(--t-a) 0 .052em, var(--t-b) .052em .068em);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 8px 26px var(--fil-glow));
  padding-bottom: .04em;
}
.slogan { font: 600 clamp(19px, 2.3vw, 24px)/1.35 var(--f); color: var(--text); max-width: 30ch; text-wrap: balance; }
.intro { margin-top: 16px; color: var(--dim); max-width: 58ch; hyphens: auto; -webkit-hyphens: auto; }
.soon { margin-top: 18px; font: 500 13.5px/1.5 var(--f-mono); color: var(--mute); }
.soon::before { content: "› "; color: var(--fil); }

/* Druckbett mit Vase */
.print { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.bed-card {
  position: relative; width: 100%; max-width: 420px; padding: 10px 14px 4px; border-radius: 26px;
  background: radial-gradient(120% 80% at 50% 100%, var(--fil-glow), transparent 62%), var(--surface);
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
.bed-card svg { display: block; width: 100%; height: auto; overflow: visible; }
.print figcaption { font: 500 12.5px/1.4 var(--f-mono); color: var(--mute); font-variant-numeric: tabular-nums; }
.bed { fill: var(--bed); stroke: var(--line-2); stroke-width: 1; }
.bedline { stroke: var(--line-2); stroke-opacity: .6; stroke-width: .7; }
.st-edge { stop-color: var(--fil-edge); }
.st-hi { stop-color: var(--fil-hi); }
.st-mid { stop-color: var(--fil); }
.lay { fill: none; stroke: url(#shade); stroke-width: 3.1; }
.ghost { fill: none; stroke: var(--mute); stroke-opacity: .28; stroke-width: .8; stroke-dasharray: 2 2.6; }
.topface { fill: var(--bed); fill-opacity: .9; stroke: var(--fil-hi); stroke-width: 1.1; }
.noz { transition: transform .12s linear; }
.noz .fan { fill: var(--surface-2); stroke: var(--mute); stroke-width: .8; }
.noz .blk { fill: var(--dim); }
.noz .tip { fill: var(--fil); }
#vase .layers, #vase .topface { transition: opacity .6s ease; }
#vase.clearing .layers, #vase.clearing .topface { opacity: 0; }
/* Maskottchen steht vorn links am Druckbett und schaut der Düse zu (main.js bewegt die Linse) */
.bed-card .bot { position: absolute; left: -10%; bottom: -3%; width: 30%; pointer-events: none; }
.bot-pupils { transition: transform .5s cubic-bezier(.3, .7, .3, 1); }

/* ------------------------------------------------------------------ Startseite: Abschnitte */
.coming, .promise { padding-block: clamp(28px, 5vw, 56px); }
.coming h2, .promise h2, .legal h1 { font: 600 clamp(23px, 3vw, 31px)/1.2 var(--f-display); letter-spacing: -.02em; }
.coming h2, .promise h2 { margin-bottom: 22px; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.card {
  padding: 22px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line);
}
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.card-ico {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px;
  background: var(--fil-soft); color: var(--fil-text);
}
.card-ico .ico { width: 24px; height: 24px; }
.card h3 { font: 600 19px/1.3 var(--f-display); letter-spacing: -.01em; margin-bottom: 8px; }
.card p { color: var(--dim); hyphens: auto; -webkit-hyphens: auto; }
.promises { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.promises li {
  display: grid; grid-template-columns: auto 1fr; column-gap: 12px; row-gap: 2px; align-items: start;
  padding: 16px; border-radius: 16px; border: 1px dashed var(--line-2);
}
.p-ico { grid-row: span 2; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--surface-2); color: var(--fil-text); }
.p-ico .ico { width: 20px; height: 20px; }
.promises b { font-weight: 700; }
.promises li > span:last-child { color: var(--dim); font-size: 15px; line-height: 1.45; }

/* ------------------------------------------------------------------ Fußzeile */
.foot { margin-top: clamp(32px, 6vw, 64px); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom, 0px); }
.foot-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-block: 22px; }
.foot-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--mute); font-size: 14px; }
.foot-brand .mark { width: 22px; height: 22px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.foot-links a { color: var(--dim); font-size: 14.5px; text-decoration: none; }
.foot-links a:hover { color: var(--text); text-decoration: underline; }

/* ------------------------------------------------------------------ Sprachhinweis und Fenster */
.lang-hint {
  position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 40;
  width: min(560px, 100% - 24px); transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 16px; border-radius: 16px;
  box-shadow: var(--shadow); animation: rise .35s cubic-bezier(.2, .7, .3, 1);
}
.lang-hint p { flex: 1; font-size: 15px; }
.lang-hint .btn { height: 38px; padding: 0 14px; font-size: 14.5px; white-space: nowrap; }
@keyframes rise { from { transform: translate(-50%, 16px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }

.dlg {
  width: min(460px, 100% - 24px); padding: 28px; border-radius: 24px; color: var(--text);
  box-shadow: var(--shadow);
}
.dlg::backdrop { background: rgba(8, 9, 11, .5); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.dlg[open] { animation: pop .25s cubic-bezier(.2, .7, .3, 1); }
@keyframes pop { from { transform: translateY(10px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.dlg-x { position: absolute; right: 12px; top: 12px; }
.dlg-ico { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--fil-soft); color: var(--fil-text); margin-bottom: 14px; }
.dlg-ico .ico { width: 24px; height: 24px; }
.dlg h2 { font: 600 21px/1.25 var(--f-display); margin-bottom: 10px; }
.dlg p { color: var(--dim); margin-bottom: 12px; }
.dlg .small { font-size: 14px; }
.dlg .btn.primary { width: 100%; margin-top: 6px; height: 46px; }

/* ------------------------------------------------------------------ Impressum und Datenschutz */
.legal { max-width: 780px; padding-block: 28px 8px; }
.back-row { margin-bottom: 22px; }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--dim); text-decoration: none; font-weight: 500; }
.back .ico { width: 18px; height: 18px; }
.back:hover { color: var(--text); }
.legal h1 { font-size: clamp(28px, 4vw, 40px); margin-bottom: 6px; }
.legal .sub { color: var(--mute); font: 500 13.5px/1.5 var(--f-mono); margin-bottom: 28px; }
.legal h2 { font: 600 19px/1.3 var(--f-display); margin: 34px 0 10px; letter-spacing: -.01em; }
.legal p, .legal ul { margin: 0 0 12px; color: var(--dim); }
.legal li { margin-bottom: 6px; }
.legal b { color: var(--text); }
.legal .addr { font-style: normal; color: var(--text); line-height: 1.7; }
.legal .box { margin: 0 0 8px; padding: 16px 20px; border-radius: 16px; background: var(--fil-soft); border: 1px solid rgba(255, 138, 61, .22); }
.legal .box p, .legal .box ul { margin-bottom: 6px; color: var(--text); }
.legal .box ul { padding-left: 20px; }
.legal .stand { margin-top: 32px; color: var(--mute); font: 500 13px/1.5 var(--f-mono); }

/* ------------------------------------------------------------------ Seite nicht gefunden */
.nf { text-align: center; padding-block: clamp(40px, 8vw, 90px); }
/* Das Maskottchen sucht die Seite: die Linse wandert hin und her */
.nf-bot { display: block; width: clamp(110px, 15vw, 150px); height: auto; margin: 0 auto 4px; }
.nf-bot .bot-pupils { animation: scan 2.8s ease-in-out infinite; }
@keyframes scan { 0%, 100% { transform: translateX(-7px); } 50% { transform: translateX(3px); } }
.nf-code {
  font: 700 clamp(84px, 18vw, 160px)/1 var(--f-display); letter-spacing: -.04em; margin-bottom: 10px;
  background: repeating-linear-gradient(180deg, var(--t-a) 0 .052em, var(--t-b) .052em .068em);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.nf h1 { font: 600 clamp(24px, 3.4vw, 32px)/1.2 var(--f-display); margin-bottom: 10px; }
.nf p { color: var(--dim); max-width: 46ch; margin: 0 auto 22px; }

/* ------------------------------------------------------------------ 3D-Editor
   Links die Bühne (3D-Ansicht), rechts die Werkzeuge. Die Bühne ist in beiden Designs neutralgrau wie in
   Druck-Programmen: Darauf sind das orange Modell und das Raster des Druckbetts immer gut zu sehen. */
.ed-seite .foot { margin-top: 0; }
.ed {
  display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px;
  width: calc(100% - 32px); margin-inline: auto; padding-block: 16px; min-height: 560px;
  height: calc(100vh - 64px); height: calc(100dvh - 64px - env(safe-area-inset-top, 0px));
}
.ed-buehne {
  position: relative; overflow: hidden; border-radius: 22px; border: 1px solid var(--line); box-shadow: var(--shadow);
  background: radial-gradient(120% 95% at 50% 0%, #8b9097 0%, #666a71 52%, #4d5056 100%);
}
.ed-canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; outline: none; }
.ed-canvas:active { cursor: grabbing; }

/* Noch kein Modell: Karte in der Mitte der Bühne */
.ed-leer {
  position: absolute; inset: 0; z-index: 2; margin: auto; width: min(440px, 100% - 32px); height: fit-content;
  max-height: calc(100% - 32px); overflow: auto;
  display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center;
  padding: 28px 24px 24px; border-radius: 22px; box-shadow: var(--shadow); color: var(--text);
  background: var(--glass); border: 1px solid var(--glass-line);
  -webkit-backdrop-filter: blur(18px) saturate(150%); backdrop-filter: blur(18px) saturate(150%);
}
.ed-leer-ico { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 16px; background: var(--fil-soft); color: var(--fil-text); }
.ed-leer-ico .ico { width: 28px; height: 28px; }
.ed-leer h2 { margin-top: 4px; font: 600 22px/1.25 var(--f-display); letter-spacing: -.01em; }
.ed-formate { font: 500 12.5px/1.4 var(--f-mono); letter-spacing: .04em; color: var(--mute); }
.ed-knoepfe { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 8px; }
.ed-ziehen, .ed-privat { font-size: 14.5px; color: var(--dim); text-wrap: balance; }
.ed-privat { margin-top: 2px; font-size: 13.5px; color: var(--mute); }
.ed-ziehen .ico, .ed-privat .ico { display: inline-block; width: 16px; height: 16px; margin-right: 6px; vertical-align: -3px; }
.ed-leer-fehler { color: var(--warn); font-weight: 600; }

/* Über der Ansicht: Maße und „Ansicht zurücksetzen“ (feste Farben, die Bühne ist immer grau) */
.ed-hud {
  position: absolute; left: 12px; right: 12px; top: 12px; z-index: 2; pointer-events: none;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 10px;
}
.ed-hud > * { pointer-events: auto; }
.ed-masse, .ed-home {
  color: #f4f5f6; background: rgba(20, 22, 26, .55); border: 1px solid rgba(255, 255, 255, .14);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.ed-masse { padding: 8px 12px; border-radius: 12px; font: 500 13px/1.2 var(--f-mono); font-variant-numeric: tabular-nums; }
.ed-home:hover { background: rgba(20, 22, 26, .78); border-color: rgba(255, 255, 255, .22); }
.ed-fallen {
  position: absolute; inset: 10px; z-index: 4; display: grid; place-items: center; pointer-events: none;
  border-radius: 16px; border: 2px dashed var(--fil); background: rgba(255, 138, 61, .18); color: #fff;
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.ed-fallen p { display: inline-flex; align-items: center; gap: 10px; font: 600 18px/1.3 var(--f-display); text-shadow: 0 1px 8px rgba(0, 0, 0, .35); }
.ed-fallen .ico { width: 24px; height: 24px; }
.ed-busy {
  position: absolute; inset: 0; z-index: 5; display: grid; place-content: center; justify-items: center; gap: 14px;
  background: rgba(17, 19, 22, .42); color: #fff; font-weight: 600;
}
.ed-kreis { width: 38px; height: 38px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .25); border-top-color: var(--fil); animation: kreisen .8s linear infinite; }
@keyframes kreisen { to { transform: rotate(360deg); } }
.ed-fehler {
  position: absolute; left: 50%; bottom: 14px; z-index: 6; width: max-content; max-width: calc(100% - 24px);
  padding: 11px 16px; border-radius: 14px; font-size: 14.5px; color: var(--text); background: var(--surface);
  border: 1px solid var(--line-2); border-left: 4px solid var(--warn); box-shadow: var(--shadow);
  transform: translateX(-50%); animation: auftauchen .25s cubic-bezier(.2, .7, .3, 1);
}
@keyframes auftauchen { from { transform: translate(-50%, 10px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }

/* Werkzeuge */
.ed-panel { display: flex; flex-direction: column; gap: 12px; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.ed-werkzeuge { display: flex; flex-direction: column; gap: 12px; min-width: 0; margin: 0; padding: 0; border: 0; }
.ed-werkzeuge:disabled { opacity: .5; }
.ed-werkzeuge:disabled .btn:disabled { opacity: 1; }
.ed-sec { padding: 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.ed-sec h2 { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; font: 600 15px/1.2 var(--f-display); letter-spacing: -.005em; }
.ed-sec h2 .ico { width: 19px; height: 19px; flex: none; color: var(--fil-text); }
.ed-sec .btn { height: 38px; padding: 0 12px; gap: 7px; border-radius: 10px; font-size: 14px; }
.ed-sec .btn .ico { width: 17px; height: 17px; }
.ed-breit { width: 100%; }
.ed-sec > :not(h2) + .ed-breit, .ed-sec > :not(h2) + .ed-reihe { margin-top: 8px; }
#andere { margin-top: 12px; }
.ed-reihe { display: flex; flex-wrap: wrap; gap: 8px; }
.ed-reihe > .btn { flex: 1 1 0; min-width: 0; }
.ed-drei { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ed-name { font-weight: 600; overflow-wrap: anywhere; }
.ed-info { margin-top: 2px; font: 500 12.5px/1.5 var(--f-mono); color: var(--mute); }
.ed-tipp { margin-top: 10px; font-size: 13px; line-height: 1.45; color: var(--mute); }
.ed-felder { display: grid; gap: 8px; }
.ed-feld { display: grid; grid-template-columns: minmax(0, 1fr) 140px; align-items: center; gap: 10px; }
.ed-feld-name { display: inline-flex; align-items: center; gap: 9px; min-width: 0; font-size: 14.5px; color: var(--dim); }
.ed-eingabe {
  display: flex; align-items: center; gap: 6px; height: 38px; padding: 0 10px; border-radius: 10px;
  background: var(--bg); border: 1px solid var(--line-2); transition: border-color .15s, box-shadow .15s;
}
.ed-eingabe:focus-within { border-color: var(--fil); box-shadow: 0 0 0 3px var(--fil-soft); }
.ed-eingabe input {
  flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; outline: none; background: transparent; color: var(--text);
  font: 500 14.5px/1 var(--f-mono); font-variant-numeric: tabular-nums; text-align: right;
}
.ed-eingabe input::placeholder { color: var(--mute); }
.ed-eingabe i { font: 500 12px/1 var(--f-mono); color: var(--mute); }
.ed-ax { display: inline-grid; place-items: center; width: 20px; height: 20px; flex: none; border-radius: 6px; font: 500 11px/1 var(--f-mono); color: #10141a; }
.ax-x { background: #ff6b6b; }
.ax-y { background: #4fd18b; }
.ax-z { background: #5aa8ff; }
.ed-check { display: flex; align-items: center; gap: 9px; margin-top: 12px; font-size: 14.5px; color: var(--dim); cursor: pointer; }
.ed-check input { width: 17px; height: 17px; margin: 0; accent-color: var(--fil); }
.ed-check .ico { width: 17px; height: 17px; color: var(--mute); }
.ed-prozent { margin-top: 10px; }
.ed-klein { margin-top: 12px; padding: 12px; border-radius: 12px; background: var(--fil-soft); border: 1px solid rgba(255, 138, 61, .25); }
.ed-klein p { margin-bottom: 10px; font-size: 14px; }
.ed-dreh-liste { display: grid; gap: 8px; }
.ed-dreh { display: grid; grid-template-columns: 20px minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 8px; }
.ed-keine { font-size: 14px; color: var(--mute); }
.ed-schritte { display: grid; gap: 3px; max-height: 232px; overflow-y: auto; margin: 0; padding: 0; list-style: none; }
.ed-schritte:empty { display: none; }
.ed-schritte button {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 10px; border-radius: 9px; cursor: pointer;
  border: 1px solid transparent; background: transparent; color: var(--text); font: 500 14px/1.35 var(--f); text-align: left;
}
.ed-schritte button:hover { background: var(--surface-2); }
.ed-schritte button[aria-current] { background: var(--fil-soft); border-color: rgba(255, 138, 61, .3); }
.ed-schritte .nr { min-width: 18px; font: 500 11.5px/1 var(--f-mono); color: var(--mute); }
.ed-schritte .weg { color: var(--mute); }
.ed-schritte .weg span:last-child { text-decoration: line-through; text-decoration-color: var(--line-2); }
.ed-emp { margin-left: 2px; padding: 3px 7px; border-radius: 999px; background: rgba(31, 18, 5, .14); font: 500 10.5px/1 var(--f-mono); letter-spacing: .05em; text-transform: uppercase; }

/* Mehrere Modelle in einer Datei: auswählen */
.ed-wahl-liste { display: grid; gap: 6px; max-height: min(50vh, 360px); overflow-y: auto; margin: 4px 0 6px; padding: 0; list-style: none; }
.ed-wahl-liste button {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 11px 14px; cursor: pointer;
  border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text);
  font: 600 15px/1.3 var(--f); text-align: left; overflow-wrap: anywhere;
}
.ed-wahl-liste button:hover { background: var(--surface-2); border-color: var(--fil); }
.ed-wahl-liste small { flex: none; font: 500 12px/1 var(--f-mono); color: var(--mute); }

/* ------------------------------------------------------------------ Schmale Bildschirme */
@media (max-width: 920px) {
  .cards { grid-template-columns: 1fr; }
  .promises { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .print { max-width: 380px; width: 100%; margin-inline: auto; }
  .bed-card .bot { left: -3%; width: 28%; }
  .ed { grid-template-columns: 1fr; height: auto; min-height: 0; }
  .ed-buehne { height: 62vh; height: 62svh; min-height: 340px; }
  .ed-panel { overflow: visible; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .word { font-size: 16px; }
  .support span { display: none; }
  .support { width: 40px; padding: 0; }
  .promises { grid-template-columns: 1fr; }
  .lang-hint { flex-wrap: wrap; }
  .lang-hint p { flex-basis: calc(100% - 50px); }
  .foot-in { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
