/* XAVR Landing: der Mac-Desktop als Buehne. Optik exakt aus den
   Produkt-Quellen (landingpage_uebergabe/quelldateien): Leuchtkante,
   Pille, Box, Karten. Eigene Klassen fuer die Buehne (desk-*), die
   Chat-Bausteine behalten ihre Produkt-Namen. */

/* ============================================================
   1) Die Buehne: Desktop mit Abend-Verlauf
   ============================================================ */

.desk {
  position: relative;
  height: 100dvh;
  min-height: 560px;
  overflow: hidden;
  color: var(--tinte);
  /* Daniels Wallpaper (Wellen, als SVG nachgebaut); darunter als
     Rueckfall der Abend-Verlauf aus der YC-Demo */
  background-color: #155fc0;
  background-image:
    url('/assets/wallpaper.svg'),
    linear-gradient(160deg, #1b2138 0%, #232c4a 46%, #274152 100%);
  background-size: cover, cover;
  background-position: center, center;
}

/* ---------- Menueleiste oben ---------- */

.desk-menue {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  background: rgba(16, 20, 38, 0.42);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  color: rgba(240, 243, 252, 0.92);
  font-size: 12.5px;
  -webkit-user-select: none;
  user-select: none;
}

.desk-menue-links {
  display: flex;
  align-items: center;
  gap: 18px;
}

.desk-menue-links b {
  font-weight: 900;
  letter-spacing: 0.02em;
}

.desk-menue-links span {
  opacity: 0.82;
}

.desk-menue-uhr {
  font-variant-numeric: tabular-nums;
  opacity: 0.85;
}

/* ---------- Macintosh HD oben links ---------- */

.desk-hd {
  position: absolute;
  top: 52px;
  left: 26px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 84px;
  -webkit-user-select: none;
  user-select: none;
}

.desk-hd svg {
  display: block;
  filter: drop-shadow(0 4px 10px rgba(8, 10, 24, 0.4));
}

.desk-hd span {
  font-size: 11.5px;
  color: rgba(240, 243, 252, 0.9);
  text-shadow: 0 1px 4px rgba(8, 10, 24, 0.6);
}

/* ---------- Dock unten ---------- */

.desk-dock {
  position: absolute;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 20px;
  background: rgba(250, 250, 253, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(22px) saturate(1.3);
  -webkit-backdrop-filter: blur(22px) saturate(1.3);
  box-shadow: 0 14px 40px rgba(8, 10, 24, 0.35);
}

.dock-icon {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 11px;
  border: none;
  padding: 0;
  display: grid;
  place-items: center;
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 4px 10px rgba(8, 10, 24, 0.28);
  transition: transform 0.25s var(--ease);
}

.dock-icon:hover {
  transform: translateY(-4px) scale(1.06);
}

.dock-knopf {
  cursor: pointer;
}

.dock-paragraf {
  font-size: 21px;
  font-weight: 900;
  color: #3a3a42;
  line-height: 1;
}

/* macOS-artiges Hover-Label ueber dem Icon */
.dock-knopf::after {
  content: attr(data-label);
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  padding: 5px 11px;
  border-radius: 8px;
  background: rgba(24, 28, 48, 0.85);
  color: rgba(245, 247, 255, 0.95);
  font-family: var(--schrift);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s var(--ease);
}

.dock-knopf:hover::after,
.dock-knopf:focus-visible::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.dock-trenner {
  width: 1px;
  align-self: stretch;
  margin: 4px 2px;
  background: rgba(255, 255, 255, 0.25);
}

/* Xavier im Dock: das runde Logo mit Leuchtring, er LAEUFT (Punkt) */
.dock-xavier {
  border-radius: 50%;
  background: radial-gradient(circle at 38% 28%, #ffffff 0%, #f3f5fa 62%, #e8ebf2 100%);
}

.dock-xavier::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  padding: 2.5px;
  background: conic-gradient(
    from 210deg,
    #5ec1ff,
    #8a7bff,
    #ff8ad8,
    #ffbe5c,
    #4fe0a4,
    #5ec1ff
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask-composite: exclude;
  pointer-events: none;
}

.dock-xavier-gesicht {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Der macOS-Punkt unter laufenden Apps */
.dock-punkt-aktiv {
  position: absolute;
  left: 50%;
  bottom: -7px;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 4px rgba(255, 255, 255, 0.6);
}

/* ============================================================
   2) Die Pille oben rechts (exakt die Produkt-Pille)
   ============================================================ */

@property --box-winkel {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}

@keyframes box-schimmer {
  to {
    --box-winkel: 360deg;
  }
}

.pille {
  position: absolute;
  top: 50px;
  right: 30px;
  z-index: 10;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: rgba(250, 250, 253, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 14px 40px rgba(8, 10, 24, 0.35);
  cursor: pointer;
  padding: 0;
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}

.pille.weg {
  opacity: 0;
  transform: scale(0.6);
  pointer-events: none;
}

.pille::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  padding: 2px;
  background: conic-gradient(
    from var(--box-winkel),
    rgba(255, 255, 255, 0.16) 0%,
    #5ec1ff 10%,
    #8a7bff 22%,
    rgba(255, 255, 255, 0.14) 34%,
    #ff8ad8 46%,
    #ffbe5c 58%,
    rgba(255, 255, 255, 0.14) 70%,
    #4fe0a4 82%,
    #5ec1ff 94%,
    rgba(255, 255, 255, 0.16) 100%
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask-composite: exclude;
  animation: box-schimmer 18s linear infinite;
  pointer-events: none;
}

/* Er hat was zu melden: dickere Kante + pulsierender Glow + !-Pille */
.pille.meldung::before {
  padding: 4px;
}

.pille.meldung::after {
  content: '';
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  padding: 9px;
  background: conic-gradient(
    from var(--box-winkel),
    rgba(255, 255, 255, 0.16) 0%,
    #5ec1ff 10%,
    #8a7bff 22%,
    rgba(255, 255, 255, 0.14) 34%,
    #ff8ad8 46%,
    #ffbe5c 58%,
    rgba(255, 255, 255, 0.14) 70%,
    #4fe0a4 82%,
    #5ec1ff 94%,
    rgba(255, 255, 255, 0.16) 100%
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask-composite: exclude;
  filter: blur(10px);
  animation:
    box-schimmer 6s linear infinite,
    pille-meldung-puls 1.4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes pille-meldung-puls {
  0%,
  100% {
    opacity: 0.22;
  }
  50% {
    opacity: 1;
  }
}

/* Szene 4: der Puls schlaegt schneller (Dringlichkeit) */
.pille.eilig.meldung::after {
  animation:
    box-schimmer 6s linear infinite,
    pille-meldung-puls 0.8s ease-in-out infinite;
}

.pille-hinweis {
  position: absolute;
  top: 6px;
  right: 9px;
  min-width: 13px;
  height: 13px;
  padding: 0 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #17171b;
  color: #ffffff;
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.75);
  animation: hinweis-pop 0.34s cubic-bezier(0.2, 0.8, 0.3, 1.25) both;
  pointer-events: none;
}

@keyframes hinweis-pop {
  from {
    transform: scale(0.4);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.pille-gesicht {
  display: flex;
  align-items: center;
  animation: pille-atmet 3.6s ease-in-out infinite;
}

@keyframes pille-atmet {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(0.6px) scale(1.025);
  }
}

/* ============================================================
   3) Die Box (Milchglas, Radius 26, Leuchtkante)
   ============================================================ */

.box {
  position: absolute;
  top: 50px;
  right: 30px;
  z-index: 9;
  width: min(404px, calc(100vw - 56px));
  height: min(600px, calc(100dvh - 152px));
  display: flex;
  flex-direction: column;
  border-radius: 26px;
  background: rgba(250, 250, 253, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 28px 80px rgba(8, 10, 24, 0.42);
  opacity: 0;
  transform: translateY(-14px) scale(0.94);
  transform-origin: top right;
  transition:
    opacity 0.7s var(--ease),
    transform 0.7s var(--ease);
  pointer-events: none;
}

.box.da {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.box::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: 26px;
  padding: 1.5px;
  background: conic-gradient(
    from var(--box-winkel),
    rgba(255, 255, 255, 0.16) 0%,
    #5ec1ff 10%,
    #8a7bff 22%,
    rgba(255, 255, 255, 0.14) 34%,
    #ff8ad8 46%,
    #ffbe5c 58%,
    rgba(255, 255, 255, 0.14) 70%,
    #4fe0a4 82%,
    #5ec1ff 94%,
    rgba(255, 255, 255, 0.16) 100%
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask-composite: exclude;
  animation: box-schimmer 18s linear infinite;
  pointer-events: none;
}

.box-kopf {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 14px 18px 10px;
  -webkit-user-select: none;
  user-select: none;
}

.box-kopf-name {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--tinte-2);
}

/* Dezentes Pause-Zeichen, sichtbar solange der Hover pausiert */
.box-pause {
  margin-left: auto;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  color: var(--tinte-5);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.box.pausiert .box-pause {
  opacity: 1;
}

.box-zu {
  margin-left: 2px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--tinte-5);
  transition: background 0.15s ease, color 0.15s ease;
}

.box-zu:hover {
  background: var(--fill);
  color: var(--tinte-2);
}

.box-feed {
  position: relative;
  flex: 1;
  overflow-y: auto;
  padding: 6px 18px 12px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scrollbar-width: thin;
}

/* ---------- Nachrichten ---------- */

@keyframes einblenden {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.xn {
  display: flex;
  gap: 10px;
  animation: einblenden 0.3s ease both;
}

.xn-gesicht {
  flex: none;
  width: 28px;
  padding-top: 2px;
}

.xn-inhalt {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.xn-text {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--tinte);
}

.nb {
  display: flex;
  justify-content: flex-end;
}

.nb-blase {
  max-width: 85%;
  padding: 9px 14px;
  border-radius: 16px 16px 4px 16px;
  background: var(--indigo);
  color: #fff;
  font-size: 14px;
  line-height: 1.5;
  animation: einblenden 0.25s ease both;
}

.caret {
  display: inline-block;
  width: 1.5px;
  height: 1em;
  margin-left: 2px;
  vertical-align: -2px;
  background: var(--tinte-3);
  animation: caret-blink 0.9s steps(1) infinite;
}

@keyframes caret-blink {
  50% {
    opacity: 0;
  }
}

.denk-punkte {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 2px;
}

.denk-punkt {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--tinte-5);
  opacity: 0.25;
  animation: denk-puls 1.2s ease-in-out infinite;
}

.denk-punkt:nth-child(2) {
  animation-delay: 0.18s;
}

.denk-punkt:nth-child(3) {
  animation-delay: 0.36s;
}

@keyframes denk-puls {
  0%,
  60%,
  100% {
    opacity: 0.25;
    transform: translateY(0);
  }
  30% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

/* ---------- Frage-Knoepfe ---------- */

.frage-knoepfe {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.frage-ja,
.frage-nein {
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  border: 1px solid var(--linie-2);
  background: var(--weiss);
  animation: einblenden 0.3s ease both;
  transition: transform 0.15s var(--ease), background 0.2s ease, color 0.2s ease;
}

.frage-ja {
  border-color: var(--indigo);
  background: var(--indigo);
  color: #fff;
}

/* Selbst-Druecken der Regie: sichtbarer Hover, dann Press.
   Ein echter Klick nutzt dieselben Zustaende ueber :hover/:active. */
.schwebt {
  filter: brightness(1.04);
  transform: translateY(-1px);
}

button.dokument-karte {
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.18s var(--ease), filter 0.18s ease;
}

.dokument-karte.schwebt {
  border-color: var(--indigo);
  background: var(--liste);
}

.druck {
  transform: scale(0.95) !important;
}

.frage-ja.druck {
  transform: scale(0.94) !important;
}

.frage-chip {
  align-self: flex-start;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(15, 157, 88, 0.12);
  color: var(--gruen);
  font-size: 12.5px;
  font-weight: 700;
  animation: einblenden 0.3s ease both;
}

/* ---------- B3: die Entscheidungs-Karte ---------- */

.entscheidungs-karte {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 13px 15px;
  border: 1px solid var(--linie-2);
  border-radius: 12px;
  background: var(--weiss);
  animation: einblenden 0.35s ease both;
}

.entscheidungs-kopf {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--linie-3);
}

.entscheidungs-kopf b {
  font-size: 13.5px;
  color: var(--tinte);
}

.entscheidungs-kopf span {
  flex: none;
  font-size: 11.5px;
  color: var(--tinte-5);
}

.entscheidungs-zeile {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  font-size: 13px;
  color: var(--tinte-3);
}

.entscheidungs-zeile b {
  flex: none;
  font-family: var(--schrift-zahl);
  font-size: 12.5px;
  color: var(--tinte);
}

.entscheidungs-zeile b.schlecht {
  color: var(--rot);
}

.entscheidungs-zeile b.gut {
  color: var(--gruen);
}

.entscheidungs-hinweis {
  font-size: 11.5px;
  color: var(--tinte-5);
}

/* ---------- Entwurfs-Karte (Mail-Look: To/Subject/Body + Copy) ---------- */

.entwurf-karte {
  border: 1px solid var(--linie-2);
  border-radius: 12px;
  background: var(--weiss);
  overflow: hidden;
  animation: einblenden 0.35s ease both;
}

.entwurf-kopf {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 13px;
  border-bottom: 1px solid var(--linie-3);
}

.entwurf-zeile {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 12px;
  min-width: 0;
}

.entwurf-label {
  flex: none;
  width: 48px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--tinte-5);
}

.entwurf-mono {
  font-family: var(--schrift-zahl);
  font-size: 11.5px;
  color: var(--tinte-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.entwurf-zeile b {
  font-size: 12.5px;
  color: var(--tinte);
}

.entwurf-body {
  padding: 10px 13px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--tinte-2);
}

.entwurf-fuss {
  display: flex;
  justify-content: flex-end;
  padding: 8px 13px 11px;
  border-top: 1px solid var(--linie-3);
  background: var(--liste);
}

.entwurf-copy {
  border: none;
  border-radius: 9px;
  padding: 7px 16px;
  background: var(--tinte);
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
  transition: transform 0.18s var(--ease), filter 0.18s ease;
}

.entwurf-kopiert {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(15, 157, 88, 0.12);
  color: var(--gruen);
  font-size: 12.5px;
  font-weight: 700;
  animation: einblenden 0.3s ease both;
}

/* Aktions-Knopf (Kampagnen-Pause): der dunkle Produkt-Knopf */
.aktion-knopf {
  border: none;
  border-radius: 10px;
  padding: 8px 16px;
  background: var(--tinte);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  animation: einblenden 0.3s ease both;
  transition: transform 0.18s var(--ease), filter 0.18s ease, opacity 0.2s ease;
}

.aktion-knopf:disabled {
  opacity: 0.65;
  cursor: default;
}

/* Der Merksatz am Ende des Loops: eigene, ruhige Schluss-Zeile */
.merksatz {
  margin: 6px 8px 2px;
  padding-top: 12px;
  border-top: 1px solid var(--linie-3);
  text-align: center;
  font-size: 13px;
  line-height: 1.6;
  color: var(--tinte-4);
  animation: einblenden 0.5s ease both;
}

/* ---------- B1: die Daten-Karte ---------- */

.daten-karte {
  border: 1px solid var(--linie-2);
  border-radius: 12px;
  background: var(--weiss);
  overflow: hidden;
  animation: einblenden 0.35s ease both;
}

.daten-karte-kopf {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 13px;
  border-bottom: 1px solid var(--linie-3);
}

.daten-karte-kopf b {
  font-family: var(--schrift-zahl);
  font-size: 12px;
  color: var(--tinte);
}

.daten-karte-kopf span {
  font-size: 11.5px;
  color: var(--tinte-4);
}

.daten-karte-tabelle {
  overflow-x: auto;
}

.daten-karte table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.daten-karte th,
.daten-karte td {
  padding: 6px 11px;
  text-align: left;
  border-bottom: 1px solid var(--linie-3);
  white-space: nowrap;
}

.daten-karte tr:last-child td {
  border-bottom: none;
}

.daten-karte th {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--tinte-4);
  background: var(--liste);
}

.daten-karte td {
  color: var(--tinte-2);
}

.daten-karte td.zahl,
.daten-karte th.zahl {
  text-align: right;
}

.daten-karte td.zahl {
  font-family: var(--schrift-zahl);
  font-size: 11.5px;
}

.daten-karte td.zahl.rot {
  color: var(--rot);
  font-weight: 700;
}

.daten-karte-fuss {
  padding: 7px 13px;
  border-top: 1px solid var(--linie-3);
  font-size: 11.5px;
  color: var(--tinte-5);
}

/* ---------- Rechenweg (aufklappbar) ---------- */

.rechenweg {
  display: block;
}

.rechenweg-summary {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 700;
  color: var(--tinte-4);
  padding: 6px 10px;
  border-radius: 8px;
  list-style: none;
  cursor: pointer;
}

.rechenweg-summary::-webkit-details-marker {
  display: none;
}

.rechenweg-summary:hover {
  background: var(--fill);
}

.rechenweg-summary svg {
  transition: transform 0.2s ease;
}

.rechenweg[open] .rechenweg-summary svg {
  transform: rotate(180deg);
}

.rechenweg-inhalt {
  margin-top: 8px;
  border-top: 1px solid var(--linie-3);
  padding-top: 10px;
  font-size: 13px;
  color: #4a4a52;
}

.rechenweg-zeile {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 3px 0;
}

.rechenweg-zeile span:last-child,
.rechenweg-summe span:last-child {
  font-variant-numeric: tabular-nums;
  font-family: var(--schrift-zahl);
  font-size: 12px;
}

.rechenweg-summe {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 6px 0 0;
  margin-top: 5px;
  border-top: 1px solid var(--linie-3);
  font-weight: 900;
}

.rechenweg-formel {
  margin-top: 10px;
  font-family: var(--schrift-zahl);
  font-size: 11px;
  color: var(--tinte-6);
  word-break: break-word;
}

/* ---------- B2: Anhang-Karte + Dokument-Blatt ---------- */

.dokument-karte {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 13px;
  border: 1px solid var(--linie-2);
  border-radius: 12px;
  background: var(--weiss);
  text-align: left;
  width: 100%;
  transition: border-color 0.15s ease, background 0.15s ease;
  animation: einblenden 0.35s ease both;
  cursor: pointer;
}

.dokument-karte:hover {
  border-color: var(--indigo);
  background: var(--liste);
}

.dokument-karte-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--indigo-hauch);
  color: var(--indigo-tief);
}

.dokument-karte-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.dokument-karte-text b {
  font-size: 13.5px;
  color: var(--tinte);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dokument-karte-text small {
  font-size: 11.5px;
  color: var(--tinte-5);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dokument-schleier {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 13px;
  border-radius: 26px;
  background: rgba(10, 12, 26, 0.5);
  animation: einblenden-weich 0.2s ease both;
}

@keyframes einblenden-weich {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.dokument-blatt {
  position: relative;
  width: 100%;
  max-height: 100%;
  overflow-y: auto;
  padding: 26px 26px 28px;
  border-radius: var(--radius-l);
  background: var(--weiss);
  box-shadow: 0 40px 110px rgba(4, 6, 18, 0.45);
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: einblenden 0.35s ease both;
}

.dokument-knoepfe {
  position: absolute;
  top: 14px;
  right: 16px;
  display: flex;
  gap: 6px;
}

.dokument-knopf {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 50%;
  background: var(--fill);
  color: var(--tinte-3);
  font-size: 19px;
  line-height: 1;
}

.dokument-knopf:hover {
  color: var(--tinte);
}

.dokument-knopf.ok {
  background: rgba(15, 157, 88, 0.12);
  color: var(--gruen);
}

.dokument-kopf h2 {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.01em;
  padding-right: 80px;
}

.dokument-unter {
  margin-top: 3px;
  font-size: 13px;
  color: var(--tinte-4);
}

.dokument-abschnitt {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dokument-abschnitt h3 {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--tinte-4);
  margin: 0;
}

.op-zeile {
  display: grid;
  grid-template-columns: 1fr auto 90px;
  gap: 8px;
  align-items: baseline;
  padding: 6px 0;
  border-bottom: 1px solid var(--linie-3);
  font-size: 12.5px;
}

.op-zeile b {
  font-family: var(--schrift-zahl);
  font-size: 12px;
  text-align: right;
}

.op-zeile.summe {
  border-bottom: none;
  font-weight: 700;
}

.op-frist {
  font-size: 11.5px;
  color: var(--tinte-4);
}

.op-frist.rot {
  color: var(--rot);
  font-weight: 700;
}

.op-frist.gruen {
  color: var(--gruen);
}

.op-zitat {
  margin: 0;
  padding: 10px 16px;
  border-left: 3px solid var(--indigo);
  background: var(--liste);
  border-radius: 0 10px 10px 0;
  font-size: 13px;
  font-style: italic;
  color: var(--tinte-2);
}

/* ---------- Composer ---------- */

.composer {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 14px 14px;
  padding: 5px 6px 5px 16px;
  border: 1px solid var(--linie-2);
  border-radius: 999px;
  background: var(--weiss);
  opacity: 0.55;
  transition: opacity 0.3s ease, box-shadow 0.3s ease;
}

.composer.aktiv {
  opacity: 1;
  box-shadow: 0 0 0 3px var(--indigo-hauch);
}

.composer input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font-size: 14px;
  padding: 7px 0;
}

.composer-senden {
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: var(--fill-2);
  color: var(--tinte-5);
  transition: background 0.2s ease, color 0.2s ease;
}

.composer-senden.aktiv {
  background: var(--indigo);
  color: #fff;
}

/* ---------- Xaviers Gesicht ---------- */

.xavr-gesicht {
  display: block;
  color: var(--tinte);
}

.gesicht-kopf {
  fill: #fff;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linejoin: round;
}

.gesicht-auge {
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
}

.gesicht-mund {
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Play-Overlay (prefers-reduced-motion) ---------- */

.play-schleier {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: none;
  align-items: center;
  justify-content: center;
  border-radius: 26px;
  background: rgba(250, 250, 253, 0.6);
}

.play-schleier.da {
  display: flex;
}

.play-knopf {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 22px;
  border: none;
  border-radius: 999px;
  background: var(--tinte);
  color: #fff;
  font-size: 14.5px;
  font-weight: 700;
  box-shadow: 0 10px 30px rgba(8, 10, 24, 0.3);
}

/* ============================================================
   4) Das Mini-Browser-Fenster (die Beta-Anmeldung)
   ============================================================ */

.fenster {
  position: absolute;
  left: clamp(24px, 7vw, 120px);
  top: 50%;
  transform: translateY(-52%);
  z-index: 6;
  width: min(460px, calc(100vw - 48px));
  border-radius: 14px;
  background: var(--weiss);
  box-shadow: 0 30px 90px rgba(8, 10, 24, 0.45);
  overflow: hidden;
}

.fenster-chrome {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--linie);
  background: var(--liste);
}

.fenster-punkt {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #d9d9df;
}

.fenster-punkt.rot {
  background: #f28b82;
}

.fenster-punkt.gelb {
  background: #f7cb4d;
}

.fenster-punkt.gruen {
  background: #57bb63;
}

.fenster-url {
  flex: 1;
  margin-left: 8px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--fill);
  font-size: 12.5px;
  color: var(--tinte-3);
  -webkit-user-select: none;
  user-select: none;
}

.fenster-url svg {
  flex: none;
  color: var(--tinte-5);
}

.fenster-inhalt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 36px 34px 30px;
  text-align: center;
}

.fenster-marke {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.fenster-logo {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 28%, #ffffff 0%, #f3f5fa 62%, #e8ebf2 100%);
  color: #1a1a1f;
  box-shadow: 0 6px 24px rgba(20, 20, 45, 0.12);
}

.fenster-logo::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  padding: 2.5px;
  background: conic-gradient(
    from var(--box-winkel),
    rgba(255, 255, 255, 0.16) 0%,
    #5ec1ff 10%,
    #8a7bff 22%,
    rgba(255, 255, 255, 0.14) 34%,
    #ff8ad8 46%,
    #ffbe5c 58%,
    rgba(255, 255, 255, 0.14) 70%,
    #4fe0a4 82%,
    #5ec1ff 94%,
    rgba(255, 255, 255, 0.16) 100%
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask-composite: exclude;
  animation: box-schimmer 18s linear infinite;
}

.fenster-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--tinte-5);
}

.fenster-claim {
  font-size: 17.5px;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: -0.01em;
  color: var(--tinte);
  text-wrap: balance;
}

.fenster-sub {
  margin-top: -6px;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--tinte-4);
  max-width: 360px;
}

.fenster-form {
  width: 100%;
}

.beta-feld {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--linie-2);
  border-radius: 999px;
  padding: 5px 5px 5px 8px;
  background: var(--weiss);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.beta-feld:focus-within {
  border-color: var(--indigo);
  box-shadow: 0 0 0 3px var(--indigo-hauch);
}

.beta-feld input[type='email'] {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font-size: 14.5px;
  padding: 9px 8px;
}

.beta-feld input::placeholder {
  color: var(--tinte-6);
}

.gotcha {
  position: absolute !important;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.beta-knopf {
  flex: none;
  border: none;
  border-radius: 999px;
  height: 40px;
  padding: 0 20px;
  background: var(--tinte);
  color: #fff;
  font-size: 13.5px;
  font-weight: 700;
  white-space: nowrap;
  transition: transform 0.2s var(--ease), opacity 0.2s ease;
}

.beta-knopf:hover {
  transform: translateY(-1px);
}

.beta-knopf:disabled {
  opacity: 0.6;
  transform: none;
  cursor: default;
}

.beta-micro {
  margin-top: 10px;
  font-size: 12px;
  color: var(--tinte-5);
  min-height: 1.2em;
}

.beta-micro.err {
  color: #c25555;
}

.beta-erfolg {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 6px 0 2px;
}

.beta-erfolg.da {
  display: flex;
}

.beta-erfolg-kreis {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(15, 157, 88, 0.1);
  color: var(--gruen);
}

.beta-erfolg h2 {
  font-size: 17px;
  font-weight: 800;
}

.beta-erfolg p {
  font-size: 13px;
  color: var(--tinte-4);
}

.spinner {
  display: inline-block;
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: -2px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ============================================================
   5) Overlay-Fenster (Imprint / Kontakt) + Dock-Ziele
   ============================================================ */

.modal-schleier {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(8, 10, 24, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: einblenden-weich 0.2s ease both;
}

.modal-schleier[hidden] {
  display: none;
}

.fenster.modal {
  position: relative;
  left: auto;
  top: auto;
  transform: none;
  width: min(520px, calc(100vw - 32px));
  max-height: min(640px, calc(100dvh - 48px));
  display: flex;
  flex-direction: column;
  animation: einblenden 0.3s var(--ease) both;
  margin: 0;
  order: 0;
}

.modal-zu {
  margin-left: 6px;
  flex: none;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--tinte-5);
  transition: background 0.15s ease, color 0.15s ease;
}

.modal-zu:hover {
  background: var(--fill);
  color: var(--tinte-2);
}

.modal-inhalt {
  overflow-y: auto;
  padding: 26px 30px 30px;
  text-align: left;
}

.modal-inhalt h2 {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}

.modal-inhalt p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--tinte-2);
  margin: 0 0 12px;
}

.modal-inhalt a {
  color: var(--indigo-tief);
}

.modal-leise {
  font-size: 12.5px;
  color: var(--tinte-5);
}

.modal-links {
  padding-top: 10px;
  border-top: 1px solid var(--linie);
  font-size: 13px;
}

.modal-mail {
  display: inline-block;
  margin-top: 2px;
  padding: 10px 20px;
  border-radius: 999px;
  background: var(--tinte);
  color: #fff !important;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

/* Mobile Pflicht-Links (das Dock fehlt dort) */
.mobil-recht {
  display: none;
  justify-content: center;
  gap: 22px;
  padding: 22px 0 4px;
}

.mobil-recht button {
  border: none;
  background: transparent;
  padding: 4px 2px;
  font-size: 13px;
  color: rgba(240, 243, 252, 0.75);
  text-shadow: 0 1px 4px rgba(8, 10, 24, 0.6);
}

.mobil-recht button:hover {
  color: #fff;
  text-decoration: underline;
}


/* ============================================================
   6) Mobile: Beta-Fenster mittig, Xavier als Overlay-Box darueber
   ============================================================ */

@media (max-width: 900px) {
  .desk-menue,
  .desk-hd,
  .desk-dock {
    display: none;
  }

  /* Das Beta-Fenster sitzt einfach mittig auf dem Wallpaper */
  .fenster {
    left: 50%;
    top: 50%;
    transform: translate(-50%, -52%);
    width: min(440px, calc(100vw - 32px));
  }

  /* Die Pille oben rechts, eine Nummer kleiner */
  .pille {
    top: 16px;
    right: 16px;
    width: 56px;
    height: 56px;
  }

  /* Xavier als Overlay ueber allem, mit X schliessbar */
  .box {
    position: fixed;
    top: 50%;
    left: 16px;
    right: 16px;
    width: auto;
    max-width: 460px;
    margin: 0 auto;
    height: min(600px, calc(100dvh - 88px));
    z-index: 30;
    transform: translateY(calc(-50% + 14px)) scale(0.96);
  }

  .box.da {
    transform: translateY(-50%) scale(1);
  }

  /* Pflicht-Links unten (das Dock fehlt) */
  .mobil-recht {
    display: flex;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 10px;
    z-index: 5;
    padding: 0;
  }
}

@media (max-width: 480px) {
  .fenster-inhalt {
    padding: 28px 22px 24px;
  }

  .beta-feld {
    flex-wrap: wrap;
    border-radius: 22px;
  }

  .beta-feld input[type='email'] {
    flex-basis: 100%;
  }

  .beta-knopf {
    width: 100%;
  }
}

/* Reduced motion: Standbild, Play-Knopf uebernimmt */
@media (prefers-reduced-motion: reduce) {
  .pille::before,
  .pille.meldung::after,
  .box::before,
  .fenster-logo::before {
    animation: none;
  }

  .pille-gesicht {
    animation: none;
  }
}
