/* Skizze 4 (Oli, 19.11.2026): Mischung 3 der gewölbten Fassungen (67 % ohne Wölbung, 33 % leicht gewölbt).
   LET ME IN: inaktiv sieht aus wie gedrückt (flacher, auf der Oberfläche) mit grauer Schrift; aktiv erhoben, beim Drücken flacher,
   ausgelöst beim Loslassen. Dasselbe Erhoben und Drücken bei NIBS und beim Pfeil im NIBS-Chat.
   Immer dieselben sechs Schatten in derselben Reihenfolge, nur ihre Stärke wechselt: jeder Wechsel blendet weich, nichts springt. */
:root {
  --w-0: rgba(0, 0, 0, 0);
  --w-vertieft: inset 3.8px 3.8px 8px rgba(140, 122, 92, .31), inset -3.8px -3.8px 8px rgba(255, 255, 255, .91),
    inset 0 0 0 var(--w-0), inset 0 0 0 var(--w-0), 0 0 0 var(--w-0), 0 0 0 var(--w-0);
  --w-erhoben: inset 0 0 0 var(--w-0), inset 0 0 0 var(--w-0),
    inset .5px .5px .67px rgba(255, 255, 255, .27), inset -.5px -.5px .67px rgba(140, 122, 92, .033),
    4.3px 4.3px 6.5px rgba(140, 122, 92, .37), -4.3px -4.3px 6.5px rgba(255, 255, 255, .94);
  --w-gedrueckt: inset 0 0 0 var(--w-0), inset 0 0 0 var(--w-0),
    inset .33px .33px .5px rgba(255, 255, 255, .2), inset -.33px -.33px .5px rgba(140, 122, 92, .027),
    1.5px 1.5px 3px rgba(140, 122, 92, .30), -1.5px -1.5px 3px rgba(255, 255, 255, .9);
  --w-nichts: inset 0 0 0 var(--w-0), inset 0 0 0 var(--w-0), inset 0 0 0 var(--w-0), inset 0 0 0 var(--w-0), 0 0 0 var(--w-0), 0 0 0 var(--w-0);
  --w-kuppel: linear-gradient(145deg, rgba(255, 255, 255, .073) 0%, rgba(255, 255, 255, 0) 48%, rgba(140, 122, 92, .013) 100%);
  --w-zeit: 320ms cubic-bezier(.25, .1, .25, 1);
  --w-druck: 90ms cubic-bezier(.25, .1, .25, 1);   /* runter geht es schnell wie ein echter Knopf, hoch wieder weich */
}
:root[data-theme="dark"] {
  --w-vertieft: inset 3.8px 3.8px 8px rgba(0, 0, 0, .55), inset -3.8px -3.8px 8px rgba(255, 255, 255, .07),
    inset 0 0 0 var(--w-0), inset 0 0 0 var(--w-0), 0 0 0 var(--w-0), 0 0 0 var(--w-0);
  --w-erhoben: inset 0 0 0 var(--w-0), inset 0 0 0 var(--w-0),
    inset .5px .5px .67px rgba(255, 255, 255, .04), inset -.5px -.5px .67px rgba(0, 0, 0, .08),
    4.3px 4.3px 6.5px rgba(0, 0, 0, .6), -4.3px -4.3px 6.5px rgba(255, 255, 255, .08);
  --w-gedrueckt: inset 0 0 0 var(--w-0), inset 0 0 0 var(--w-0),
    inset .33px .33px .5px rgba(255, 255, 255, .03), inset -.33px -.33px .5px rgba(0, 0, 0, .06),
    1.5px 1.5px 3px rgba(0, 0, 0, .5), -1.5px -1.5px 3px rgba(255, 255, 255, .06);
  --w-kuppel: linear-gradient(145deg, rgba(255, 255, 255, .02) 0%, rgba(255, 255, 255, 0) 48%, rgba(0, 0, 0, .03) 100%);
}

/* Glas-Ebenen aus; ::after trägt stattdessen die Wölbung */
/* ::before trägt in Skizze 5 den zarten Rand (unten) */
html body .tuer .pille:is(#w1,.pille):is(#w2,.pille):is(#w3,.pille):is(#w4,.pille)::after, html body .k-nibs:is(#w1,.k-nibs):is(#w2,.k-nibs):is(#w3,.k-nibs):is(#w4,.k-nibs)::after, html body .nc-senden:is(#w1,.nc-senden):is(#w2,.nc-senden):is(#w3,.nc-senden):is(#w4,.nc-senden)::after {
  content: "" !important; display: block !important; position: absolute !important; inset: 0 !important; z-index: -1 !important;
  border-radius: inherit !important; pointer-events: none !important; box-shadow: none !important;
  background: var(--w-kuppel) !important; opacity: 1 !important; transition: opacity var(--w-zeit) !important;
}

/* NAME und PASSWORD: vertieft, ohne Rand */
html body .tuer input, html body .tuer input:hover, html body .tuer input:focus {
  border-color: transparent !important; background: var(--bg) !important;
  box-shadow: var(--w-vertieft) !important; transition: box-shadow var(--w-zeit), color var(--w-zeit) !important;
}
html body .tuer input:autofill { box-shadow: var(--w-vertieft), 0 0 0 100px var(--bg) inset !important; }
html body .tuer input:-webkit-autofill { -webkit-box-shadow: var(--w-vertieft), 0 0 0 100px var(--bg) inset !important; }

/* gemeinsam für LET ME IN, NIBS und den Pfeil */
html body .tuer .pille:is(#w1,.pille):is(#w2,.pille):is(#w3,.pille):is(#w4,.pille), html body .k-nibs:is(#w1,.k-nibs):is(#w2,.k-nibs):is(#w3,.k-nibs):is(#w4,.k-nibs), html body .nc-senden:is(#w1,.nc-senden):is(#w2,.nc-senden):is(#w3,.nc-senden):is(#w4,.nc-senden) {
  isolation: isolate !important; border: 0 !important; scale: none !important; filter: none !important;
  -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
  transition: box-shadow var(--w-zeit), color var(--w-zeit), background-color var(--w-zeit) !important;
}

/* LET ME IN: inaktiv wie gedrückt (flacher), Schrift grau */
html body .tuer .pille:is(#w1,.pille):is(#w2,.pille):is(#w3,.pille):is(#w4,.pille) {
  position: relative !important; background: var(--bg) !important; background-color: var(--bg) !important;
  box-shadow: var(--w-gedrueckt) !important; color: var(--hinweis) !important;
}
html body .tuer .pille:is(#w1,.pille):is(#w2,.pille):is(#w3,.pille):is(#w4,.pille)[aria-disabled="true"]::after { opacity: .5 !important; }
/* aktiv: erhoben, Schrift dunkel; Hover orange */
html body .tuer .pille:is(#w1,.pille):is(#w2,.pille):is(#w3,.pille):is(#w4,.pille):not([aria-disabled="true"]) { box-shadow: var(--w-erhoben) !important; color: var(--fg) !important; }
@media (hover: hover) { html body .tuer .pille:is(#w1,.pille):is(#w2,.pille):is(#w3,.pille):is(#w4,.pille):not([aria-disabled="true"]):hover { color: var(--accent) !important; } }
html body .tuer .pille:is(#w1,.pille):is(#w2,.pille):is(#w3,.pille):is(#w4,.pille):not([aria-disabled="true"]):focus-visible { color: var(--accent) !important; }

/* NIBS: erhoben, auch im offenen Chat */
html body .k-nibs:is(#w1,.k-nibs):is(#w2,.k-nibs):is(#w3,.k-nibs):is(#w4,.k-nibs), html body .k-nibs:is(#w1,.k-nibs):is(#w2,.k-nibs):is(#w3,.k-nibs):is(#w4,.k-nibs):hover, html.chat body .nc ~ .k-nibs:is(#w1,.k-nibs):is(#w2,.k-nibs):is(#w3,.k-nibs):is(#w4,.k-nibs),
html[data-glas][data-glas-fest].chat body .nc[data-zustand] ~ .k-nibs:is(#w1,.k-nibs):is(#w2,.k-nibs):is(#w3,.k-nibs):is(#w4,.k-nibs) {
  background: var(--bg) !important; box-shadow: var(--w-erhoben) !important;
}

/* Pfeil im Chat: solange der Chat auf- oder zugeht, trägt der wandernde Kreis die Form (Fläche jetzt im Seitengrund);
   ist der Chat offen, steht der Pfeil erhoben da wie NIBS, ohne Rand, das Zeichen orange */
html body .nc { --senden-flaeche: var(--bg) !important; }
html body .nc .nc-senden:is(#w1,.nc-senden):is(#w2,.nc-senden):is(#w3,.nc-senden):is(#w4,.nc-senden) { background: transparent !important; box-shadow: var(--w-nichts) !important; }
html body .nc .nc-senden:is(#w1,.nc-senden):is(#w2,.nc-senden):is(#w3,.nc-senden):is(#w4,.nc-senden)::after { opacity: 0 !important; }
html body .nc[data-zustand="offen"] .nc-senden:is(#w1,.nc-senden):is(#w2,.nc-senden):is(#w3,.nc-senden):is(#w4,.nc-senden) { background: var(--bg) !important; box-shadow: var(--w-erhoben) !important; color: var(--accent) !important; }
html body .nc[data-zustand="offen"] .nc-senden:is(#w1,.nc-senden):is(#w2,.nc-senden):is(#w3,.nc-senden):is(#w4,.nc-senden)::after { opacity: 1 !important; }

/* gedrückt (Maus gehalten, Finger drauf, Leertaste): geht schnell etwas runter, flacher, bleibt auf der Oberfläche; beim Loslassen weich wieder hoch */
html body .tuer .pille:is(#w1,.pille):is(#w2,.pille):is(#w3,.pille):is(#w4,.pille):not([aria-disabled="true"]):is(.gedrueckt, :active),
html body .k-nibs:is(#w1,.k-nibs):is(#w2,.k-nibs):is(#w3,.k-nibs):is(#w4,.k-nibs):is(.gedrueckt, :active), html[data-glas][data-glas-fest].chat body .nc[data-zustand] ~ .k-nibs:is(#w1,.k-nibs):is(#w2,.k-nibs):is(#w3,.k-nibs):is(#w4,.k-nibs):is(.gedrueckt, :active),
html body .nc[data-zustand="offen"] .nc-senden:is(#w1,.nc-senden):is(#w2,.nc-senden):is(#w3,.nc-senden):is(#w4,.nc-senden):is(.gedrueckt, :active) {
  box-shadow: var(--w-gedrueckt) !important; transition: box-shadow var(--w-druck), color var(--w-zeit), background-color var(--w-zeit) !important;
}
html body .tuer .pille:is(#w1,.pille):is(#w2,.pille):is(#w3,.pille):is(#w4,.pille):not([aria-disabled="true"]):is(.gedrueckt, :active)::after,
html body .k-nibs:is(#w1,.k-nibs):is(#w2,.k-nibs):is(#w3,.k-nibs):is(#w4,.k-nibs):is(.gedrueckt, :active)::after,
html body .nc[data-zustand="offen"] .nc-senden:is(#w1,.nc-senden):is(#w2,.nc-senden):is(#w3,.nc-senden):is(#w4,.nc-senden):is(.gedrueckt, :active)::after { opacity: .5 !important; transition: opacity var(--w-druck) !important; }

/* ---------- Skizze 5 (Oli, 19.11.2026) ---------- */
/* ganz zarter oranger Rand beim Hover: Buttons (LET ME IN aktiv, NIBS, Pfeil im offenen Chat), NAME, PASSWORD und das Chat-Feld.
   Bei den Buttons liegt der Rand als eigene Ebene (::before) darüber und blendet über die Deckkraft weich ein und aus. */
:root { --w-orange-zart: rgba(255, 106, 0, 1); }   /* Oli: Deckkraft 100 % (vorher .35, .55, .65, .75) */
html body .tuer .pille:is(#w1,.pille):is(#w2,.pille):is(#w3,.pille):is(#w4,.pille)::before, html body .k-nibs:is(#w1,.k-nibs):is(#w2,.k-nibs):is(#w3,.k-nibs):is(#w4,.k-nibs)::before, html body .nc-senden:is(#w1,.nc-senden):is(#w2,.nc-senden):is(#w3,.nc-senden):is(#w4,.nc-senden)::before {
  content: "" !important; display: block !important; position: absolute !important; inset: 0 !important; z-index: 1 !important;
  border-radius: inherit !important; pointer-events: none !important; background: none !important;
  box-shadow: inset 0 0 0 1px var(--w-orange-zart) !important; opacity: 0 !important; transition: opacity var(--w-zeit) !important;
}
@media (hover: hover) {
  html body .tuer .pille:is(#w1,.pille):is(#w2,.pille):is(#w3,.pille):is(#w4,.pille):not([aria-disabled="true"]):hover::before,
  html body .k-nibs:is(#w1,.k-nibs):is(#w2,.k-nibs):is(#w3,.k-nibs):is(#w4,.k-nibs):hover::before,
  html body .nc[data-zustand="offen"] .nc-senden:is(#w1,.nc-senden):is(#w2,.nc-senden):is(#w3,.nc-senden):is(#w4,.nc-senden):hover::before { opacity: 1 !important; }
  html body .tuer input:hover { border-color: var(--w-orange-zart) !important; }
}
html body .tuer input { transition: box-shadow var(--w-zeit), color var(--w-zeit), border-color var(--w-zeit) !important; }

/* Chat-Feld: keine Linie mehr, die große Pille ist vertieft wie NAME und PASSWORD. Die Mulde (.nc-mulde) folgt in jedem Bild
   der Form des Feldes (Skript unten in index.html), auch beim Auf- und Zugehen: so wächst die Vertiefung mit, nichts springt. */
html body .nc .nc-rand, html body .nc[data-zustand] .nc-rand { background: transparent !important; }
html body .nc .nc-form > .nc-mulde {
  inset: auto; box-sizing: border-box; border: 1px solid transparent; background: transparent; pointer-events: none;
  box-shadow: var(--w-vertieft); will-change: auto; transition: border-color var(--w-zeit);
}
@media (hover: hover) {
  html body .nc[data-zustand="offen"]:has(.nc-feld:hover):not(:has(.nc-senden:hover)) .nc-form > .nc-mulde { border-color: var(--w-orange-zart); } /* über dem Pfeil wie über NIBS: der Rand blendet aus (Oli, 19.11.2026) */
}

/* der wandernde Kreis des Pfeils (Oli, 19.11.2026: „der Pfeil-Button phasenweise noch der alte mit Border“): keine Linie mehr,
   stattdessen ein Kreis in der neuen Form (erhoben, leicht gewölbt), genau so groß und genau dort, wo der Ring war (r 22,5 px um den Pfeil).
   Ist der Chat offen, übernimmt der echte Pfeil-Button am selben Ort; beide blenden ineinander. */
html body .nc .nc-ring { display: none !important; }
html body .nc .nc-form > .nc-kopf {
  position: absolute; inset: auto; left: 0; top: 0; width: var(--k-n); height: var(--k-n); margin: calc(var(--k-n) / -2) 0 0 calc(var(--k-n) / -2); border-radius: 50%;
  background: var(--bg) var(--w-kuppel); box-shadow: var(--w-erhoben); will-change: transform; pointer-events: none;
  opacity: 1; transition: opacity var(--w-zeit) !important;
}
html body .nc[data-zustand="ruhe"] .nc-form > .nc-kopf, html body .nc[data-zustand="offen"] .nc-form > .nc-kopf { opacity: 0; }
html body .nc .nc-form > .nc-pfeil { z-index: 1; }
/* auch die zweite Linie, die beim Auf- und Zugehen mitwächst (.nc-rand-o), fällt weg: die Form zeigt nur noch die Mulde */
html body .nc .nc-form > .nc-rand-o { background: transparent !important; }

/* Runde 2 (Oli, 19.11.2026) */
/* Fehler beim Hover auf den Pfeil: sein Rand (::before) bezog sich auf das ganze Chat-Feld und lag als Ellipse darüber; jetzt auf den Pfeil */
html body .nc-senden:is(#w1,.nc-senden):is(#w2,.nc-senden):is(#w3,.nc-senden):is(#w4,.nc-senden) { position: relative !important; }
/* die Leiste ist 66 px hoch und steht 4 px höher (wegweiser.js: HH 33, HOCH 4); das Feld bekommt innen den neuen Abstand zu den Kreisen */
/* Höhe aus der Größe der Kreise (--k-n: 45 px, am Handy 50 px) plus rundum 10,5 px: 66 px, am Handy 71 px */
html body .nc { height: calc(var(--k-n) + 21px); bottom: calc(var(--k-u) + var(--k-g) / 2 - (var(--k-n) + 21px) / 2 + 4px + var(--tastatur, 0px)); }
html body .nc .nc-feld { padding: 0 10.5px 0 calc(var(--k-n) + 22px); }
/* Pfeil: zuerst 22 px statt 20 (Oli, 19.11.2026), jetzt so groß wie der Zurück-Pfeil im Impressum (siehe unten), beim festen Pfeil im Button und beim wandernden gleich, damit die Übergabe nicht springt */
html body .nc .nc-senden svg { width: var(--k-z); height: var(--k-z); }
html body .nc .nc-form > .nc-pfeil { width: var(--k-z); height: var(--k-z); margin: calc(var(--k-z) / -2) 0 0 calc(var(--k-z) / -2); }
/* Strich und Größe wie beim Zurück-Pfeil im Impressum (Oli, 19.11.2026: „strichstärke von chat pfeil wie pfeil im impressum“, „grösse ebenso gleich“): dieselbe Regel wie .k-b svg in nibs-teile.css, Zeichen var(--k-z), Strich 1,25 px auf dem Bildschirm */
html body :is(.nc .nc-senden svg, .nc .nc-form > .nc-pfeil) * { vector-effect: non-scaling-stroke; stroke-width: 1.25px; }
/* Oli (19.11.2026): solange im Textfeld geklickt ist oder geschrieben wird, bleibt der Rand orange (Fokus), auch ohne Maus darüber */
html body .tuer input:focus { border-color: var(--w-orange-zart) !important; }
html body .nc[data-zustand="offen"]:has(.nc-feld input:focus) .nc-form > .nc-mulde { border-color: var(--w-orange-zart); }

/* Impressum (Oli, 19.11.2026: „auch auf impressum“): der Zurück-Pfeil bei NIBS (#pfeil) erhoben und drückbar wie NIBS, dieselben Regeln */
html body .k-pfeil:is(#w1,.k-pfeil):is(#w2,.k-pfeil):is(#w3,.k-pfeil):is(#w4,.k-pfeil) {
  isolation: isolate !important; border: 0 !important; scale: none !important; filter: none !important;
  -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
  transition: box-shadow var(--w-zeit), color var(--w-zeit), background-color var(--w-zeit) !important;
  background: var(--bg) !important; box-shadow: var(--w-erhoben) !important;
}
html body .k-pfeil:is(#w1,.k-pfeil):is(#w2,.k-pfeil):is(#w3,.k-pfeil):is(#w4,.k-pfeil)::after {
  content: "" !important; display: block !important; position: absolute !important; inset: 0 !important; z-index: -1 !important;
  border-radius: inherit !important; pointer-events: none !important; box-shadow: none !important;
  background: var(--w-kuppel) !important; opacity: 1 !important; transition: opacity var(--w-zeit) !important;
}
html body .k-pfeil:is(#w1,.k-pfeil):is(#w2,.k-pfeil):is(#w3,.k-pfeil):is(#w4,.k-pfeil)::before {
  content: "" !important; display: block !important; position: absolute !important; inset: 0 !important; z-index: 1 !important;
  border-radius: inherit !important; pointer-events: none !important; background: none !important;
  box-shadow: inset 0 0 0 1px var(--w-orange-zart) !important; opacity: 0 !important; transition: opacity var(--w-zeit) !important;
}
@media (hover: hover) { html body .k-pfeil:is(#w1,.k-pfeil):is(#w2,.k-pfeil):is(#w3,.k-pfeil):is(#w4,.k-pfeil):hover::before { opacity: 1 !important; } }
html body .k-pfeil:is(#w1,.k-pfeil):is(#w2,.k-pfeil):is(#w3,.k-pfeil):is(#w4,.k-pfeil):is(.gedrueckt, :active) {
  box-shadow: var(--w-gedrueckt) !important; transition: box-shadow var(--w-druck), color var(--w-zeit), background-color var(--w-zeit) !important;
}
html body .k-pfeil:is(#w1,.k-pfeil):is(#w2,.k-pfeil):is(#w3,.k-pfeil):is(#w4,.k-pfeil):is(.gedrueckt, :active)::after { opacity: .5 !important; transition: opacity var(--w-druck) !important; }

/* Hover ohne Flackern (19.11.2026): beim Hover über NIBS fahren Zurück, Schritt und FOKUS aus NIBS heraus (html.offen). Sie lagen dabei
   im ersten Bild über NIBS; WebKit nahm NIBS den Hover und gab ihn erst rund 200 ms später zurück, der orange Ring blendete aus und
   wieder ein. Wie schon im Planer gedacht („Pfeil und Schritt kommen hinter NIBS hervor“, html:not(.chat) .k-nibs: z-index 10) liegt
   NIBS außerhalb des Chats über ihnen. */
html:not(.chat) body .k-nibs:is(#w1,.k-nibs):is(#w2,.k-nibs):is(#w3,.k-nibs):is(#w4,.k-nibs) { z-index: 10 !important; }

/* Dunkelmodus (Oli, 19.11.2026): Augen und Mund von NIBS im Ton von „Powered by Nibs™“ (--fg-2), sonst verschwindet das Gesicht auf der dunklen Fläche */
:root[data-theme="dark"] body .k-nibs:is(#w1,.k-nibs):is(#w2,.k-nibs):is(#w3,.k-nibs):is(#w4,.k-nibs):not(:hover):not(:focus-visible) { color: var(--fg-2) !important; }
