/* Notizen: ein Feed, keine Unterhaltung. Keine Blasen, kein Ton, kein Zähler außer den Antworten.
   Dazu die Schreibseite mit Trix-Editor. */
@layer seiten {
  .notizen { max-width: 40rem; margin: 0 auto; }
  .notizen-gast, .notizen-leer { font-size: .95rem; margin: 0 0 1rem; }
  .schreib-oeffner { display: flex; align-items: center; justify-content: space-between; border: 1px solid var(--rand); border-radius: var(--rundung); background: var(--flaeche); padding: .9rem 1rem; color: inherit; text-decoration: none; margin-bottom: 1rem; }
  .schreib-oeffner span { opacity: .55; font-size: 1.05rem; }
  .schreib-oeffner small { display: inline-flex; align-items: center; gap: .3rem; background: var(--d-akzent); color: var(--akzent-text); border-radius: var(--rundung-pille); padding: .25rem .8rem; }
  .notiz { padding: .9rem 0; border-bottom: 1px solid var(--rand); }
  .notiz header { display: flex; align-items: center; gap: .7rem; padding: 0; border: 0; background: transparent; }
  .notiz .kopf-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
  .notiz .kopf-zeile.klein { font-size: .85rem; opacity: .6; }
  .notiz .kopf-zeile.klein a { color: inherit; text-decoration: none; }
  .notiz .kopf-zeile.klein .wann { margin: 0; font-size: inherit; opacity: 1; }
  .notiz .wer { color: inherit; text-decoration: none; }
  .notiz .wer:hover { text-decoration: underline; }
  .notiz header form { margin-left: auto; }
  .notiz header .weiter { margin-left: auto; font-size: .8rem; padding: .2rem .7rem; }
  .notiz-weg { margin-left: auto; font-size: .75rem; padding: .1rem .5rem; opacity: .4; }
  .notiz-weg:hover { opacity: 1; }
  .notiz > .inhalt, .notiz > details.mehr, .notiz > .inhalt .trix-content { font-size: 1.12rem; line-height: 1.5; }
  .notiz > .inhalt { margin-top: .6rem; }
  .notiz a.wann { color: inherit; text-decoration: none; }
  .weitersagen-zeile { margin: 0 0 .3rem; font-size: .8rem; opacity: .6; }
  .weitersagen-zeile a { color: inherit; }
  .notiz.weitergesagt .weitersagen-zeile { margin-bottom: .5rem; }
  /* Lange Notiz eingeklappt */
  .mehr > summary p { margin: .35rem 0 0; white-space: pre-wrap; font-size: 1.05rem; line-height: 1.45; }
  .mehr > summary span { display: inline-block; margin-top: .3rem; font-size: .9rem; opacity: .6; }
  .mehr[open] > summary { display: none; }
  .mehr > p { margin: .35rem 0 0; white-space: pre-wrap; font-size: 1.05rem; line-height: 1.45; }
  /* Antworten-Faden und Aktionszeile */
  .faden { margin-top: .5rem; font-size: .95rem; }
  .faden > summary { opacity: .6; padding: .3rem 0; min-height: 1.6rem; }
  .faden > summary:hover { opacity: 1; }
  .faden > summary.notiz-aktionen { display: flex; gap: 1.4rem; align-items: center; padding: .6rem 0 .2rem; opacity: .75; font-size: .9rem; cursor: default; margin: 0; }
  .notiz-aktionen { margin: .4rem 0 0; font-size: .85rem; opacity: .65; display: flex; gap: .4rem; align-items: baseline; }
  .notiz-aktionen form { display: inline; }
  .antworten { margin: .2rem 0 0 .6rem; padding-left: .8rem; border-left: 2px solid var(--ton-3); }
  .antwort { padding: .4rem 0; display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
  .antwort p { margin: .15rem 0 0; flex-basis: 100%; white-space: pre-wrap; }
  .antwort .avatar-link { margin-right: .1rem; }
  .antwort .inhalt { flex-basis: 100%; padding-left: 1.9rem; }
  .antwort-form { margin: .5rem 0 0 1.4rem; flex-direction: column; align-items: flex-end; gap: .4rem; }
  .antwort-form textarea.eingabe, .antwort-form trix-editor { width: 100%; }
  .antwort-form trix-toolbar { display: none; }
  .zitat { margin: .3rem 0; padding: .3rem .7rem; border-left: 2px solid var(--ton-5); opacity: .75; font-size: .95rem; }
  .zitat-kasten { display: block; margin-top: .6rem; padding: .6rem .8rem; border: 1px solid var(--rand); border-radius: var(--rundung); color: inherit; text-decoration: none; background: var(--ton-1); }
  a.zitat-kasten:hover { border-color: var(--rand-stark); }
  .zitat-kopf { display: flex; align-items: center; gap: .4rem; font-size: .85rem; margin-bottom: .1rem; }
  .zitat-kasten .inhalt { font-size: .95rem; }
  .zitat-weg { opacity: .55; font-style: italic; }
  /* Schreibseite */
  .schreibseite { flex-direction: column; gap: .8rem; }
  .schreib-wer { display: flex; align-items: center; gap: .4rem; margin: 0; }
  .notiz-form { flex-direction: column; gap: .4rem; margin-bottom: 1.4rem; }
  .notiz-form-zeile { display: flex; align-items: center; gap: .8rem; }
  .notiz-form-zeile .tipp { margin: 0; flex: 1; }
  .antwort-wahl { margin: 0; display: flex; justify-content: flex-end; }
  .antwort-wahl select { text-align: right; font-size: .9rem; }
  .planen input[type=datetime-local] { padding: .35rem .6rem; }
  trix-editor.notiz-editor { border: 0; padding: .2rem 0; min-height: 10rem; font-size: 1.1rem; line-height: 1.5; color: CanvasText; background: transparent; }
  trix-editor.notiz-editor:empty::before, trix-editor.antwort-editor:empty::before { opacity: .45; }
  trix-editor.antwort-editor { min-height: 3.5rem; width: 100%; }
  trix-toolbar { position: sticky; top: 0; z-index: 2; background: var(--grund); padding: .3rem 0; }
  trix-toolbar .trix-button-group { border: 0; margin-bottom: .2rem; }
  trix-toolbar .trix-button-group:not(:first-child) { margin-left: .6rem; }
  trix-toolbar .trix-button-row { justify-content: flex-start; gap: .2rem; }
  trix-toolbar .trix-button { --k-grund: transparent; border: 0; border-radius: var(--rundung-klein); color: CanvasText; opacity: .7; min-width: 2.4rem; height: 2.2rem; font-size: 1rem; }
  trix-toolbar .trix-button:not(:first-child) { border-left: 0; }
  trix-toolbar .trix-button.trix-active { background: var(--akzent-mittel); opacity: 1; }
  trix-toolbar .trix-button--icon::before { filter: invert(1); opacity: .8; }
  @media (prefers-color-scheme: light) { trix-toolbar .trix-button--icon::before { filter: none; } }
  :root[style*="color-scheme: light"] trix-toolbar .trix-button--icon::before { filter: none; }
  :root[style*="color-scheme: dark"] trix-toolbar .trix-button--icon::before { filter: invert(1); }
  trix-toolbar .trix-button[data-trix-attribute=underline] { text-decoration: underline; font-weight: 600; text-indent: 0; width: 2.4rem; }
  trix-toolbar [data-trix-attribute=strike], trix-toolbar [data-trix-attribute=heading1], trix-toolbar [data-trix-attribute=code],
  trix-toolbar [data-trix-attribute=bullet], trix-toolbar [data-trix-attribute=number], trix-toolbar [data-trix-action=decreaseNestingLevel],
  trix-toolbar [data-trix-action=increaseNestingLevel], trix-toolbar [data-trix-action=undo], trix-toolbar [data-trix-action=redo], trix-toolbar .trix-button-group--history-tools, trix-toolbar .trix-button-group-spacer { display: none; }
  trix-toolbar .trix-dialog { background: var(--flaeche); border-color: var(--rand-stark); color: CanvasText; }
  trix-toolbar .trix-dialog input[type=url] { background: var(--feld); color: CanvasText; border-color: var(--rand-stark); }
  trix-toolbar .trix-dialog .trix-button { color: CanvasText; }
  .inhalt, .trix-content { overflow-wrap: anywhere; line-height: 1.45; }
  .inhalt > .trix-content > div, .inhalt p { margin: .35rem 0 0; }
  .inhalt blockquote, .trix-content blockquote { margin: .4rem 0; padding: .2rem .8rem; border-left: 3px solid var(--ton-5); opacity: .85; }
  .inhalt a { color: var(--d-akzent); }
  .inhalt .attachment img, .trix-content .attachment img, trix-editor .attachment img { max-width: 100%; height: auto; border-radius: var(--rundung); margin-top: .5rem; display: block; }
  .inhalt .attachment__caption, trix-editor .attachment__caption { font-size: .8rem; opacity: .6; text-align: left; }
  .inhalt .attachment--file { border: 1px solid var(--rand); border-radius: var(--rundung-klein); padding: .3rem .6rem; margin-top: .4rem; }
  .profil .notizen { margin-top: 1.4rem; }
}
@layer handy {
  @media (max-width: 48rem) {
    .aktion-wort { display: none; }
    .faden > summary.notiz-aktionen { gap: 2.2rem; }
    .notizen { max-width: none; }
    .notiz { padding: 1rem .2rem; border-bottom: .5rem solid var(--ton-2); }
    .notiz:last-child { border-bottom: 0; }
    .schreib-oeffner { display: none; }
    .notiz-form textarea.eingabe { font-size: 1rem; min-height: 4rem; }
    .notiz > p { font-size: 1rem; }
    .notiz-weg { padding: .3rem .6rem; opacity: .6; }
    .antworten { margin-left: .2rem; padding-left: .6rem; }
    .antwort-form { margin-left: .8rem; }
    .antwort-form input[type=submit] { width: 100%; }
    .sichtbar-wahl { flex-basis: 100%; }
    .sichtbar-wahl small { display: none; }
    .notizen:has(.schreibseite) { margin: 0; }
    trix-editor.notiz-editor { min-height: 14rem; }
    .schreibseite .notiz-form-zeile { flex-direction: column; align-items: stretch; gap: .6rem; }
  }
}
