










.dialog-backdrop {
  position: fixed; inset: 0 0 auto; height: var(--vvh, 100dvh); overflow-y: auto; z-index: var(--z-dialog);
  display: flex; align-items: center; justify-content: center; padding: var(--s5);
  background: var(--schleier);
  animation: einblenden var(--tempo) var(--ease);
}
.dialog {
  position: relative;
  width: min(var(--dialog-s), 100%); max-height: calc(var(--vvh, 100dvh) - var(--s8)); overflow-y: auto;
  padding: var(--s6);
  border: 1px solid var(--kante-ebene); border-radius: var(--r-xl);
  background: var(--flaeche-ebene); box-shadow: var(--shadow-stark);
  animation: aufsteigen var(--tempo-lang) var(--ease);
}



.dialog h2 { margin: 0 0 var(--s2); font-family: var(--schrift-text); font-size: var(--t-h2); font-weight: 600; line-height: 1.3; }
.dialog-zu { position: absolute; top: var(--s3); right: var(--s3); }
.dialog:has(> .dialog-zu) > h2 { padding-right: var(--s8); }


.dialog > p, .dialog-text { margin: 0; color: var(--text-dim); font-size: var(--fs-bd);
                             line-height: var(--lh); white-space: pre-line; }
.dialog-beschaeftigt { cursor: progress; }
.dialog .feld-form { margin-top: var(--s4); }
.dialog-actions { display: flex; justify-content: flex-end; gap: var(--s2); margin-top: var(--s6); }


.teilen-dialog { width: min(var(--dialog-m), calc(100vw - var(--s6))); }
.teilen-inhalt { display: flex; flex-direction: column; }
.teilen-zeile { display: flex; gap: var(--s2); margin-top: var(--s4); }
.teilen-feld { flex: 1 1 auto; min-width: 0; font-size: var(--fs-md); }
.teilen-kopieren { flex: none; }
.teilen-stand { margin: var(--s2) 0 0; color: var(--text-dim); font-size: var(--fs-sm); }
.teilen-stand:empty { display: none; }
.teilen-verwalten { color: var(--accent); }
.teilen-leser { color: var(--text); }
.teilen-aktionen > .btn-danger-ghost { margin-right: auto; }


.links-hinweis { max-width: 64ch; margin: 0 0 var(--s4); }
.links-liste { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.links-zeile { display: flex; align-items: center; justify-content: space-between; gap: var(--s3);
               padding: var(--s3) 0; border-bottom: 1px solid var(--kante-fein); }
.links-zeile:last-child { border-bottom: 0; }
.links-text { display: flex; flex: 1 1 auto; flex-direction: column; gap: var(--s0); min-width: 0; }
.links-aktionen { display: flex; flex: none; flex-wrap: wrap; justify-content: flex-end; gap: var(--s1); }
@media (max-width: 599px) {
  .links-zeile { flex-direction: column; align-items: stretch; gap: var(--s2); }
  .links-aktionen { justify-content: flex-start; }
}



.links-titel { align-self: flex-start; max-width: 100%; overflow: hidden; color: var(--accent); font-weight: 600;
               line-height: var(--s6); text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.links-titel:hover { color: var(--accent-hover); text-decoration: underline; text-underline-offset: 0.15em; }
@media (pointer: coarse) {
  .links-titel { min-height: var(--h-ziel); line-height: var(--h-ziel); }
}
.links-stand { color: var(--text-dim); font-size: var(--fs-sm); }


.links-leser { --leser-einzug: calc(var(--s2) + var(--s1)); color: var(--text-dim); font-size: var(--fs-sm); }
.links-leser.liest { padding-left: var(--leser-einzug); color: var(--text); text-indent: calc(-1 * var(--leser-einzug)); }
.links-leser.liest::before { content: ""; display: inline-block; width: var(--s2); height: var(--s2); margin-right: var(--s1);
                             border-radius: var(--r-pill); background: var(--accent); vertical-align: middle; }





.dialog-warte { color: var(--text-dim); font-size: var(--fs-md); }
.dialog-vorschlaege { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s2); }
.dialog-vorschlaege .btn { font-size: var(--fs-sm); }



.wahl-liste { display: flex; flex-direction: column; gap: var(--s2); margin: var(--s4) 0 0; }
.wahl {
  display: flex; gap: var(--s3); align-items: flex-start;
  padding: var(--s3); border: 1px solid var(--border); border-radius: var(--r-sm);
  cursor: pointer;
}
.wahl:hover { border-color: var(--accent); }
.wahl.aktiv { border-color: var(--accent); background: var(--accent-soft); }
.wahl input { margin-top: var(--s0); width: 18px; height: 18px; accent-color: var(--accent); }
.wahl strong { display: block; font-size: var(--fs-bd); }
.wahl code {
  display: block; margin-top: var(--s0); font-size: var(--fs-sm); color: var(--text-dim);
  word-break: break-all;
}




.geteilt-marke {
  display: inline-flex; align-items: center; gap: calc(var(--s0) + 1px); flex: 0 0 auto;
  padding: var(--s0) var(--s1); border: 1px solid var(--border);
  border-radius: var(--r-pill); background: none;
  color: var(--text-dim); font-size: var(--fs-xs); font-weight: 600;
  cursor: pointer; line-height: 1;
}
.geteilt-marke:hover { color: var(--accent); border-color: var(--accent); }
.geteilt-marke:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

.geteilt-marke.geteilt-offen { color: var(--accent); border-color: var(--accent); }



.geteilt-marke { min-height: var(--h-ziel-klein); }
@media (pointer: fine) {


  .geteilt-marke { min-height: 0; }
}







.pk-zahl {
  margin-left: var(--s2); padding: 1px var(--s2); border-radius: var(--r-pill);
  background: var(--bg-hover); color: var(--text-dim);
  font-size: var(--fs-sm); font-weight: 600;
}
.fg-personen { display: flex; flex-direction: column; gap: var(--s2); }
.fg-person {
  display: flex; align-items: center; gap: var(--s3);
  padding: var(--s2) var(--s3);
  border: 1px solid var(--border); border-radius: var(--r-sm);
}
.fg-person-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1 1 auto; }
.fg-person strong { font-size: var(--fs-bd); }
.fg-stand { font-size: var(--fs-sm); color: var(--text-dim); }

.fg-person.fg-offen { border-color: var(--accent); }




.fg-person.fg-ohne strong { font-weight: 500; color: var(--text-dim); }
.fg-person.fg-ausgenommen { border-style: dashed; }
.fg-person .btn { flex: 0 0 auto; }


.fg-warnung {
  display: flex; align-items: flex-start; gap: var(--s2);
  margin: 0 0 var(--s3); padding: var(--s2) var(--s3);
  border-left: 3px solid var(--warn); border-radius: var(--r-sm); background: var(--warn-soft);
  color: var(--text); font-size: var(--fs-md); line-height: var(--lh);
}
.fg-warnung > svg { flex: none; margin-top: var(--s0); color: var(--warn); }
.fg-gruppe { margin: var(--s3) 0 0; color: var(--text-dim); font-size: var(--fs-sm); font-weight: 600; }
.fg-gruppe:first-child { margin-top: 0; }

.dialog > p.fg-warnung { margin: 0 0 var(--s3); }



.toast-stapel {
  position: fixed; left: 50%; z-index: var(--z-toast);
  bottom: calc(var(--s6) + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: var(--s2);
  width: max-content; max-width: calc(100vw - var(--s6));
  pointer-events: none;
}
body:has(#view-chat:not([hidden])) .toast-stapel {
  bottom: calc(var(--eingabe-hoehe, 120px) + var(--s3));
}


body:has(#view-chat.chat-leer:not(.chat-eng):not([hidden])) .toast-stapel {
  bottom: calc(var(--s6) + env(safe-area-inset-bottom));
}


@media (min-width: 900px) {
  body:has(#view-chat:not([hidden])) .toast-stapel { left: calc(50% + var(--sidebar-breite) / 2); }
  body:is(.leiste-schmal, .leiste-auto):has(#view-chat:not([hidden])) .toast-stapel { left: calc(50% + var(--sidebar-schmal) / 2); }
}
.toast-meldung {
  display: flex; align-items: center; gap: var(--s1);
  max-width: min(560px, calc(100vw - var(--s6)));
  padding: var(--s1) var(--s1) var(--s1) var(--s4); border-radius: var(--r-lg);
  background: var(--toast-grund); color: var(--toast-text);
  font-size: var(--fs-bd); line-height: var(--lh-eng); box-shadow: var(--shadow-stark);
  opacity: 0; transform: translateY(var(--s2));
  transition: opacity var(--tempo-lang) var(--ease), transform var(--tempo-lang) var(--ease);
  pointer-events: auto;
}
.toast-meldung.show { opacity: 1; transform: none; }
.toast-meldung.geht { opacity: 0; transform: translateY(var(--s1)); pointer-events: none;
                      transition-timing-function: var(--ease-raus); }
.toast-fehler { box-shadow: inset 3px 0 0 var(--toast-fehler), var(--shadow-stark); }
.toast-text { flex: 1 1 auto; min-width: 0; padding: var(--s2) var(--s2) var(--s2) 0; }


.toast-tat {
  flex: 0 0 auto; min-height: var(--h-ziel-klein); padding: 0 var(--s3);
  border: none; border-radius: var(--r-md); background: none; cursor: pointer;
  color: var(--toast-akzent); font: inherit; font-weight: 600;
}
.toast-tat:hover { background: var(--toast-hover); }

.toast-kuerzel { flex: 0 0 auto; margin-right: var(--s1); font-size: var(--fs-xs); color: var(--toast-text); }
@media (hover: none) { .toast-kuerzel { display: none; } }
.toast-tat:focus-visible, .toast-zu:focus-visible { outline: 2px solid var(--toast-akzent); outline-offset: 1px; }
.toast-zu {
  flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
  width: var(--h-ziel-klein); height: var(--h-ziel-klein); padding: 0;
  border: none; border-radius: var(--r-md); background: none; cursor: pointer;
  color: var(--toast-text); opacity: 0.7;
}
.toast-zu:hover { opacity: 1; background: var(--toast-hover); }








h1[tabindex="-1"]:focus, h2[tabindex="-1"]:focus, h3[tabindex="-1"]:focus { outline: none; }


a:focus-visible, button:focus-visible, input:focus-visible,
textarea:focus-visible, select:focus-visible, [tabindex]:focus-visible,
summary:focus-visible, label:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;


}




.inputbox textarea:focus-visible,
.ws-box textarea:focus-visible,
.field input:focus-visible,
.feld-form input:focus-visible,
.prompt-text:focus-visible,
.edit-box textarea:focus-visible,
.filterleiste input:focus-visible,
.filterleiste select:focus-visible,
.filterzeile input:focus-visible,
.filterzeile select:focus-visible,
.freigabe-form select:focus-visible,
.skill-form textarea:focus-visible, .skill-form select:focus-visible,
.skills-suchzeile input:focus-visible,
.freigabe-form input:focus-visible {
  outline: none;
}


@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
