/* Modul anime – Anime-Entwürfe aus der vorhandenen Lore.
   Eigene Datei, damit portal.css unberührt bleibt. */

.anime-formular { margin-bottom: 18px; }
.anime-formular .form-grid { margin-bottom: 16px; }
.anime-formular-aktionen { display: flex; justify-content: flex-end; }

.anime-hinweis { color: var(--muted); font-size: 13px; margin: 0; }

.anime-takt {
  display: flex; align-items: center; gap: 8px; margin: 0 0 16px;
  padding: 9px 13px; border: 1px solid var(--line); border-radius: 11px;
  background: var(--soft); color: var(--muted); font-size: 12px; font-weight: 600;
}
.anime-takt svg { width: 17px; height: 17px; flex: none; }
.anime-takt-voll { border-color: var(--gold); background: var(--gold-soft); color: #8a6209; }

.anime-formular input[type="text"],
.anime-formular input[type="number"],
.anime-formular select {
  width: 100%; min-height: 41px; padding: 8px 12px;
  border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink);
}
.anime-bereiche { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 0; }
.anime-bereiche legend { padding: 0 6px; font-size: 11px; font-weight: 800; }
.anime-bereiche legend small { color: var(--muted); font-weight: 400; }
.anime-bereiche-liste { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px 14px; }
.anime-bereiche-liste label { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.anime-bereiche-liste input { width: 16px; height: 16px; flex: none; }

/* Liste der Entwürfe */
.anime-liste { margin-bottom: 18px; }
.anime-liste-koerper { display: grid; gap: 10px; }
.anime-eintrag {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  border: 1px solid var(--line); border-radius: 12px; padding: 10px 13px; background: #fff;
}
.anime-eintrag.offen { border-color: var(--blue); background: #f2f9fd; }
.anime-eintrag-kopf {
  flex: 1 1 240px; min-width: 0; display: grid; gap: 3px; text-align: left;
  border: 0; background: none; padding: 0; color: inherit;
}
.anime-eintrag-titel { font: 800 14px/1.3 'Manrope', system-ui, sans-serif; word-break: break-word; }
.anime-eintrag-meta { color: var(--muted); font-size: 12px; }
.anime-eintrag-marken { display: flex; gap: 6px; }
.anime-eintrag-aktionen { display: flex; gap: 6px; margin-left: auto; }
.anime-eintrag-aktionen .icon-button { width: 34px; height: 34px; }

/* Kopf des geöffneten Entwurfs */
.anime-entwurf-marken { display: flex; gap: 6px; flex-wrap: wrap; }
.anime-trockenlauf-hinweis {
  display: flex; align-items: flex-start; gap: 9px; margin: 0 0 16px;
  border: 1px solid var(--gold); border-left-width: 4px; border-radius: 12px;
  padding: 11px 14px; background: var(--gold-soft); color: #7a5607; font-size: 13px;
}
.anime-trockenlauf-hinweis svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }

/* Kennzahl */
.anime-kennzahl { margin: 0 0 14px; }
.anime-kennzahl-balken {
  display: flex; height: 13px; border-radius: 99px; overflow: hidden;
  border: 1px solid var(--line); background: var(--soft);
}
.anime-anteil-bestand { background: var(--blue); }
.anime-anteil-neu {
  background: var(--gold);
  background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.55) 0 4px, transparent 4px 9px);
}
.anime-kennzahl-text { margin: 7px 0 0; font-size: 13px; color: var(--ink); }
.anime-kennzahl-text strong { font-weight: 800; }
.anime-kennzahl-text small { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; }

/* Legende und Schalter */
.anime-legende {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px;
  margin: 0 0 16px; padding: 11px 14px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--soft);
  font-size: 12px;
}
.anime-legende-titel { color: var(--muted); font-weight: 800; }
.anime-legende-probe { font-size: 12px; }
.anime-schalter { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; font-size: 13px; font-weight: 700; color: var(--ink); }
.anime-schalter input { width: 16px; height: 16px; }

.anime-entwurf-aktionen { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }

.anime-umbenennen {
  display: flex; flex-wrap: wrap; align-items: end; gap: 10px;
  margin: 0 0 18px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--soft);
}
.anime-umbenennen label { font-size: 11px; font-weight: 800; }
.anime-umbenennen input {
  flex: 1 1 220px; min-width: 0; min-height: 41px; padding: 8px 12px;
  border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink);
}

/* Folgen und Szenen */
.anime-folge { margin: 0 0 22px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.anime-folge-kopf {
  display: flex; flex-wrap: wrap; align-items: flex-start; gap: 12px;
  padding: 14px 16px; border-bottom: 1px solid var(--line); background: var(--soft);
}
.anime-folge-kopf > div:first-child { flex: 1 1 260px; min-width: 0; }
.anime-folge-kopf h3 { margin: 0; font: 800 16px/1.25 'Manrope', system-ui, sans-serif; word-break: break-word; }
.anime-folge-kopf p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.anime-folge-meta { font-size: 12px; }
.anime-folge-knoepfe { display: flex; flex-wrap: wrap; gap: 8px; }

.anime-szene { padding: 15px 16px; border-top: 1px solid var(--line); }
.anime-folge > .anime-szene:first-of-type { border-top: 0; }
.anime-szene-kopf h4 { margin: 0; font: 800 14px/1.25 'Manrope', system-ui, sans-serif; word-break: break-word; }
.anime-szene-kopf p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }

/* Fortlaufender Szenentext mit Herkunft */
.anime-szenentext {
  margin: 11px 0 0; font-size: 14px; line-height: 1.85;
  overflow-wrap: anywhere; word-break: break-word;
  /* Platz für den Innenabstand der letzten Auszeichnung am Zeilenende:
     Der Browser rechnet ihn beim Umbruch nicht mit. */
  padding-right: 10px;
}
.anime-teil {
  border-radius: 6px; padding: 2px 6px;
  overflow-wrap: anywhere;
  box-decoration-break: clone; -webkit-box-decoration-break: clone;
}
.anime-teil.bestand {
  background: #eaf4fb; color: var(--ink);
  border-bottom: 2px solid var(--blue);
}
.anime-teil.neu {
  background: var(--gold-soft); color: #5f4406;
  border-bottom: 2px dashed var(--orange);
  font-weight: 600;
}
/* Farbe ist nie das einzige Merkmal: jedes Stück trägt ein Zeichen und
   eine Beschriftung, dazu unterschiedliche Unterstriche. */
.anime-marke { margin-right: 3px; font-size: 11px; }
.anime-marke-text {
  display: inline-block; margin-right: 6px; padding: 0 5px;
  border-radius: 5px; font-size: 10px; font-weight: 800;
  letter-spacing: .04em; text-transform: uppercase; vertical-align: 1px;
}
.anime-teil.bestand .anime-marke-text { background: var(--blue); color: #fff; }
.anime-teil.neu .anime-marke-text { background: var(--orange); color: #fff; }
.anime-grund { margin-left: 5px; font-size: 11px; font-weight: 400; font-style: italic; color: #7a5607; }

.anime-ausgeblendet { display: none; margin: 9px 0 0; color: var(--muted); font-size: 12px; font-style: italic; }
.anime-nur-neu .anime-teil.bestand { display: none; }
.anime-nur-neu .anime-ausgeblendet { display: block; }

/* Die beiden Vorgaben */
.anime-vorgaben { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
.anime-vorgabe { border: 1px solid var(--line); border-radius: 12px; padding: 11px 13px; background: #fff; min-width: 0; }
.anime-vorgabe-kopf { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.anime-vorgabe-kopf label { font-size: 11px; font-weight: 800; }
.anime-vorgabe-knoepfe { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.anime-vorgabe-knoepfe .button { min-height: 34px; padding: 5px 11px; font-size: 12px; }
.anime-vorgabe-feld {
  width: 100%; max-width: 100%; padding: 9px 11px; resize: vertical;
  border: 1px solid var(--line); border-radius: 10px; background: var(--soft); color: var(--ink);
  font: 12px/1.6 'DM Sans', system-ui, sans-serif; white-space: pre-wrap; word-break: break-word;
}
.anime-rueckmeldung { margin: 0; min-height: 0; font-size: 12px; font-weight: 700; }
.anime-rueckmeldung.sichtbar { margin-top: 7px; }
.anime-rueckmeldung.gut { color: var(--green); }
.anime-rueckmeldung.schlecht { color: var(--red); }

/* Schmale Fenster: durchgehend einspaltig, nichts läuft seitlich über. */
@media (max-width: 900px) {
  .anime-vorgaben { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .anime-bereiche-liste { grid-template-columns: 1fr; }
  .anime-schalter { margin-left: 0; width: 100%; }
  .anime-eintrag-aktionen { margin-left: 0; }
  .anime-folge-knoepfe { width: 100%; }
  .anime-folge-knoepfe .button { flex: 1 1 180px; }
  .anime-entwurf-aktionen .button { flex: 1 1 140px; }
}
