/* Werkstatt – gemeinsames Design (Tor, Zentrale und alles, was noch dazukommt).
   Idee: Werkzeugwand. Zinkblech-Grund mit Lochraster, Graphit für Text und Bedienteile, Signalgelb nur dort, wo
   etwas an ist oder gleich passiert. Schrift: Archivo (variabel, Breite 62–125 %): breit gesetzt für Überschriften
   und das Typenschild, normal breit für alles andere. Liegt neben dieser Datei (archivo.woff2, SIL OFL). */

@font-face {
  font-family: "Archivo";
  src: url("archivo.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

/* Themen: werkstatt (Werkzeugwand, Graphit und Signalgelb), grau (schlicht, nur Grautöne) und weihnacht (Schneeweiß,
   Tannengrün, Zuckerstangen; Schmuck am Ende der Datei). Hell und dunkel folgen
   dem Gerät, außer data-hell="hell"/"dunkel" ist gesetzt. Farbe heißt immer Zustand: grün, gelb, rot bei den Lampen. */
:root {
  --r: 16px;
  --r-mittel: 12px;
  --r-klein: 8px;
  --schrift: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, monospace;
  --grund: #e7eaee;
  --loch: rgba(26, 30, 36, 0.085);
  --flaeche: #f6f7f9;
  --flaeche-hoch: #ffffff;
  --mulde: #eef0f3;
  --tinte: #171a1f;
  --tinte-2: #39404a;
  --leise: #68717e;
  --kante: #d6dbe1;
  --kante-stark: #c2c9d1;
  --akzent: #f3b600;
  --akzent-tief: #c99500;
  --auf-akzent: #171a1f;
  --schalter-an: #f3b600;
  --schalter-an-schatten: rgba(120, 80, 0, 0.35);
  --knopf: #171a1f;
  --auf-knopf: #ffffff;
  --lampe-gruen: #1c9a5d;
  --lampe-gelb: #e6a100;
  --lampe-rot: #d1392e;
  --lampe-grau: #b3bac3;
  --schraube: #b9c0c8;
  --schraube-rand: #98a1ab;
  --breit: 118%;
  --breit-marke: 125%;
  --schatten: 0 1px 0 rgba(255, 255, 255, 0.9) inset, 0 1px 2px rgba(23, 26, 31, 0.06), 0 10px 28px -16px rgba(23, 26, 31, 0.28);
  --schatten-klein: 0 1px 2px rgba(23, 26, 31, 0.12), 0 2px 6px -2px rgba(23, 26, 31, 0.12);
}
@media (prefers-color-scheme: dark) {
:root:not([data-hell=hell]) {
  --grund: #101215;
  --loch: rgba(255, 255, 255, 0.05);
  --flaeche: #171a1e;
  --flaeche-hoch: #1e2227;
  --mulde: #13161a;
  --tinte: #eceef1;
  --tinte-2: #c3c9d1;
  --leise: #8b94a1;
  --kante: #2a2f36;
  --kante-stark: #383e47;
  --akzent: #ffc53a;
  --akzent-tief: #e0a514;
  --auf-akzent: #15181c;
  --schalter-an: #ffc53a;
  --schalter-an-schatten: rgba(0, 0, 0, 0.35);
  --knopf: #eceef1;
  --auf-knopf: #15181c;
  --lampe-gruen: #35c97f;
  --lampe-gelb: #ffc53a;
  --lampe-rot: #ff6a5e;
  --lampe-grau: #4a515b;
  --schraube: #3a4048;
  --schraube-rand: #4b525c;
  --breit: 118%;
  --breit-marke: 125%;
  --schatten: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 30px -18px rgba(0, 0, 0, 0.8);
  --schatten-klein: 0 1px 2px rgba(0, 0, 0, 0.5), 0 2px 8px -2px rgba(0, 0, 0, 0.5);
}
}
:root[data-hell=dunkel] {
  --grund: #101215;
  --loch: rgba(255, 255, 255, 0.05);
  --flaeche: #171a1e;
  --flaeche-hoch: #1e2227;
  --mulde: #13161a;
  --tinte: #eceef1;
  --tinte-2: #c3c9d1;
  --leise: #8b94a1;
  --kante: #2a2f36;
  --kante-stark: #383e47;
  --akzent: #ffc53a;
  --akzent-tief: #e0a514;
  --auf-akzent: #15181c;
  --schalter-an: #ffc53a;
  --schalter-an-schatten: rgba(0, 0, 0, 0.35);
  --knopf: #eceef1;
  --auf-knopf: #15181c;
  --lampe-gruen: #35c97f;
  --lampe-gelb: #ffc53a;
  --lampe-rot: #ff6a5e;
  --lampe-grau: #4a515b;
  --schraube: #3a4048;
  --schraube-rand: #4b525c;
  --breit: 118%;
  --breit-marke: 125%;
  --schatten: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 30px -18px rgba(0, 0, 0, 0.8);
  --schatten-klein: 0 1px 2px rgba(0, 0, 0, 0.5), 0 2px 8px -2px rgba(0, 0, 0, 0.5);
}
:root[data-thema=grau] {
  --grund: #ebebed;
  --loch: transparent;
  --flaeche: #f6f6f7;
  --flaeche-hoch: #ffffff;
  --mulde: #efeff1;
  --tinte: #1c1d20;
  --tinte-2: #46484e;
  --leise: #75777f;
  --kante: #e0e0e4;
  --kante-stark: #cdced3;
  --akzent: #1c1d20;
  --akzent-tief: #000000;
  --auf-akzent: #ffffff;
  --schalter-an: #2a2b2f;
  --schalter-an-schatten: rgba(0, 0, 0, 0.3);
  --knopf: #1c1d20;
  --auf-knopf: #ffffff;
  --lampe-gruen: #1c9a5d;
  --lampe-gelb: #e6a100;
  --lampe-rot: #d1392e;
  --lampe-grau: #c2c3c8;
  --schraube: transparent;
  --schraube-rand: transparent;
  --breit: 104%;
  --breit-marke: 110%;
  --schatten: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px -14px rgba(0, 0, 0, 0.16);
  --schatten-klein: 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 4px rgba(0, 0, 0, 0.06);
}
@media (prefers-color-scheme: dark) {
:root[data-thema=grau]:not([data-hell=hell]) {
  --grund: #141416;
  --loch: transparent;
  --flaeche: #1b1c1f;
  --flaeche-hoch: #232428;
  --mulde: #17181b;
  --tinte: #ececee;
  --tinte-2: #c4c5ca;
  --leise: #8e9098;
  --kante: #2c2d32;
  --kante-stark: #3a3b41;
  --akzent: #ececee;
  --akzent-tief: #ffffff;
  --auf-akzent: #141416;
  --schalter-an: #e6e6e9;
  --schalter-an-schatten: rgba(0, 0, 0, 0.3);
  --knopf: #ececee;
  --auf-knopf: #141416;
  --lampe-gruen: #35c97f;
  --lampe-gelb: #ffc53a;
  --lampe-rot: #ff6a5e;
  --lampe-grau: #45464c;
  --schraube: transparent;
  --schraube-rand: transparent;
  --breit: 104%;
  --breit-marke: 110%;
  --schatten: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 30px -18px rgba(0, 0, 0, 0.8);
  --schatten-klein: 0 1px 2px rgba(0, 0, 0, 0.5), 0 2px 8px -2px rgba(0, 0, 0, 0.5);
}
}
:root[data-thema=grau][data-hell=dunkel] {
  --grund: #141416;
  --loch: transparent;
  --flaeche: #1b1c1f;
  --flaeche-hoch: #232428;
  --mulde: #17181b;
  --tinte: #ececee;
  --tinte-2: #c4c5ca;
  --leise: #8e9098;
  --kante: #2c2d32;
  --kante-stark: #3a3b41;
  --akzent: #ececee;
  --akzent-tief: #ffffff;
  --auf-akzent: #141416;
  --schalter-an: #e6e6e9;
  --schalter-an-schatten: rgba(0, 0, 0, 0.3);
  --knopf: #ececee;
  --auf-knopf: #141416;
  --lampe-gruen: #35c97f;
  --lampe-gelb: #ffc53a;
  --lampe-rot: #ff6a5e;
  --lampe-grau: #45464c;
  --schraube: transparent;
  --schraube-rand: transparent;
  --breit: 104%;
  --breit-marke: 110%;
  --schatten: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 30px -18px rgba(0, 0, 0, 0.8);
  --schatten-klein: 0 1px 2px rgba(0, 0, 0, 0.5), 0 2px 8px -2px rgba(0, 0, 0, 0.5);
}

/* Weihnachten: Schneeweiß und Tannengrün, Zuckerstangenrot für Signalknöpfe, dazu Schmuck (Zuckerstangen-Streifen oben,
   Lichterkette, leise Schneeflocken im Hintergrund, Zuckerstange an der Marke, Kugeln statt Schrauben). Der Schmuck liegt
   nur am Rand und lässt sich nicht anklicken; die Lampen (grün, gelb, rot) bleiben unverändert. */
:root[data-thema=weihnacht] {
  --grund: #f3efe8;
  --loch: transparent;
  --flaeche: #fbf9f5;
  --flaeche-hoch: #ffffff;
  --mulde: #f1ece3;
  --tinte: #1b231f;
  --tinte-2: #3a4640;
  --leise: #66716b;
  --kante: #e4ddd0;
  --kante-stark: #d1c7b6;
  --akzent: #c8102e;
  --akzent-tief: #8f0b20;
  --auf-akzent: #ffffff;
  --schalter-an: #1f6b45;
  --schalter-an-schatten: rgba(0, 40, 20, 0.35);
  --knopf: #1d4d36;
  --auf-knopf: #ffffff;
  --lampe-gruen: #1c9a5d;
  --lampe-gelb: #e6a100;
  --lampe-rot: #d1392e;
  --lampe-grau: #bdb6aa;
  --schraube: #c8102e;
  --schraube-rand: #8f0b20;
  --breit: 112%;
  --breit-marke: 120%;
  --schatten: 0 1px 0 rgba(255, 255, 255, 0.9) inset, 0 1px 2px rgba(29, 77, 54, 0.06), 0 10px 28px -16px rgba(29, 77, 54, 0.28);
  --schatten-klein: 0 1px 2px rgba(29, 77, 54, 0.12), 0 2px 6px -2px rgba(29, 77, 54, 0.12);
  --schnee: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><defs><path id='f' d='M0-9V9M-7.8-4.5L7.8 4.5M-7.8 4.5L7.8-4.5M-2.6-6.6L0-4L2.6-6.6M-2.6 6.6L0 4L2.6 6.6M-6.9-1L-5.2-1.9L-6.9-4.4M6.9 1L5.2 1.9L6.9 4.4'/></defs><g fill='none' stroke='rgba(70,110,140,0.17)' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'><use href='%23f' transform='translate(34 40)'/><use href='%23f' transform='translate(142 64) scale(.7)'/><use href='%23f' transform='translate(92 152) scale(.9)'/><use href='%23f' transform='translate(176 176) scale(.5)'/><use href='%23f' transform='translate(18 128) scale(.45)'/></g></svg>");
  --lichter: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='96' height='20'><path d='M0 3Q24 11 48 3Q72 11 96 3' fill='none' stroke='%23384640' stroke-width='1.2'/><path d='M12 6v3M36 6v3M60 6v3M84 6v3' stroke='%23384640' stroke-width='2'/><ellipse cx='12' cy='13' rx='3' ry='4.2' fill='%23e23b3b'/><ellipse cx='36' cy='13' rx='3' ry='4.2' fill='%23f2b736'/><ellipse cx='60' cy='13' rx='3' ry='4.2' fill='%232e9a64'/><ellipse cx='84' cy='13' rx='3' ry='4.2' fill='%234a8fe0'/></svg>");
}
@media (prefers-color-scheme: dark) {
:root[data-thema=weihnacht]:not([data-hell=hell]) {
  --grund: #0e1613;
  --loch: transparent;
  --flaeche: #15201b;
  --flaeche-hoch: #1b2822;
  --mulde: #111b17;
  --tinte: #eef1ee;
  --tinte-2: #c6cfca;
  --leise: #8f9b95;
  --kante: #24332c;
  --kante-stark: #33453c;
  --akzent: #d9333f;
  --akzent-tief: #f05a63;
  --auf-akzent: #ffffff;
  --schalter-an: #2e9a64;
  --schalter-an-schatten: rgba(0, 0, 0, 0.35);
  --knopf: #eef1ee;
  --auf-knopf: #0e1613;
  --lampe-gruen: #35c97f;
  --lampe-gelb: #ffc53a;
  --lampe-rot: #ff6a5e;
  --lampe-grau: #45524b;
  --schraube: #d9333f;
  --schraube-rand: #8f0b20;
  --breit: 112%;
  --breit-marke: 120%;
  --schatten: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 30px -18px rgba(0, 0, 0, 0.8);
  --schatten-klein: 0 1px 2px rgba(0, 0, 0, 0.5), 0 2px 8px -2px rgba(0, 0, 0, 0.5);
  --schnee: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><defs><path id='f' d='M0-9V9M-7.8-4.5L7.8 4.5M-7.8 4.5L7.8-4.5M-2.6-6.6L0-4L2.6-6.6M-2.6 6.6L0 4L2.6 6.6M-6.9-1L-5.2-1.9L-6.9-4.4M6.9 1L5.2 1.9L6.9 4.4'/></defs><g fill='none' stroke='rgba(255,255,255,0.075)' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'><use href='%23f' transform='translate(34 40)'/><use href='%23f' transform='translate(142 64) scale(.7)'/><use href='%23f' transform='translate(92 152) scale(.9)'/><use href='%23f' transform='translate(176 176) scale(.5)'/><use href='%23f' transform='translate(18 128) scale(.45)'/></g></svg>");
  --lichter: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='96' height='20'><path d='M0 3Q24 11 48 3Q72 11 96 3' fill='none' stroke='%239fb0a7' stroke-width='1.2'/><path d='M12 6v3M36 6v3M60 6v3M84 6v3' stroke='%239fb0a7' stroke-width='2'/><ellipse cx='12' cy='13' rx='3' ry='4.2' fill='%23ff5a5a'/><ellipse cx='36' cy='13' rx='3' ry='4.2' fill='%23ffc94d'/><ellipse cx='60' cy='13' rx='3' ry='4.2' fill='%2340c47f'/><ellipse cx='84' cy='13' rx='3' ry='4.2' fill='%236aa8ff'/></svg>");
}
}
:root[data-thema=weihnacht][data-hell=dunkel] {
  --grund: #0e1613;
  --loch: transparent;
  --flaeche: #15201b;
  --flaeche-hoch: #1b2822;
  --mulde: #111b17;
  --tinte: #eef1ee;
  --tinte-2: #c6cfca;
  --leise: #8f9b95;
  --kante: #24332c;
  --kante-stark: #33453c;
  --akzent: #d9333f;
  --akzent-tief: #f05a63;
  --auf-akzent: #ffffff;
  --schalter-an: #2e9a64;
  --schalter-an-schatten: rgba(0, 0, 0, 0.35);
  --knopf: #eef1ee;
  --auf-knopf: #0e1613;
  --lampe-gruen: #35c97f;
  --lampe-gelb: #ffc53a;
  --lampe-rot: #ff6a5e;
  --lampe-grau: #45524b;
  --schraube: #d9333f;
  --schraube-rand: #8f0b20;
  --breit: 112%;
  --breit-marke: 120%;
  --schatten: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 30px -18px rgba(0, 0, 0, 0.8);
  --schatten-klein: 0 1px 2px rgba(0, 0, 0, 0.5), 0 2px 8px -2px rgba(0, 0, 0, 0.5);
  --schnee: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><defs><path id='f' d='M0-9V9M-7.8-4.5L7.8 4.5M-7.8 4.5L7.8-4.5M-2.6-6.6L0-4L2.6-6.6M-2.6 6.6L0 4L2.6 6.6M-6.9-1L-5.2-1.9L-6.9-4.4M6.9 1L5.2 1.9L6.9 4.4'/></defs><g fill='none' stroke='rgba(255,255,255,0.075)' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'><use href='%23f' transform='translate(34 40)'/><use href='%23f' transform='translate(142 64) scale(.7)'/><use href='%23f' transform='translate(92 152) scale(.9)'/><use href='%23f' transform='translate(176 176) scale(.5)'/><use href='%23f' transform='translate(18 128) scale(.45)'/></g></svg>");
  --lichter: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='96' height='20'><path d='M0 3Q24 11 48 3Q72 11 96 3' fill='none' stroke='%239fb0a7' stroke-width='1.2'/><path d='M12 6v3M36 6v3M60 6v3M84 6v3' stroke='%239fb0a7' stroke-width='2'/><ellipse cx='12' cy='13' rx='3' ry='4.2' fill='%23ff5a5a'/><ellipse cx='36' cy='13' rx='3' ry='4.2' fill='%23ffc94d'/><ellipse cx='60' cy='13' rx='3' ry='4.2' fill='%2340c47f'/><ellipse cx='84' cy='13' rx='3' ry='4.2' fill='%236aa8ff'/></svg>");
}
:root { color-scheme: light; --fokus: 0 0 0 3px color-mix(in srgb, var(--akzent) 45%, transparent); }
@media (prefers-color-scheme: dark) { :root:not([data-hell=hell]) { color-scheme: dark; } }
:root[data-hell=dunkel] { color-scheme: dark; }

/* Akzent als Schrift (z. B. der aktive Reiter der Navigation, seit W54): gut lesbar auf Fläche und Grund, je Design. */
:root { --akzent-text: #8a6400; }
@media (prefers-color-scheme: dark) { :root:not([data-hell=hell]) { --akzent-text: #ffc53a; } }
:root[data-hell=dunkel] { --akzent-text: #ffc53a; }
:root[data-thema=grau] { --akzent-text: var(--tinte); }
:root[data-thema=weihnacht] { --akzent-text: #c8102e; }
@media (prefers-color-scheme: dark) { :root[data-thema=weihnacht]:not([data-hell=hell]) { --akzent-text: #f05a63; } }
:root[data-thema=weihnacht][data-hell=dunkel] { --akzent-text: #f05a63; }

/* Akzentfarbe im Design „Grau“ (W54): Elias wählt sie in der Zentrale (Einstellungen → Darstellung), sie steckt im Cookie
   werkstatt_design (<thema>.<hell>.<rrggbb>) und kommt als style="--wahl:#rrggbb" mit data-akzent an <html>. Daraus
   werden Knöpfe, Schalter, Links und der aktive Reiter. Die Helligkeit legt OKLCH fest (Farbton und Sättigung bleiben):
   hell L 0.52 mit weißer Schrift, dunkel L 0.78 mit dunkler Schrift, so bleibt jede Farbe lesbar (Kontrast über 4,5:1). */
:root[data-thema=grau][data-akzent] {
  --akzent: var(--wahl);
  --akzent-tief: var(--wahl);
  --akzent-text: var(--wahl);
  --schalter-an: var(--wahl);
  --knopf: var(--wahl);
}
@supports (color: oklch(from red l c h)) {
  :root[data-thema=grau][data-akzent] {
    --akzent: oklch(from var(--wahl) 0.52 c h);
    --akzent-tief: oklch(from var(--wahl) 0.43 c h);
    --akzent-text: oklch(from var(--wahl) 0.5 c h);
    --auf-akzent: #ffffff;
    --schalter-an: oklch(from var(--wahl) 0.56 c h);
    --knopf: oklch(from var(--wahl) 0.5 c h);
    --auf-knopf: #ffffff;
  }
  @media (prefers-color-scheme: dark) {
    :root[data-thema=grau][data-akzent]:not([data-hell=hell]) {
      --akzent: oklch(from var(--wahl) 0.78 c h);
      --akzent-tief: oklch(from var(--wahl) 0.86 c h);
      --akzent-text: oklch(from var(--wahl) 0.8 c h);
      --auf-akzent: #141416;
      --schalter-an: oklch(from var(--wahl) 0.7 c h);
      --knopf: oklch(from var(--wahl) 0.8 c h);
      --auf-knopf: #141416;
    }
  }
  :root[data-thema=grau][data-akzent][data-hell=dunkel] {
    --akzent: oklch(from var(--wahl) 0.78 c h);
    --akzent-tief: oklch(from var(--wahl) 0.86 c h);
    --akzent-text: oklch(from var(--wahl) 0.8 c h);
    --auf-akzent: #141416;
    --schalter-an: oklch(from var(--wahl) 0.7 c h);
    --knopf: oklch(from var(--wahl) 0.8 c h);
    --auf-knopf: #141416;
  }
}

/* ---------------------------------------------------------------- Grundlage */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; }
body {
  font-family: var(--schrift);
  font-size: 16px;
  line-height: 1.5;
  font-weight: 420;
  font-stretch: 100%;
  color: var(--tinte);
  background-color: var(--grund);
  background-image: radial-gradient(var(--loch) 1.3px, transparent 1.6px);
  background-size: 22px 22px;
  background-position: 11px 11px;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}
h1, h2, h3 { margin: 0; font-stretch: var(--breit); letter-spacing: -0.005em; line-height: 1.15; }
h1 { font-size: 27px; font-weight: 760; }
h2 { font-size: 19px; font-weight: 720; }
h3 { font-size: 16px; font-weight: 680; font-stretch: var(--breit); }
p { margin: 0; }
a { color: inherit; text-decoration-color: var(--akzent-tief); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--tinte); }
code, .mono { font-family: var(--mono); font-size: 0.9em; }
.leise { color: var(--leise); font-size: 15px; }
.klein { font-size: 13px; }
::selection { background: color-mix(in srgb, var(--akzent) 45%, transparent); }
:focus-visible { outline: none; box-shadow: var(--fokus); border-radius: var(--r-klein); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* ---------------------------------------------------------------- Typenschild (das Erkennungszeichen) */
.typenschild {
  position: relative;
  background-color: var(--flaeche-hoch);
  border: 1px solid var(--kante-stark);
  border-radius: 14px;
  padding: 18px 26px;
  box-shadow: var(--schatten);
  background-image:
    radial-gradient(circle at 11px 11px, var(--schraube) 0 3.2px, var(--schraube-rand) 3.3px 4.2px, transparent 4.6px),
    radial-gradient(circle at calc(100% - 11px) 11px, var(--schraube) 0 3.2px, var(--schraube-rand) 3.3px 4.2px, transparent 4.6px),
    radial-gradient(circle at 11px calc(100% - 11px), var(--schraube) 0 3.2px, var(--schraube-rand) 3.3px 4.2px, transparent 4.6px),
    radial-gradient(circle at calc(100% - 11px) calc(100% - 11px), var(--schraube) 0 3.2px, var(--schraube-rand) 3.3px 4.2px, transparent 4.6px);
}
.typenschild .marke-gross {
  font-stretch: var(--breit-marke);
  font-weight: 820;
  font-size: 30px;
  letter-spacing: 0.01em;
  line-height: 1;
}
.marke {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-stretch: var(--breit-marke);
  font-weight: 800;
  font-size: 17px;
  letter-spacing: 0.02em;
  color: var(--tinte);
  text-decoration: none;
}
.marke svg { flex: none; }

/* ---------------------------------------------------------------- Platten (Karten) */
.platte {
  background: var(--flaeche);
  border: 1px solid var(--kante);
  border-radius: var(--r);
  box-shadow: var(--schatten);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.platte.eng { padding: 6px 0; gap: 0; }
.platte > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

/* ---------------------------------------------------------------- Knöpfe */
button, .knopf {
  -webkit-appearance: none;
  appearance: none;
  font: inherit;
  font-weight: 650;
  font-size: 16px;
  font-stretch: 105%;
  line-height: 1.2;
  border: 1px solid transparent;
  border-radius: var(--r-mittel);
  padding: 12px 18px;
  min-height: 46px;
  background: var(--knopf);
  color: var(--auf-knopf);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.08s ease, background-color 0.15s ease, box-shadow 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
button:active, .knopf:active { transform: translateY(1px); }
button:disabled { opacity: 0.45; cursor: default; transform: none; }
button.signal, .knopf.signal { background: var(--akzent); color: var(--auf-akzent); box-shadow: inset 0 -2px 0 var(--akzent-tief); }
button.zweit, .knopf.zweit { background: transparent; color: var(--tinte); border-color: var(--kante-stark); }
button.zweit:hover, .knopf.zweit:hover { background: var(--mulde); }
button.gefahr, .knopf.gefahr { background: transparent; color: var(--lampe-rot); border-color: color-mix(in srgb, var(--lampe-rot) 45%, transparent); }
button.klein, .knopf.klein { min-height: 34px; padding: 6px 12px; font-size: 14px; border-radius: 10px; }
button.voll, .knopf.voll { width: 100%; }
button.symbol { min-height: 38px; min-width: 38px; padding: 0; background: transparent; color: var(--tinte-2); border-color: transparent; }
button.symbol:hover { background: var(--mulde); }

/* ---------------------------------------------------------------- Eingaben */
label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 14px; color: var(--tinte-2); }
input[type=text], input[type=password], input[type=email], input[type=search], textarea, select {
  font: inherit;
  font-size: 16px;
  font-weight: 450;
  color: var(--tinte);
  background: var(--mulde);
  border: 1px solid var(--kante);
  border-radius: var(--r-mittel);
  padding: 12px 14px;
  width: 100%;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--akzent-tief); box-shadow: var(--fokus); }
textarea { resize: vertical; line-height: 1.45; }
input.code { font: 700 28px/1 var(--mono); letter-spacing: 0.35em; text-align: center; padding: 14px 8px; }

/* Schalter: Schiebeschalter mit Metall-Knopf */
.schalter {
  -webkit-appearance: none;
  appearance: none;
  position: relative;
  flex: none;
  width: 52px;
  height: 30px;
  margin: 0;
  border-radius: 15px;
  background: var(--kante-stark);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.22);
  cursor: pointer;
  transition: background-color 0.18s ease;
}
.schalter::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(180deg, #ffffff, #e4e7eb);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 0 0 0.5px rgba(0, 0, 0, 0.12);
  transition: transform 0.18s cubic-bezier(0.3, 0.7, 0.4, 1.2);
}
.schalter:checked { background: var(--schalter-an); box-shadow: inset 0 1px 3px var(--schalter-an-schatten); }
.schalter:checked::after { transform: translateX(22px); }
.schalter:disabled { opacity: 0.45; cursor: default; }
.schalter:focus-visible { box-shadow: var(--fokus); border-radius: 15px; }

/* Regler (Schieberegler mit Rastern) */
.regler { display: flex; flex-direction: column; gap: 10px; }
.regler input[type=range] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 30px;
  background: transparent;
  margin: 0;
}
.regler input[type=range]::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--akzent) 0 var(--anteil, 0%), var(--kante-stark) var(--anteil, 0%) 100%);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2);
}
.regler input[type=range]::-moz-range-track { height: 8px; border-radius: 4px; background: var(--kante-stark); }
.regler input[type=range]::-moz-range-progress { height: 8px; border-radius: 4px; background: var(--akzent); }
.regler input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 26px;
  height: 26px;
  margin-top: -9px;
  border-radius: 50%;
  background: linear-gradient(180deg, #ffffff, #e2e5e9);
  border: 1px solid rgba(0, 0, 0, 0.15);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}
.regler input[type=range]::-moz-range-thumb {
  width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 1px solid rgba(0, 0, 0, 0.15); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}
.regler .raster { display: flex; justify-content: space-between; font-size: 12px; color: var(--leise); padding: 0 2px; }
.regler .raster span.an { color: var(--tinte); font-weight: 700; }

/* ---------------------------------------------------------------- Reiter (Untermenüs) */
.reiter {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--mulde);
  border: 1px solid var(--kante);
  border-radius: 14px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.reiter::-webkit-scrollbar { display: none; }
.reiter a, .reiter button {
  flex: none;
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 0;
  background: transparent;
  color: var(--leise);
  font-weight: 620;
  font-size: 15px;
  text-decoration: none;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.reiter a[aria-current=page], .reiter button[aria-selected=true] {
  background: var(--flaeche-hoch);
  color: var(--tinte);
  box-shadow: var(--schatten-klein);
}
.reiter .zahl { font-size: 12px; min-width: 20px; padding: 1px 6px; border-radius: 10px; background: var(--kante); color: var(--tinte-2); text-align: center; }

/* ---------------------------------------------------------------- Zeilen (Listen) */
.zeilen { list-style: none; margin: 0; padding: 0; }
.zeilen > li { display: flex; align-items: center; gap: 14px; padding: 14px 20px; border-top: 1px solid var(--kante); }
.zeilen > li:first-child { border-top: 0; }
.zeilen .text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.zeilen .titel { font-weight: 620; }
.zeilen .unter { font-size: 13.5px; color: var(--leise); }
.zeilen .leer { color: var(--leise); justify-content: center; padding: 22px 20px; }

/* ---------------------------------------------------------------- Lampen, Marken, Hinweise */
.lampe { width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--leise); display: inline-block; }
.lampe.an, .lampe.gruen { background: var(--lampe-gruen); box-shadow: 0 0 0 3px color-mix(in srgb, var(--lampe-gruen) 20%, transparent); }
.lampe.warn, .lampe.gelb { background: var(--lampe-gelb); box-shadow: 0 0 0 3px color-mix(in srgb, var(--lampe-gelb) 25%, transparent); }
.lampe.aus, .lampe.grau { background: var(--lampe-grau); }
.lampe.stoerung, .lampe.rot { background: var(--lampe-rot); box-shadow: 0 0 0 3px color-mix(in srgb, var(--lampe-rot) 20%, transparent); }
.etikett { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; padding: 2px 8px; border-radius: 7px;
  background: var(--mulde); border: 1px solid var(--kante); color: var(--tinte-2); white-space: nowrap; }
.etikett.gelb { background: color-mix(in srgb, var(--lampe-gelb) 20%, var(--flaeche)); border-color: color-mix(in srgb, var(--lampe-gelb) 45%, var(--kante)); color: var(--tinte); }
.etikett.rot { color: var(--lampe-rot); border-color: color-mix(in srgb, var(--lampe-rot) 35%, var(--kante)); background: color-mix(in srgb, var(--lampe-rot) 8%, var(--flaeche)); }
.hinweis { border-radius: var(--r-mittel); padding: 12px 14px; font-size: 15px; font-weight: 520; border: 1px solid var(--kante); background: var(--mulde); }
.hinweis.ok { border-color: color-mix(in srgb, var(--lampe-gruen) 40%, var(--kante)); background: color-mix(in srgb, var(--lampe-gruen) 10%, var(--flaeche)); }
.hinweis.fehler { border-color: color-mix(in srgb, var(--lampe-rot) 45%, var(--kante)); background: color-mix(in srgb, var(--lampe-rot) 9%, var(--flaeche)); color: var(--lampe-rot); }
.hinweis.gelb { border-color: color-mix(in srgb, var(--lampe-gelb) 55%, var(--kante)); background: color-mix(in srgb, var(--lampe-gelb) 13%, var(--flaeche)); }

/* Werte zum Kopieren (Adresse, Schlüssel) */
.wert { display: flex; align-items: center; gap: 8px; background: var(--mulde); border: 1px dashed var(--kante-stark); border-radius: var(--r-mittel);
  padding: 6px 6px 6px 14px; font-family: var(--mono); font-size: 14px; word-break: break-all; }
.wert span { flex: 1; min-width: 0; }

/* Schritte (echte Abfolge) */
ol.schritte { margin: 0; padding: 0; list-style: none; counter-reset: s; display: flex; flex-direction: column; gap: 12px; }
ol.schritte li { counter-increment: s; display: grid; grid-template-columns: 28px 1fr; gap: 12px; align-items: start; }
ol.schritte li::before { content: counter(s); width: 28px; height: 28px; border-radius: 8px; display: grid; place-content: center;
  font-weight: 800; font-size: 14px; font-stretch: var(--breit); background: var(--knopf); color: var(--auf-knopf); }

/* ---------------------------------------------------------------- Weihnachtsschmuck (nur im Design „Weihnachten“)
   Alles liegt am oberen Rand (höchstens 20 px), ist durchklickbar (pointer-events: none) und bewegt sich nicht, wenn das
   Gerät „Bewegung reduzieren“ an hat. */
:root[data-thema=weihnacht] body {
  background-image: var(--schnee);
  background-size: 200px 200px;
  background-position: 0 0;
}
:root[data-thema=weihnacht] body::before,
:root[data-thema=weihnacht] body::after {
  content: "";
  position: fixed;
  left: 0;
  right: 0;
  pointer-events: none;
  z-index: 40;
}
/* Zuckerstangen-Streifen ganz oben */
:root[data-thema=weihnacht] body::before {
  top: 0;
  height: 5px;
  background: repeating-linear-gradient(-45deg, #c8102e 0 7px, #ffffff 7px 14px);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}
/* Lichterkette darunter, leuchtet sanft */
:root[data-thema=weihnacht] body::after {
  top: 2px;
  height: 20px;
  background: var(--lichter) 0 0 / 96px 20px repeat-x;
  animation: lichter 2.6s ease-in-out infinite alternate;
}
@keyframes lichter { from { opacity: 0.72; } to { opacity: 1; } }
/* Zuckerstange neben dem Namen (Marke oben links) */
:root[data-thema=weihnacht] .marke::after {
  content: "";
  flex: none;
  width: 16px;
  height: 24px;
  margin-left: -2px;
  background: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='24' viewBox='0 0 16 24'><path d='M5 22V8.5a4 4 0 0 1 8 0V10' fill='none' stroke='rgba(0,0,0,0.18)' stroke-width='4.6' stroke-linecap='round'/><path d='M5 22V8.5a4 4 0 0 1 8 0V10' fill='none' stroke='%23ffffff' stroke-width='3.6' stroke-linecap='round'/><path d='M5 22V8.5a4 4 0 0 1 8 0V10' fill='none' stroke='%23c8102e' stroke-width='3.6' stroke-dasharray='2.6 2.6'/></svg>") center / contain no-repeat;
}
/* Eingeschaltete Schalter rot-weiß gestreift wie eine Zuckerstange */
:root[data-thema=weihnacht] .schalter:checked {
  background: repeating-linear-gradient(-45deg, #c8102e 0 6px, #f4d6db 6px 12px);
}
