@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url('/fonts/inter.woff2') format('woff2');
}

:root {
  --bg: #fcfcfc;
  --bg-alt: #d9e8f1;
  --bg-muted: #eff4f4;
  --flaeche: #ffffff;
  --flaeche-2: #f4f5f5;
  --tinte: #050419;
  --tinte-alt: #373647;
  --gedimmt: #585765;
  --leise: #8c8c95;
  --zart: #b2b1b8;
  --linie: #e6e6e8;
  --linie-stark: #d5d5da;
  --akzent: #3932DC;
  --akzent-tief: #2a24b0;
  --akzent-weich: #ecebfb;
  --gut: #0b8a4b;
  --gut-weich: #e6f4ec;
  --warn: #8a6d1f;
  --warn-weich: #f6efda;
  --gefahr: #c62a2a;
  --gefahr-weich: #fbe9e9;
  --rund: 10px;
  --rund-gross: 14px;
  --pill: 999px;
  --schatten: 0 1px 2px rgba(5,4,25,.05), 0 14px 34px -22px rgba(5,4,25,.28);
  --schatten-tief: 0 30px 70px -30px rgba(5,4,25,.45);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  --ease: cubic-bezier(.25, 1, .5, 1);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
[hidden] { display: none !important; }
body {
  font-family: var(--font);
  font-size: 16px;
  color: var(--tinte);
  background: var(--bg);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4 { margin: 0; font-weight: 500; line-height: 1.1; letter-spacing: -0.03em; }
a { color: var(--akzent); text-decoration: none; }
::selection { background: var(--akzent); color: #fff; }

/* Buttons: Pille, GROSSBUCHSTABEN, ein Blau; Füllung wechselt beim Hover */
.knopf {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 22px; border: 1px solid transparent; border-radius: var(--pill);
  background: var(--tinte); color: #fcfcfc; font: inherit; font-weight: 500; font-size: 0.78rem;
  letter-spacing: 0.05em; text-transform: uppercase; cursor: pointer; white-space: nowrap;
  transition: background-color .28s var(--ease), color .28s var(--ease), border-color .2s var(--ease), transform .1s;
}
@media (pointer: fine) { .knopf:hover { background: var(--akzent); color: #fff; } }
.knopf:active { transform: translateY(1px); }
.knopf:disabled { opacity: 0.4; cursor: not-allowed; }
.knopf:disabled:hover { background: var(--tinte); color: #fcfcfc; }
.knopf.geist { background: transparent; color: var(--tinte); border-color: var(--linie-stark); }
.knopf.geist:hover { background: var(--akzent); color: #fff; border-color: var(--akzent); }
.knopf.stumm { background: transparent; color: var(--gedimmt); }
.knopf.stumm:hover { background: var(--flaeche-2); color: var(--tinte); }
.knopf.gefahr { background: var(--gefahr); }
.knopf.gefahr:hover { background: #a51f1f; color: #fff; }
.knopf.klein { height: 34px; padding: 0 14px; font-size: 0.68rem; }

/* Eingaben: Pille (einzeilig), 12px-Rechteck (mehrzeilig), Fokus in Blau */
.feld {
  width: 100%; height: 46px; padding: 0 18px; border: 1px solid var(--zart); border-radius: var(--pill);
  background: transparent; font: inherit; font-size: 0.95rem; color: var(--tinte);
  transition: border-color .2s var(--ease); resize: vertical;
}
.feld:focus { outline: none; border-color: var(--akzent); }
.feld::placeholder { color: var(--zart); }
textarea.feld { height: auto; min-height: 96px; padding: 13px 16px; border-radius: 12px; line-height: 1.5; }
label.feld-name { display: block; font-size: 0.7rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.07em; color: var(--gedimmt); margin-bottom: 8px; }

.karte { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--rund-gross); box-shadow: var(--schatten); }

/* Wortmarke: einfarbig, dunkel auf hell / weiß auf dunkel */
.marke-ab { font-weight: 600; letter-spacing: -0.045em; color: var(--tinte); text-decoration: none; line-height: 1; }

.etikett {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: var(--pill);
  font-size: 0.68rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em;
  background: var(--flaeche-2); color: var(--gedimmt); border: 1px solid var(--linie);
}
.etikett.gut { background: var(--gut-weich); color: var(--gut); border-color: transparent; }
.etikett.warn { background: var(--warn-weich); color: var(--warn); border-color: transparent; }
.etikett.akzent { background: var(--akzent-weich); color: var(--akzent-tief); border-color: transparent; }
.punkt { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.wolke { position: fixed; inset: auto 0 24px 0; display: flex; justify-content: center; pointer-events: none; z-index: 60; }
.wolke > div {
  pointer-events: auto; background: var(--tinte); color: #fcfcfc; padding: 12px 20px; border-radius: var(--pill);
  font-size: 0.86rem; font-weight: 400; box-shadow: var(--schatten-tief); opacity: 0; transform: translateY(10px);
  transition: opacity .2s, transform .2s; max-width: 90vw;
}
.wolke > div.zeig { opacity: 1; transform: none; }
.wolke > div.gut { background: #0b5c30; }
.wolke > div.gefahr { background: #7f1d1d; }

/* Seitenübergang: ein deckender, bewegter Himmel statt eines Schleiers.
   wellen.js kopiert den laufenden Himmel Frame für Frame hierher; der Verlauf ist
   nur die Grundfarbe, falls die Kopie noch nicht steht (kein weißer Blitz). */
.wechselhimmel {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: 2147483000; pointer-events: none;
  background: linear-gradient(180deg, #2b57e0 0%, #5c86f2 60%, #9cc0ff 100%);
  opacity: 0; transition: opacity .3s var(--ease);
}
.wechselhimmel.sichtbar { opacity: 1; }

@keyframes sanft-auf { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes schleier-auf { from { opacity: 0; } to { opacity: 1; } }
@keyframes karte-auf { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes sanft-weg { to { opacity: 0; transform: translateY(-6px); } }
.ansicht-weg { animation: sanft-weg .24s var(--ease) both; pointer-events: none; }

/* Sanfte Einblendungen fuer die grossen Umschaltungen (Login -> Editor/Dashboard, Modale, Tabs). */
.uebersicht.an { animation: sanft-auf .5s var(--ease); }
.editor.an { animation: sanft-auf .5s var(--ease); }
#dashboard.an { animation: sanft-auf .5s var(--ease); }
.tabinhalt:not([hidden]) { animation: sanft-auf .34s var(--ease); }
.hinterlegung.auf { animation: schleier-auf .22s ease; }
.hinterlegung.auf .modal { animation: karte-auf .3s var(--ease); }

@media (prefers-reduced-motion: reduce) {
  .wechselhimmel { display: none !important; }
  .uebersicht.an, .editor.an, #dashboard.an, .tabinhalt:not([hidden]),
  .hinterlegung.auf, .hinterlegung.auf .modal, .ansicht-weg { animation: none !important; }
}
