/* Rahmen der App: Navigation, Hero, Formulare, Dialoge, Meldungen, Streamer-Modus */

/* ---------- Streamer-Modus ---------- */
html[data-streamer="on"] [data-s],
html[data-streamer="on"] .s-auto {
  filter: blur(var(--s-blur));
  user-select: none;
  transition: filter .2s;
}
html[data-streamer="on"] [data-s="media"] { filter: blur(calc(var(--s-blur) * 2.6)) saturate(.7); }
html[data-streamer="on"] [data-s="field"] { filter: blur(calc(var(--s-blur) * .8)); }
/* Große Schrift bleibt bei gleicher Unschärfe lesbar und braucht deshalb mehr davon. */
html[data-streamer="on"] .hero h1 [data-s] { filter: blur(calc(var(--s-blur) * 3.4)); }
html[data-streamer="on"] .stats strong[data-s] { filter: blur(calc(var(--s-blur) * 1.5)); }
html[data-streamer="on"] [data-s]::selection,
html[data-streamer="on"] .s-auto::selection { background: transparent; color: transparent; }
html[data-streamer="on"] input[data-s]::placeholder { color: transparent; }

.stream-btn.is-on {
  color: var(--amber) !important;
  background: rgba(242, 194, 102, .14);
}
.stream-label { font-size: .8rem; font-weight: 600; }

/* ---------- Oberste Leiste ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  height: 3px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: 0 50%;
}

.topbar {
  position: sticky;
  top: 14px;
  z-index: 50;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  height: var(--bar-height);
  margin: var(--bar-top) var(--bar-side) calc(var(--inset) - var(--bar-height) - var(--bar-top));
  padding: 0 7px 0 14px;
  color: var(--nav-ink);
  background: var(--nav-bg);
  border: 1px solid var(--nav-line);
  border-radius: var(--radius);
  box-shadow: 0 8px 28px rgba(9, 16, 32, .16);
  backdrop-filter: blur(18px) saturate(1.4);
  transition: margin .35s var(--ease), box-shadow .25s;
  animation: bar-in .7s var(--ease) both;
}
.topbar.is-scrolled {
  margin-inline: max(var(--bar-side), calc((100% - 1240px) / 2));
  box-shadow: 0 12px 36px rgba(3, 6, 14, .4);
}
.topbar .brand { justify-self: center; }

.nav, .nav-side { display: flex; align-items: center; gap: 2px; min-width: 0; }
.nav-side { justify-content: flex-end; }
.mobile-side { display: none; align-items: center; justify-content: flex-end; gap: 4px; }

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 10px;
  color: var(--nav-ink);
  background: none;
  border: 0;
  border-radius: 8px;
  font-size: .9rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  list-style: none;
  transition: background .15s, color .15s;
}
.nav-link::-webkit-details-marker { display: none; }
.nav-link:hover { color: var(--nav-strong); background: var(--nav-hover); }
.nav-link.is-active { color: var(--nav-strong); background: var(--nav-hover); }
.nav-link .i { width: 16px; height: 16px; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 42px;
  margin-left: 6px;
  padding: 0 5px 0 13px;
  color: #fff;
  background: var(--pill-bg);
  border: 0;
  border-radius: var(--radius-small);
  font-size: .86rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  list-style: none;
  transition: background .15s;
}
.pill:hover { background: var(--pill-hover); }
.pill::-webkit-details-marker { display: none; }
.pill-name { max-width: 110px; overflow: hidden; text-overflow: ellipsis; }
.pill-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: var(--accent-ink);
  background: var(--accent);
  border-radius: 8px;
}
.pill-icon .i { width: 16px; height: 16px; }

.topbar details { position: relative; }
.drop {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 70;
  min-width: 220px;
  padding: 8px;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 18px 50px rgba(3, 6, 14, .4);
  animation: drop-in .18s var(--ease);
}
.drop-label { padding: 8px 11px 6px; color: var(--muted); font-size: .82rem; font-weight: 500; }
.drop-link {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 11px;
  color: var(--ink);
  font: 500 .95rem/1.3 "DM Sans", sans-serif;
  text-align: left;
  text-decoration: none;
  background: none;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}
.drop-link:hover { color: var(--ink); background: var(--panel-2); }
.drop-link[aria-pressed="true"] { color: var(--accent-ink); background: var(--accent); }
.menu .pill { margin: 0; padding: 0; background: none; }
.menu .drop { position: fixed; top: 78px; left: var(--inset); right: var(--inset); max-height: calc(100svh - 96px); overflow: auto; }
.menu .drop a:not(.btn) { display: block; padding: 10px 11px; color: var(--ink); font-weight: 500; text-decoration: none; border-radius: 8px; }
.menu .drop a:not(.btn):hover, .menu .drop a.is-active { background: var(--panel-2); }
.menu .btn { width: 100%; margin-top: 6px; }
.theme-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 6px 0; }

/* ---------- Hero ---------- */
main { min-width: 0; }

.hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 110px 3.4% 56px;
  transform-origin: 50% 0;
  scale: calc(1 - var(--hero-p, 0) * .06);
  border-radius: calc(var(--radius) + var(--hero-p, 0) * 22px);
}
.hero-zoom {
  position: absolute;
  inset: -14vh 0;
  z-index: -2;
  background: inherit;
  translate: 0 calc(var(--hero-p, 0) * 12vh);
  animation: drift 16s cubic-bezier(.16, .7, .3, 1) both;
}
.hero h1 {
  margin: 0 0 clamp(26px, 5vh, 60px);
  font-size: clamp(2.7rem, 6.7vw, 7.4rem);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -.03em;
  text-shadow: 0 2px 34px rgba(5, 10, 25, .55);
  opacity: calc(1 - var(--hero-p, 0) * 1.6);
}
.hero h1 span { display: block; }
.hero h1 span:first-child { animation: from-left 1s var(--ease) .15s backwards; translate: calc(var(--hero-p, 0) * -16vw) 0; }
.hero h1 span + span { text-align: right; animation: from-right 1s var(--ease) .35s backwards; translate: calc(var(--hero-p, 0) * 16vw) 0; }

/* Überschriften-Band der Unterseiten */
.band {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px 32px;
  min-height: 290px;
  padding: 104px 3.4% 30px;
}
.band h1 {
  font-size: clamp(2.3rem, 4.6vw, 4.3rem);
  line-height: 1.06;
  text-shadow: 0 2px 30px rgba(5, 10, 25, .55);
  animation: from-left .9s var(--ease) .05s backwards;
}
.band-text p { margin-top: 8px; color: #e4e9f0; max-width: 60ch; text-shadow: 0 1px 16px rgba(5, 10, 25, .7); }
.band-actions { display: flex; flex-wrap: wrap; gap: 10px; animation: from-right .9s var(--ease) .1s backwards; }
.band-actions .btn:not(.btn-primary) { color: #fff; background: rgba(9, 12, 18, .5); border-color: rgba(255, 255, 255, .34); backdrop-filter: blur(10px); }
.band-actions .btn:not(.btn-primary):hover { background: rgba(9, 12, 18, .72); }

.block { padding-block: 40px; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 20px; margin-bottom: 18px; }
.section-head h2 { font-size: clamp(1.7rem, 3vw, 2.5rem); }

/* Glasfläche im Hero */
.finder {
  align-self: center;
  width: min(640px, 100%);
  padding: 16px 12px 12px;
  background: rgba(9, 12, 18, .86);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: var(--radius);
  box-shadow: 0 18px 50px rgba(3, 6, 14, .4);
  backdrop-filter: blur(14px);
  animation: rise .9s var(--ease) .45s backwards;
}
.finder > p { margin: 0 8px 13px; text-align: center; font-size: 1rem; font-weight: 500; line-height: 1.35; }
.finder-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 22px; margin-top: 12px; font-size: .9rem; }
.finder-links a { color: #dbe3ec; text-decoration: none; }
.finder-links a:hover { color: #fff; text-decoration: underline; }

.searchbar {
  display: flex;
  align-items: center;
  min-height: 56px;
  padding: 5px 5px 5px 16px;
  color: #edf1f7;
  background: #0e1522;
  border: 1px solid #3a475c;
  border-radius: 12px;
}
.searchbar:focus-within { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.searchbar .i { width: 19px; height: 19px; }
.searchbar input[type="search"] {
  flex: 1 1 0;
  min-width: 0;
  min-height: 44px;
  padding: 8px 12px;
  color: inherit;
  background: none;
  border: 0;
  outline: 0;
}
.searchbar input::placeholder { color: #9dabbd; opacity: 1; }
.searchbar button {
  flex: 0 0 auto;
  align-self: stretch;
  min-width: 84px;
  padding: 0 22px;
  color: var(--accent-ink);
  background: var(--accent);
  border: 0;
  border-radius: 9px;
  font: 600 .97rem/1 "DM Sans", sans-serif;
  cursor: pointer;
  transition: background .15s;
}
.searchbar button:hover { background: var(--accent-strong); }
.modal .searchbar, .palette .searchbar { color: var(--ink); background: var(--field); border-color: var(--field-line); }

/* ---------- Anmeldung ---------- */
.auth-page { min-height: 100svh; }
.topbar-auth { grid-template-columns: 1fr auto 1fr; }
.nav-side-auth { justify-content: flex-end; padding-right: 4px; }
.hero-auth {
  min-height: calc(100svh - 2 * var(--inset));
  margin-top: var(--inset);
  margin-bottom: var(--inset);
  justify-content: center;
  align-items: stretch;
  padding-top: 96px;
  padding-bottom: 36px;
}
.hero-auth h1 { font-size: clamp(2.4rem, 5.6vw, 6rem); }
.auth-box {
  align-self: center;
  width: min(480px, 100%);
  padding: 26px;
  color: #edf1f7;
  background: rgba(9, 12, 18, .88);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: var(--radius);
  box-shadow: 0 18px 50px rgba(3, 6, 14, .4);
  backdrop-filter: blur(14px);
  animation: rise .9s var(--ease) .35s backwards;
  --ink: #edf1f7;
  --muted: #a6b3c4;
  --field: #0e1522;
  --field-line: #3a475c;
  --panel: #121927;
  --panel-2: #1c2536;
  --line: #263143;
  --link: #6ec6ee;
  --red: #ff8a9b;
  --red-soft: #3a1620;
  --danger-line: #7a3341;
  color-scheme: dark;
}
.auth-box h2 { font-size: 1.85rem; }
.auth-note { text-align: center; font-size: .9rem; }
.auth-trust {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 22px;
  margin-top: 20px;
  color: #dbe3ec;
  font-size: .88rem;
  text-shadow: 0 1px 12px rgba(5, 10, 25, .8);
  animation: rise .9s var(--ease) .5s backwards;
}
.auth-trust span { display: inline-flex; align-items: center; gap: 7px; }
.auth-trust .i { width: 15px; height: 15px; }
.who { display: flex; align-items: center; gap: 10px; padding: 10px 13px; background: rgba(255, 255, 255, .06); border-radius: var(--radius-small); font-weight: 500; }

.steps { display: flex; gap: 8px; margin-bottom: 2px; }
.steps li { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: .82rem; }
.steps li + li::before { content: ""; width: 18px; height: 1px; margin-right: 1px; background: var(--line); }
.steps i { display: grid; place-items: center; width: 22px; height: 22px; font-style: normal; font-size: .76rem; font-weight: 600; background: var(--panel-2); border-radius: 50%; }
.steps i .i { width: 13px; height: 13px; }
.steps .is-current { color: var(--ink); }
.steps .is-current i { color: var(--accent-ink); background: var(--accent); }
.steps .is-done i { color: #052416; background: var(--green); }

.qr-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.qr { width: 168px; height: 168px; padding: 6px; background: #fff; border-radius: 10px; }
.qr-side { display: flex; flex: 1 1 170px; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; }
.secret { display: block; padding: 8px 10px; max-width: 100%; font-size: .85rem; line-height: 1.5; word-break: break-word; background: var(--field); border: 1px solid var(--line); border-radius: 8px; }

.kit-block { display: flex; flex-direction: column; gap: 8px; padding: 14px; background: rgba(127, 140, 160, .08); border: 1px solid var(--line); border-radius: var(--radius-small); }
.kit-label { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: .95rem; }
.kit-key { font-size: .9rem; line-height: 1.6; word-break: break-word; color: var(--link); }
.kit-codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px 14px; font-size: .9rem; }

/* ---------- Bausteine ---------- */
.stack { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.row-between { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.grow { flex: 1 1 0; min-width: 0; }

.field { display: block; min-width: 0; }
.field > span { display: block; margin-bottom: 5px; font-size: .92rem; font-weight: 500; }
.field > small { display: block; margin-top: 5px; color: var(--muted); font-size: .84rem; line-height: 1.4; }

input[type="text"], input[type="password"], input[type="search"], input[type="url"], input[type="email"],
input[type="date"], input[type="time"], input[type="number"], input[type="tel"], select, textarea {
  width: 100%;
  min-height: 46px;
  padding: 9px 13px;
  color: var(--ink);
  background: var(--field);
  border: 1px solid var(--field-line);
  border-radius: var(--radius-small);
  font: inherit;
}
textarea { resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.searchbar input[type="search"]:focus { outline: 0; }
input[type="checkbox"], input[type="radio"] { width: 17px; height: 17px; margin: 0; flex: 0 0 auto; accent-color: var(--accent); }
input[type="range"] { width: 100%; accent-color: var(--accent); }

.field-wrap { position: relative; }
.field-wrap input { padding-right: 46px; }
.field-btn {
  position: absolute;
  top: 5px;
  right: 5px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: var(--muted);
  background: none;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}
.field-btn:hover { color: var(--ink); background: var(--panel-2); }
.code-input { font-family: var(--mono); font-size: 1.3rem !important; letter-spacing: .28em; text-align: center; }

.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; line-height: 1.4; font-size: .95rem; }
.check input { margin-top: 3px; }

.link-button { padding: 0; color: var(--link); background: none; border: 0; font: inherit; text-decoration: underline; cursor: pointer; }
.link-button:hover { color: var(--accent-strong); }

.form-error { padding: 9px 12px; color: var(--red); background: var(--red-soft); border-radius: 8px; font-size: .92rem; line-height: 1.4; }

.notice { display: flex; align-items: flex-start; gap: 12px; padding: 13px 15px; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius-small); font-size: .93rem; line-height: 1.45; }
.notice > .i { margin-top: 2px; }
.notice p { margin-top: 3px; color: var(--muted); }
.notice-danger { color: var(--red); background: var(--red-soft); border-color: var(--danger-line); }
.notice-danger p { color: inherit; opacity: .9; }
.notice-warn { background: var(--amber-soft); border-color: var(--amber-line); }
.notice-warn > .i, .notice-warn strong { color: var(--amber); }
.notice-info { background: var(--blue-soft); border-color: transparent; }
.notice-info > .i { color: var(--link); }

.strength { display: flex; align-items: center; gap: 10px; margin-top: -6px; }
.meter { flex: 1; height: 5px; overflow: hidden; background: var(--panel-2); border-radius: 99px; }
.meter i { display: block; width: 0; height: 100%; background: var(--muted); border-radius: inherit; transition: width .25s, background .25s; }
.strength[data-score="1"] .meter i { background: var(--red); }
.strength[data-score="2"] .meter i { background: var(--amber); }
.strength[data-score="3"] .meter i { background: var(--link); }
.strength[data-score="4"] .meter i { background: var(--green); }
.meter-label { min-width: 74px; font-size: .82rem; text-align: right; }

.is-busy { position: relative; }
.btn .spinner-btn { display: none; }
.btn.is-busy .btn-label { opacity: 0; }
.btn.is-busy .spinner-btn { display: block; position: absolute; }
.spinner { display: inline-block; width: 18px; height: 18px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
.spinner-row { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 26px; color: var(--muted); }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: var(--muted);
  background: none;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  transition: color .15s, background .15s;
}
.icon-btn:hover { color: var(--ink); background: var(--panel-2); }
.icon-btn:disabled { opacity: .4; cursor: not-allowed; }
.icon-btn.is-active { color: var(--amber); }

.empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 36px 18px; text-align: center; }
.empty p { max-width: 42ch; font-size: .95rem; }
.empty-icon { display: grid; place-items: center; width: 52px; height: 52px; color: var(--link); background: var(--blue-soft); border-radius: 14px; }
.empty-icon .i { width: 24px; height: 24px; }

.panel { padding: 22px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 4px 13px;
  color: var(--ink-soft);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: .87rem;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.chip:hover { background: var(--panel-2); }
.chip.is-on, .chip[aria-pressed="true"] { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.chip .i { width: 15px; height: 15px; }

.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--panel-2); border-radius: 10px; }
.seg button { min-height: 32px; padding: 3px 13px; color: var(--ink-soft); background: none; border: 0; border-radius: 8px; font-size: .88rem; font-weight: 500; cursor: pointer; }
.seg button[aria-pressed="true"] { color: var(--accent-ink); background: var(--accent); }

/* ---------- Dialoge ---------- */
.modal {
  width: min(560px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  padding: 0;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .55);
  overflow: hidden;
  animation: pop .22s var(--ease);
}
.modal[open] { display: flex; flex-direction: column; }
.modal::backdrop { background: rgba(4, 8, 16, .66); backdrop-filter: blur(6px); }
.modal-sm { width: min(440px, calc(100vw - 24px)); }
.modal-lg { width: min(780px, calc(100vw - 24px)); }
.modal-xl { width: min(1120px, calc(100vw - 24px)); }
.modal-palette { width: min(620px, calc(100vw - 24px)); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 16px 12px 22px; }
.modal-head h2 { font-size: 1.45rem; }
.modal-body { padding: 4px 22px 20px; overflow: auto; min-height: 0; }
.modal-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--line); }
.modal-actions .spacer { margin-right: auto; }

.palette { display: flex; flex-direction: column; gap: 10px; }
.palette-list { display: flex; flex-direction: column; gap: 2px; max-height: 50vh; overflow: auto; }
.palette-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; color: var(--ink); background: none; border: 0; border-radius: 8px; text-align: left; cursor: pointer; }
.palette-item:hover, .palette-item.is-selected { background: var(--panel-2); }
.palette-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.palette-hint { color: var(--muted); font-size: .84rem; }
.palette-empty { padding: 18px; text-align: center; }

/* ---------- Meldungen ---------- */
.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 2147483600; display: flex; flex-direction: column; gap: 8px; width: min(380px, calc(100vw - 36px)); pointer-events: none; }
.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 15px;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 3px solid var(--link);
  border-radius: var(--radius-small);
  box-shadow: 0 14px 40px rgba(0, 0, 0, .4);
  font-size: .93rem;
  line-height: 1.4;
  pointer-events: auto;
  animation: rise .28s var(--ease);
  transition: opacity .25s, transform .25s;
}
.toast .i { margin-top: 1px; color: var(--link); }
.toast-success { border-left-color: var(--green); }
.toast-success .i { color: var(--green); }
.toast-error { border-left-color: var(--red); }
.toast-error .i { color: var(--red); }
.toast-warn { border-left-color: var(--amber-line); }
.toast-warn .i { color: var(--amber); }
.toast.is-leaving { opacity: 0; transform: translateY(8px); }

/* ---------- Fußzeile ---------- */
.footer-top, .footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 28px; }
.footer-top { padding-block: 30px 22px; border-bottom: 1px solid rgba(255, 255, 255, .12); }
.footer-bottom { padding-block: 18px; font-size: .9rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; }

.fatal { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; min-height: 100svh; padding: 24px; text-align: center; }
.fatal .i { width: 40px; height: 40px; color: var(--amber); }
.fatal p { max-width: 52ch; color: var(--muted); }
.noscript { padding: 40px; text-align: center; }

/* ---------- Animationen ---------- */
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: translateY(18px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes from-left { from { opacity: 0; transform: translateX(-52px); } to { opacity: 1; transform: none; } }
@keyframes from-right { from { opacity: 0; transform: translateX(52px); } to { opacity: 1; transform: none; } }
@keyframes drift { from { transform: scale(1.12); } to { transform: scale(1); } }
@keyframes bar-in { from { opacity: 0; transform: translateY(-16px); } to { opacity: 1; transform: none; } }
@keyframes drop-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }

.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s, transform .8s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal:nth-child(2) { transition-delay: .06s; }
.reveal:nth-child(3) { transition-delay: .12s; }
.reveal:nth-child(4) { transition-delay: .18s; }

html[data-motion="off"] *, html[data-motion="off"] *::before, html[data-motion="off"] *::after {
  animation-duration: .001s !important;
  animation-delay: 0s !important;
  transition-duration: .001s !important;
  transition-delay: 0s !important;
}
html[data-motion="off"] .reveal { opacity: 1; transform: none; }
html[data-motion="off"] .hero, html[data-motion="off"] .hero * { scale: 1 !important; translate: none !important; opacity: 1 !important; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; animation-delay: 0s !important; transition-duration: .001s !important; transition-delay: 0s !important; }
  .reveal { opacity: 1; transform: none; }
  .hero, .hero * { scale: 1 !important; translate: none !important; opacity: 1 !important; }
}

[data-theme="contrast"] .topbar { backdrop-filter: none; background: #000; border-color: #fff; box-shadow: none; }
[data-theme="contrast"] .pill { border: 1px solid #fff; }

/* ---------- Kleine Bildschirme ---------- */
@media (max-width: 1140px) {
  :root { --bar-side: 18px; --bar-top: 14px; }
  .topbar { grid-template-columns: auto 1fr; padding-right: 7px; }
  .topbar .nav, .topbar .nav-side:not(.nav-side-auth) { display: none; }
  .topbar .brand { justify-self: start; }
  .mobile-side { display: flex; }
  .topbar-auth { grid-template-columns: 0 1fr auto; }
  .topbar-auth .brand { justify-self: center; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { padding-inline: 16px; }
  .auth-box { padding: 20px; }
  .band { min-height: 240px; padding-top: 92px; }
  .hero { padding-inline: 14px; }
  .hero h1 span + span { text-align: right; }
  .modal-body { padding-inline: 16px; }
  .modal-head { padding-left: 16px; }
  .modal-actions { padding-inline: 16px; }
  .toasts { right: 10px; left: 10px; width: auto; bottom: 10px; }
}
