/* ========== LAYOUT & GRUNDSTIL ==========
   Layout-Zentrierung & Schrift */
   @import url('https://fonts.googleapis.com/css2?family=Lexend&display=swap');
   @import url('https://fonts.googleapis.com/css2?family=Comic+Neue&display=swap');
   @import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');


   html, body {
    overflow-x: hidden;
    max-width: 100%;
  }
  
  body {
    max-width: 100%; /* volle Breite */
    margin: 0;       /* kein Auto-Zentrieren für den gesamten Body */
    font-family: 'Comic Neue', 'Lexend', Arial, sans-serif;
    background-color: #ffffff;
    font-size: 1.2em;
    line-height: 1.5;
    color: #333;
  }
  

button.secondaryButton {
  display: block;
}


/* ========== ÜBERSCHRIFTEN ==========
   Modernes Aussehen */
h2 {
  font-family: 'Comic Neue', Arial, sans-serif;
  font-size: 1.2em;
  font-weight: bold;
  margin-top: 2em;
  margin-bottom: 0.8em;
}

.leuchteffekt {
  box-shadow: 0 0 15px 5px gold;
  transition: box-shadow 0.3s ease;
}


/* ========== BUTTONS ==========
   Klar & modern */
button,
.primaryButton,
.secondaryButton {
  padding: 0.5em 1.2em;
  font-size: 0.8em;
  border: none;
  border-radius: 0.4em;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

button:hover,
.primaryButton:hover,
.secondaryButton:hover {
  opacity: 0.95;
  transform: scale(1.03);
}

#compareButton {
  background-color: #28a745;
  color: white;
}

.primaryButton {
  background-color: #e0e0e0;
  color: white;
  display: block;
  margin: 2em auto;
}

.secondaryButton {
  background-color: #e0e0e0;
  color: #333;
  display: block;
  margin: 2em auto;
}

.secondaryButton:hover {
  background-color: #d0d0d0;
}



abbr[data-title] {
  position: relative;
  cursor: help;
}

abbr[data-title] {
  position: relative;
}

abbr[data-title]::after {
  content: attr(data-title);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translate(-30%, -0.5em);
  background: black;
  color: white;
  padding: 0.2em 0.4em;
  border: 1px solid #666;
  border-radius: 0.2em;
  font-size: 0.8em;
  font-family: "Comic Sans MS", "Comic Sans", cursive;
  white-space: nowrap;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.1s;
  box-shadow: none;
}

abbr[data-title]:hover::after {
  opacity: 1;
}

abbr.bild-tooltip::after {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translate(-50%, -0.5em);
  background: none;
  padding: 0;
  border: none;
  border-radius: 0.2em;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.1s;
  width: 200px;
  height: auto;
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
}

abbr.bild-tooltip:hover::after {
  opacity: 1;
  background-image: attr(data-img url);
}

.bild-tooltip {
  position: relative;
  text-decoration: underline dotted;
  cursor: help;
  color: black;
}

.tooltip-bild {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: 150px;
  border: 1px solid #666;
  border-radius: 4px;
  box-shadow: 0 0 8px rgba(0,0,0,0.2);
  display: none;
  z-index: 999;
}

.bild-tooltip:hover .tooltip-bild {
  display: block;
}




abbr[data-title]:hover::after {
  opacity: 1;
}


/* ========== MARKIERUNGEN ==========
   Wortauswahl optisch hervorheben */
.word {
  cursor: pointer;
  border-radius: 0.2em;
  padding: 0 0.15em;
  transition: background-color 0.3s;
}

.marked {
  background-color: #ffe599;
}

.word:hover {
  background-color: #cfe2ff;
  box-shadow: 0 0 2px #007bff;
}

/* ========== INSTRUKTIONEN ==========
   Hinweistexte hervorheben */



   .app-frame {
    position: relative;
    overflow: visible;
  }


.instruction {
  background-color: #f2e9d7;
  border-left: 4px solid #c3b59c;
  padding: 0.8em 1em;
  margin: 2em 0 1.5em;
  font-family: 'Comic Neue', Arial, sans-serif;
  font-size: 0.95em;
  line-height: 1.8;
  font-weight: 500;
  color: #003366;
  border-radius: 0.4em;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  overflow: visible;
}

.instruction-text {
  font-family: 'Comic Neue', Arial, sans-serif;
  font-size: 1.0em;
  flex-grow: 1;
}

.right-help {
  flex-shrink: 0;
  margin-left: 1em;
}


/* ========== BOXEN ==========
   Für markierte Informationen */
.box {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  background: #f0f0f0;
  padding: 0.4rem 0.6rem;
  margin: 0.2rem;
  border-radius: 0.5em;
  border: 1px solid #ccc;
  max-width: 100%;
  font-size: 1em;
}

.box input[type="text"] {
  border: none;
  outline: none;
  background: transparent;
  font-size: 1em;
  font-family: inherit;
  color: inherit;
  padding: 0;
  margin: 0;
  width: auto;
  flex: 0 1 auto;
  min-width: 1ch;
  max-width: 100%;
}

/* ========== TABELLE ==========
   Modern und flexibel */
table {
  border-collapse: collapse;
  width: 100%;
  margin: 2em 0;
  table-layout: auto;
}

th,
td {
  border: 1px solid #aaa;
  padding: 0.6em;
  word-break: break-word;
  white-space: normal;
  text-align: center;
}

th {
  background-color: #dddddd;
  font-weight: bold;
}

/* ========== FLEXFELDER ==========
   Für Punktebild etc. */
#dotFieldContainer {
  display: flex;
  gap: 2em;
  align-items: flex-start;
  margin: 2em 0;
}

#dotFieldContainer {
  flex-direction: column;
}

/* ========== RESPONSIVE ==========
   Anpassung für kleinere Bildschirme */
@media (max-width: 768px) {
  #dotFieldContainer {
    flex-direction: column;
  }
  button {
    width: 100%;
    margin: 0.5em 0;
  }
}

#languageHelper {
  display: none;
}

/* Dezente Gestaltung für den Check-Button */
.secondaryButton {
    background-color: #e6f0fa;
    color: #003366;
    border: 1px solid #b3d1f0;
  }
  
  .secondaryButton:hover {
    background-color: #d9eafc;
    border-color: #80bfff;
    color: #002244;
  }
  
  html, body {
    height: auto;
    overflow-y: auto;
  }
  

  .modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0,0,0,0.5); /* halbtransparent schwarzer Hintergrund */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
  }
  
  .modal-content {
    background-color: white;
    width: 80vw;
    height: 80vh;
    padding: 2em;
    overflow: auto;
    border-radius: 0.5em;
    position: relative;
  }
  
  .modal.hidden {
    display: none;
  }
  
  .close-button {
    position: absolute;
    top: 1em;
    right: 1em;
    cursor: pointer;
    font-size: 1.5em;
  }
  
  .hidden {
    display: none;
  }
  
 /* Stil für den Hilfe-Link wie bei anderen Buttons */
.help-link {
  display: inline-block;
  padding: 0.3em 0.8em;
  margin-left: 1em;
  border-radius: 0.5em;
  font-size: 0.95em;
  font-family: 'Comic Neue', Arial, sans-serif;
  color: #333;
  border: none;
  box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.1);
  cursor: pointer;
}


 
.app-frame {
  border: none;
  border-radius: 0;
  padding: 1.25em;                  /* kompakterer Innenabstand */
  margin: 1em auto;                 /* weniger Abstand nach oben/unten */
  max-width: 900px;                 /* Max. Breite */
  background-color: #ffffff;
  box-shadow: none;
}

.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: #fdf6ec;
  border-bottom: 2px solid #ccc;
  padding: 0.5em 1em;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 999;
}

.logo {
  height: 2.5em;
}

.kinderbild {
  height: 4em;
}

.top-buttons button {
  margin-left: 0.5em;
  padding: 0.4em 1em;
  font-size: 1em;
  background: #d0e3f0;
  border: 1px solid #999;
  border-radius: 6px;
  cursor: pointer;
}

/* Abstand unter der fixierten Leiste */
body {
  margin-top: 3.4em;
}

.logo-fixed {
  position: fixed;
  top: 5em;              /* Abstand vom oberen Rand */
  left: -0.05em;             /* Abstand vom linken Rand */
  height: 12em;           /* Größe des Logos */
  z-index: 999;          /* Immer sichtbar */
}

#b_aufgabe,
#a_aufgabe,
#c_aufgabe,
#d_aufgabe,
#r_aufgabe {
  margin-top: 1.2em;
  padding: 0em;
  background-color: white;
  border-radius: 1em;
}

/* Lerninhalt: einheitliche Typografie (Inter, gleiches Komma/Zahlenbild) */
#a_aufgabe,
#b_aufgabe,
#c_aufgabe,
#d_aufgabe,
#r_aufgabe,
#wissensspeicher-page,
#wissensspeicher-dock-page,
.mw-kapitel-wrap,
.mw-kapitel-uebersicht,
#mw-breadcrumb-bar,
#mw-breadcrumb-bar .mw-breadcrumb {
  font-family: Inter, Arial, sans-serif;
  font-feature-settings: "liga" 0, "calt" 0;
  font-variant-ligatures: none;
}

#a_aufgabe button,
#a_aufgabe input,
#a_aufgabe textarea,
#a_aufgabe select,
#wissensspeicher-page button,
#wissensspeicher-page input,
#wissensspeicher-page textarea,
#wissensspeicher-page select,
#wissensspeicher-dock-page button,
#wissensspeicher-dock-page input,
#wissensspeicher-dock-page textarea,
#wissensspeicher-dock-page select {
  font-family: inherit;
  font-feature-settings: inherit;
}

/* Legacy `th, td { Comic Sans / cursive }` weiter unten — auf iPad ohne Comic Sans
   → System-Cursive (Schnörkel). Lern-Tabellen erben Inter; Eingabe-Fonts (!important) bleiben. */
#a_aufgabe th,
#a_aufgabe td,
#b_aufgabe th,
#b_aufgabe td,
#c_aufgabe th,
#c_aufgabe td,
#d_aufgabe th,
#d_aufgabe td,
#r_aufgabe th,
#r_aufgabe td,
#wissensspeicher-page th,
#wissensspeicher-page td,
#wissensspeicher-dock-page th,
#wissensspeicher-dock-page td,
.ws-page th,
.ws-page td,
.mw-kapitel-wrap th,
.mw-kapitel-wrap td,
.mw-kapitel-uebersicht th,
.mw-kapitel-uebersicht td {
  font-family: inherit;
  font-feature-settings: inherit;
}

.top-bar-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  backdrop-filter: blur(10px);
  background: #2CA1C6 !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  display: flex;
  justify-content: center;
  z-index: 999;
  padding: 0.3em 0.5em;
  transform: translateY(0);
  transition: transform 0.4s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border-radius: 0 0 1em 1em;
}
.top-bar-wrapper.hidden {
  transform: translateY(-100%);
}
.menu {
  display: flex;
  gap: 1em;
  align-items: center;
  font-size: 0.9em;
  font-family: sans-serif;
}
.menu-item {
  position: relative;
  cursor: pointer;
}
.menu-item:hover .menu-dropdown-content {
  display: block;
}
.menu-dropdown-content {
  display: none;
  position: absolute;
  top: 2em;
  left: 0;
  background: white;
  border: 1px solid #ccc;
  border-radius: 0.5em;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  padding: 0.5em 1em;
  font-size: 0.9em;
  white-space: nowrap;
  z-index: 1000;
}
.menu-item::after {
  content: '▼';
  font-size: 0.7em;
  margin-left: 0.3em;
}
.menu-dropdown-content a {
  display: block;
  padding: 0.3em 0;
  color: black;
  text-decoration: none;
}
.menu-dropdown-content a:hover {
  text-decoration: underline;
}
.menu-button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1em;
  box-shadow: none;
  padding: 0;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.menu-button img.mw-topbar-icon--color {
  width: 26px;
  height: 26px;
  object-fit: contain;
  filter: none;
  vertical-align: middle;
}


.instruction-hervorgehoben {
  background-color: #d3eacb !important;
  border-left: 4px solid #6d9f4b;
  color: white !important;
  font-weight: bold;
}

.instruction-gruen {
  background-color: #8aac63 !important;
  border-left: 4px solid #5a7f3f;
  color: white !important;
  font-weight: bold;
}

.instruction-gruen span {
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.4;
}



.instruction-orange {
  background-color: #e17f1d !important; /* Orange aus Screenshot */
  border-left: 4px solid #c4680d; /* etwas dunklerer Orangeton */
  color: white;
  font-weight: bold;
}
.instruction-blau {
  background-color: #4f7ecf !important;
  border-left: 4px solid #3a5dab;
  color: white;
  font-weight: bold;
}


.instruction-rot {
  background-color: #d12a1a; /* kräftiges Rot */
  border-left: 4px solid #a00;
  color: white;
  font-weight: bold;
}

.drag-card:active {
  opacity: 0.6;
}
.drop-zone > .drag-card {
  margin-top: 0.3em;
}


#exportOverviewBtn img {
  height: 1.1em;
  vertical-align: middle;
  margin-right: 0.4em;
}

#exportOverviewBtn {
  display: flex;
  align-items: center;
  gap: 0.4em;
  background: none;
  border: none;
  font: inherit;
  cursor: pointer;
  padding: 0.3em 0.6em;
}


#btnUndo {
  font-size: 1em;
  margin-left: 0.5em;
  padding: 0.4em 0.8em;
  background-color: #e0e0e0;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

#btnUndo:hover {
  background-color: #d0d0d0;
}

.menu-button {
  font-size: 1.4em;
  background: none;
  border: none;
  cursor: pointer;
  margin: 0 0.3em;
}

.menu-button:hover {
  filter: brightness(85%);
}



.memory-card {
  perspective: 1000px;
  width: 8em;
  height: 8em;
  position: relative;
}

.memory-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s;
  transform-style: preserve-3d;
}

.memory-card.flipped .memory-card-inner {
  transform: rotateY(180deg);
}

.memory-card-front, .memory-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #888;
  border-radius: 0.6em;
}

/* Sichtbare Seite zu Beginn */
.memory-card-front {
  background: repeating-linear-gradient(
    45deg,
    #d1e0e0,
    #d1e0e0 10px,
    #b0c4c4 10px,
    #b0c4c4 20px
  );
  font-family: 'Comic Neue', sans-serif;
  font-size: 1.2em;
  font-weight: bold;
  color: #003366;
  box-shadow: inset 0 0 5px rgba(0,0,0,0.2);
}

/* Rückseite mit Inhalt */
.memory-card-back {
  background: white;
  transform: rotateY(180deg);
  text-align: center;
  padding: 0.5em;
  font-size: 1em; /* evtl. kleiner setzen */
  box-sizing: border-box; /* verhindert, dass Padding/Border die Größe aufblähen */
  overflow: hidden; /* verhindert Überlauf */
}

.memory-card-back img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}





/* Eckenbeschriftung */
.memory-card-front::before {
  position: absolute;
  top: 0.4em;
  left: 0.5em;
}
.memory-card-front::after {
  position: absolute;
  bottom: 0.4em;
  right: 0.5em;
}
.memory-card-front span.i {
  position: absolute;
  top: 0.4em;
  right: 0.5em;
}
.memory-card-front span.r {
  position: absolute;
  bottom: 0.4em;
  left: 0.5em;
}


@keyframes leuchten {
  0% { filter: brightness(1); }
  50% { filter: brightness(1.8); }
  100% { filter: brightness(1); }
}

.leuchteffekt {
  animation: leuchten 0.6s ease;
}

.top-bar-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center; /* ✅ vertikal mittig */
  height: 3.5em; /* ✂️ Höhe bewusst begrenzt */
  padding: 0 1em;
  background: white;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  z-index: 1000;
}

.top-bar-wrapper .logo-icons img {
  height: 40px;
  margin-right: 0.3em;
}

.top-bar-wrapper .menu {
  display: flex;
  align-items: center;
  gap: 1em;
}


.instruction-box {
  background-color: #8aac63;
  color: white;
  border-radius: 1em;
  padding: 1em;
  margin: 2em auto;
  max-width: 600px;
  font-family: 'Comic Neue', sans-serif;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.instruction-box h2 {
  margin-top: 0;
  display: flex;
  align-items: center;
  gap: 0.5em;
  font-size: 1.2em;
}

.instruction-box img {
  height: 2em;
}

.instruction-box p {
  margin: 0.8em 0 0;
  font-size: 1.1em;
}


#b_aufgabe {
  min-height: 50px;
}


.hervor {
  background-color: #ffff99;
  color: #000;
  font-weight: bold;
  padding: 0.1em 0.2em;
  border-radius: 0.3em;
}

  .logo-fixed-left {
      position: fixed;
      top: 6em;
      left: 0.5em;
      height: 12em;
      z-index: 999;
    }
    .logo-fixed-right {
      position: fixed;
      top: 6em;
      right: 0.5em;
      height: 12em;
      z-index: 999;
    }
    .card-info {
      position: fixed;
      top: 3em;
      left: 2em;
      background: #ffffff;
      border-radius: 1em;
      box-shadow: 0 6px 14px rgba(0,0,0,0.12);
      overflow: hidden;
      width: 160px;
      font-size: 0.75em;
      line-height: 1.2;
      font-family: 'Comic Neue', sans-serif;
      z-index: 1000;
    }
    .card-info-header {
      background-color: #e3f2fd;
      text-align: center;
      font-weight: bold;
      padding: 0.4em;
      color: #01579b;
    }
    .card-info-content {
      padding: 0.5em;
      font-weight: bold;
    }
    audio {
      display: none;
    }


    .dot {
      transition: all 0.2s ease;
    }
    
    .dot:hover {
      transform: scale(1.1);
      cursor: pointer;
    }
    
    .fuenfer-block {
      padding: 0.3em;
      border-radius: 0.4em;
      background: #f7f7f7;
      box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.05);
    }
    
    .dot-row {
      transition: background 0.2s ease;
    }
    
    .dot-row:hover {
      background: #f0f0f0;
      border-radius: 0.5em;
    }

    .dot-row {
      margin-bottom: 0.1em;
    }
    
    .dot-row.gruppenabstand {
      margin-bottom: 1em;
    }
    
    body {
      color: black;
      font-family: sans-serif;
    }
    .unterstreichbar {
      cursor: pointer;
      padding: 0.15em 0.3em;
      border-radius: 4px;
      transition: background-color 0.3s;
      font-size: 1em;
    }
    .unterstreichbar:hover {
      background-color: #fce8e6;
    }
      
    .unterstreichbar.aktiv {
      text-decoration: underline red;
      background-color: #fbb;
    }
    th {
      white-space: nowrap;
      text-align: center;
      color: black;
    }
    th, td {
vertical-align: middle;
text-align: left;
font-family: "Comic Sans MS", "Comic Sans", cursive;
font-size: 1em;
color: black;
}

.unterstreichbar {
  cursor: pointer;
  display: inline-block;
  padding: 0.2em;
}
.unterstreichbar.aktiv {
  text-decoration: underline;
  background-color: #d7ebf9;
}


    .app-frame h2 {
      font-size: 1.3em;
      margin-bottom: 0.3em;
      margin-top: 0.3em;
      color: black;
    }
    .app-frame p {
      font-size: 1.5em;
      color: black;

       .app-frame {
  position: relative;
  overflow: visible;
}
    }
    .instruction {
      font-size: 1.3em;
      margin-bottom: 0.8em;
      color: black;
      position: relative;
overflow: visible;
box-sizing: border-box;
max-width: 100%;
width: 100%;
flex: 0 0 100%;
    }

    .instruction div {
      line-height: 1.6em;
    }
    .instruction abbr[title] {
      font-size: 1em;
      color: black;
    }
    .auswertung-only .instruction,
    .auswertung-only .app-frame:not(#auswertungBox) {
      display: none !important;
    }
    .orange-frame {
      border: 4px solid orange !important;
    }
    .auswertung-only #auswertungBox {
      display: block !important;
    }


    .logo-fixed-left {
      position: fixed;
      top: 2em;
      left: 0em;
      height: 18em;
      z-index: 999;
    }
    .logo-fixed-right {
      position: fixed;
      top: 6em;
      right: 0.5em;
      height: 12em;
      z-index: 999;
    }
    audio {
      display: none;
    }

    #abschlussButton {
      position: fixed;
      bottom: 2vh;
      right: 2vw;
      background-color: #4CAF50;
      color: white;
      border: none;
      padding: 0.8em 1.2em;
      border-radius: 0.8em;
      font-size: 1em;
      box-shadow: 0 4px 8px rgba(0,0,0,0.2);
      cursor: pointer;
      z-index: 1000;
    }
  
    #abschlussButton:hover {
      background-color: #45a049;
    }


    .instruction-rot,
.instruction-rot * {
  color: white !important;
  font-size: 1em;
  line-height: 1.2;
}

.instruction-gruen,
.instruction-gruen * {
  color: white !important;
  font-size: 1em;
  line-height: 1.2;
}

.instruction-blau,
.instruction-blau * {
  color: white !important;
  font-size: 1em;
  line-height: 1.2;
}

.instruction-orange,
.instruction-orange * {
  color:  white !important;
  font-size: 1em;
  line-height: 1.2;
}

.reflektieren-row {
  display: flex;
  align-items: flex-start;
  margin-top: 2.5em;
}

.nachgedacht-btn {
  transform: scale(0.7); /* 70% Größe */
  transform-origin: left center;
  display: inline-flex;
  align-items: center;
  background: #bdbdb8;
  border-radius: 0.6em;
  padding: 0.21em 1.1em 0.21em 0.7em;
  font-size: 1.15em !important; /* vorher 1.6em, jetzt ca. 28% kleiner */
  font-family: 'Inter',Arial,sans-serif;
  font-weight: 600;
  color: #484849;
  box-shadow: 0 1px 6px #d4d4cc55;
  margin-right: 1.3em;
  min-width: 2em;
}

.nachgedacht-btn .icon {
  font-size: 1.15em;
  margin-right: 0.35em;
  color: #fff;
  opacity: 0.98;
  font-weight: 400;
  transform: translateY(-1px);
}
.nachgedacht-btn .text-grey { color: #484849; font-weight: 600;}
.nachgedacht-btn .text-white { color: #fff; font-weight: 700;}
.aufgabe-reflektieren-c {
  color: #1976d2;
  font-size: 1.32em;
  font-weight: 700;
  font-family: Inter, Arial, sans-serif;
}

/* Plattform: Dialog/Overlay (Druck, Wissensspeicher, digitales Material) */
.pm-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.pm-hidden { display: none !important; }
.pm-dialog {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
  width: min(92vw, 900px);
  height: min(92vh, 820px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.pm-header {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid #eef1f4;
  background: linear-gradient(#f9fbfd, #f2f6fb);
}
.pm-title {
  font-weight: 700;
  color: #123;
  font-size: 1rem;
  letter-spacing: 0.2px;
}
.pm-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.pm-btn {
  appearance: none;
  border: 1px solid #cfd9e6;
  background: #fff;
  color: #123;
  padding: 0.45rem 0.7rem;
  border-radius: 10px;
  font-size: 0.92rem;
  cursor: pointer;
  font-family: inherit;
}
.pm-btn:hover { background: #f3f7fc; }
.pm-body {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}
.pm-body--light { background: #fff; }
.pm-body--dark { background: #0a0f14; }
#printOverlay .pm-body--light .pm-body-inner--media {
  background: #fff;
}
.pm-body-inner {
  position: absolute;
  inset: 0;
  overflow: auto;
}
.pm-body-inner--doc {
  position: relative;
  inset: auto;
  display: block;
  padding: 1em 1.2em 1.2em;
}
.pm-body-inner--media {
  display: flex;
  align-items: center;
  justify-content: center;
}
.pm-media {
  max-width: 100%;
  max-height: 100%;
  transform-origin: center center;
}

#printOverlay .pm-dialog {
  width: min(96vw, 1200px);
  height: min(96vh, 940px);
}

/* PDF-Vorschau im Druck-Overlay */
#printOverlay .pm-body-inner.pm-pdf-mode {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: stretch;
  overflow: hidden;
  padding: 0;
}
#printOverlay .pm-body-inner.pm-pdf-mode.pm-pdf-zoomed {
  overflow: auto;
}
.pm-body.pm-pdf-body {
  background: #525659;
}
#printOverlay #pm-pdf.pm-pdf-full,
#printOverlay .pm-body-inner.pm-pdf-mode #pm-pdf {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  border: 0;
  display: block;
  transform-origin: center center;
}

@media (pointer: coarse) {
  .pm-btn { padding: 0.6rem 0.9rem; font-size: 1rem; }
}

#wissensspeicher-overlay .pm-dialog {
  width: min(96vw, 1200px);
  height: min(94vh, 920px);
}

/* Wissensspeicher: Einzelseite (Bearbeitung) */
.ws-page {
  font-family: Inter, Arial, sans-serif;
  max-width: 1200px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid #e3e3e3;
  box-shadow: 0 4px 24px #e0e0e0;
}
.ws-page-kopf {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1em;
  border-bottom: 2px solid #22684e;
  background: #e8f1eb;
  padding: 0.6em 1.4em 0.55em 1.2em;
}
.ws-page-kopf-titel {
  color: #22684e;
  font-size: 1.11em;
  font-weight: 600;
  line-height: 1.35;
  min-width: 0;
}
.ws-page-kopf-grund {
  color: #22684e;
  font-size: 1.19em;
  font-weight: 700;
  flex-shrink: 0;
  white-space: nowrap;
}
.ws-inhalt {
  padding: 1.2em 1.4em 1.2em 1.4em;
}

#wissensspeicher-overlay #wissensspeicher-page,
#wissensspeicher-dock #wissensspeicher-dock-page {
  position: absolute;
  inset: 0;
  overflow-x: hidden;
  overflow-y: auto;
  /* kein -webkit-overflow-scrolling:touch — WebKit verliert sonst den Caret in Eingaben */
  padding: 1em 1.2em 1.2em;
}

/* Buch-Ansicht: Navigation/Fußzeile fix, nur Inhalt scrollt */
#wissensspeicher-overlay #wissensspeicher-page.ws-buch-view,
#wissensspeicher-dock #wissensspeicher-dock-page.ws-buch-view {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
}

#wissensspeicher-page.ws-buch-view .ws-buch-shell,
#wissensspeicher-dock-page.ws-buch-view .ws-buch-shell {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  padding: 0;
  background: #fff;
}

.ws-buch-nav {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.45em;
  padding: 0.55em 1em;
  border-bottom: 1px solid #e8e8e8;
  background: #fff;
}

.ws-buch-nav-main {
  display: flex;
  align-items: center;
  gap: 0.65em;
  min-width: 0;
  flex: 1 1 auto;
  justify-content: center;
}

.ws-buch-nav-jump {
  display: flex;
  justify-content: center;
  gap: 0.5em;
  flex-wrap: wrap;
  align-items: center;
}

.ws-ansicht-umschalter {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  flex-wrap: wrap;
}

.ws-ansicht-label {
  font-size: 0.84em;
  font-weight: 700;
  color: #22684e;
  white-space: nowrap;
}

.ws-buch-jump-btn {
  padding: 0.32em 0.85em;
  border: 1px solid #cfd9e6;
  border-radius: 0.45em;
  background: #fff;
  color: #22684e;
  font-size: 0.84em;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.ws-buch-jump-btn:hover:not(:disabled) {
  background: #f3f7fc;
  border-color: #22684e;
}

.ws-buch-jump-btn[aria-pressed="true"] {
  background: #22684e;
  color: #fff;
  border-color: #22684e;
}

.ws-buch-jump-btn[aria-pressed="true"]:hover:not(:disabled) {
  background: #1b5440;
  color: #fff;
  border-color: #1b5440;
}

#wissensspeicher-dock #ws-dock-schueleransicht[aria-pressed="true"],
#wissensspeicher-dock #ws-dock-schueleransicht[aria-pressed="true"]:hover,
#wissensspeicher-overlay #ws-dock-schueleransicht[aria-pressed="true"],
#wissensspeicher-overlay #ws-dock-schueleransicht[aria-pressed="true"]:hover {
  background: #22684e;
  color: #fff;
  border-color: #22684e;
}

.ws-buch-nav-title {
  min-width: 0;
  flex: 1 1 auto;
  text-align: center;
}

.ws-buch-nav-heading {
  font-weight: 700;
  color: #22684e;
  font-size: 0.98rem;
  line-height: 1.3;
}

.ws-buch-nav-meta {
  font-size: 0.78rem;
  color: #667;
  margin-top: 0.15em;
}

.ws-buch-nav-tools {
  display: flex;
  gap: 0.4em;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.ws-buch-nav-btn {
  flex-shrink: 0;
  min-width: 2.5rem;
  min-height: 2.5rem;
  padding: 0;
  border: 1px solid #cfd9e6;
  border-radius: 10px;
  background: #fff;
  color: #123;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  font-family: inherit;
}

.ws-buch-nav-btn:hover:not(:disabled) { background: #f3f7fc; }
.ws-buch-nav-btn:disabled { opacity: 0.35; cursor: default; }

.ws-buch-tool-btn {
  padding: 0.4em 0.85em;
  border: 1px solid #cfd9e6;
  border-radius: 0.5em;
  background: #fff;
  color: #555;
  font-size: 0.88em;
  cursor: pointer;
  font-family: inherit;
}

.ws-buch-tool-btn:hover { background: #f3f7fc; }

.ws-buch-sheet {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 1em 1.2em 1.1em;
  overflow: hidden;
  background: #fff;
}

#ws-buch-page {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  /* kein -webkit-overflow-scrolling:touch — WebKit verliert sonst den Caret in Eingaben */
  background: #fff;
  border: 1px solid #e0e0e0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  padding: 1.4em 1.6em 1.6em;
  border-radius: 2px;
}

/* Im Buch: keine Karte-in-Karte */
#ws-buch-page .ws-page {
  max-width: none;
  margin: 0;
  border: none;
  box-shadow: none;
  background: transparent;
}

.ws-buch-toc-heading,
.ws-buch-glossar-heading {
  color: #22684e;
  font-size: 1.35em;
  font-weight: 700;
  margin: 0 0 0.85em 0;
  padding-bottom: 0.35em;
  border-bottom: 2px solid #22684e;
}

.ws-buch-toc-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.2em 0;
  line-height: 1.55;
}

.ws-buch-toc-list--anhang {
  margin-top: 1.4em;
  padding-top: 0.6em;
  border-top: 1px solid #e0dbd0;
}

.ws-buch-toc-eintrag {
  margin: 0.35em 0;
}

.ws-buch-toc-eintrag a {
  display: flex;
  align-items: baseline;
  gap: 0.35em;
  width: 100%;
  color: #22684e;
  text-decoration: none;
}

.ws-buch-toc-eintrag a:hover .ws-buch-toc-titel {
  text-decoration: underline;
}

.ws-buch-toc-eintrag--inhalt .ws-buch-toc-titel {
  font-size: 0.92em;
  font-weight: 500;
  line-height: 1.4;
}

/* Unterseite zur WS-Hauptsseite (z. B. „Was ich mitnehme“) */
.ws-buch-toc-eintrag--unterseite {
  margin: 0.05em 0 0.35em;
  padding-left: 1.15em;
}
.ws-buch-toc-eintrag--unterseite a {
  color: #4a6b5c;
}
.ws-buch-toc-eintrag--unterseite .ws-buch-toc-titel {
  font-size: 0.86em;
  font-weight: 500;
  font-style: italic;
  line-height: 1.35;
}
.ws-buch-toc-eintrag--unterseite .ws-buch-toc-seite {
  font-weight: 500;
  color: #667;
}

.ws-buch-toc-eintrag--glossar .ws-buch-toc-titel {
  font-size: 1.12em;
  font-weight: 700;
}

.ws-buch-toc-leader {
  flex: 1 1 auto;
  min-width: 1.5em;
  margin: 0 0.15em;
  border-bottom: 1px dotted #c5bfb3;
  transform: translateY(-0.2em);
}

.ws-buch-toc-seite {
  flex-shrink: 0;
  font-size: 0.9em;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: #445;
  min-width: 1.5em;
  text-align: right;
}

.ws-buch-toc-eintrag--glossar .ws-buch-toc-seite {
  font-size: 0.95em;
}

.ws-buch-toc-leer {
  color: #555;
  margin: 0 0 1em 0;
}

/* Glossar-Begriffe (violett wie Neues Wort) */
.mw-glossar-begriff,
.mw-neues-wort-ziel {
  font: inherit;
  color: #4f3a97;
  background: #f3eeff;
  border: 1px solid #7b61c9;
  border-radius: 6px;
  padding: 0.02em 0.35em;
  cursor: pointer;
  display: inline;
  vertical-align: baseline;
  line-height: inherit;
}

.mw-glossar-begriff {
  font-weight: 600;
  text-decoration: none;
}

.mw-glossar-begriff:hover {
  background: #e5dbff;
}

.mw-glossar-begriff--im-glossar {
  display: inline-flex;
  align-items: center;
  gap: 0.28em;
  background: #e9ddff;
  border-color: #6e52bf;
  box-shadow: inset 0 0 0 2px #7b61c9;
  padding: 0.06em 0.4em 0.06em 0.35em;
}

.mw-glossar-begriff--im-glossar::after {
  content: "✓";
  flex-shrink: 0;
  font-size: 0.82em;
  font-weight: 800;
  color: #27ae60;
  line-height: 1;
}

@keyframes mw-glossar-pulse {
  0% { box-shadow: 0 0 0 0 rgba(123, 97, 201, 0.65); }
  70% { box-shadow: 0 0 0 8px rgba(123, 97, 201, 0); }
  100% { box-shadow: inset 0 0 0 2px #7b61c9; }
}

.mw-glossar-begriff--hinzugefuegt {
  animation: mw-glossar-pulse 0.65s ease-out;
}

.mw-glossar-toast-region {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  transform: translateX(-50%);
  z-index: 10050;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  max-width: min(92vw, 28rem);
  pointer-events: none;
}

.mw-glossar-toast,
.mw-glossar-toast-hint {
  pointer-events: auto;
}

.mw-glossar-toast {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  padding: 0.65rem 1rem;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #7b61c9;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.12);
  font-size: 0.95em;
  color: #333;
}

.mw-glossar-toast--neu {
  border-left: 4px solid #27ae60;
}

.mw-glossar-toast-link {
  font: inherit;
  font-weight: 600;
  color: #5b43ad;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
}

.mw-glossar-toast-link:hover {
  color: #47338a;
}

.mw-glossar-toast-hint {
  margin: 0;
  padding: 0.5rem 0.85rem;
  border-radius: 8px;
  background: #f3eeff;
  border: 1px dashed #9b86db;
  font-size: 0.88em;
  color: #555;
  text-align: center;
}

.mw-neues-wort-ziel,
.mw-ws-glossar-ziel {
  font-weight: 800;
}

.mw-neues-wort-erstnennung {
  font-weight: 700;
  background: #ece4ff;
  color: #4d3a8a;
  border: 1px solid #c6b7ee;
  border-radius: 6px;
  padding: 0.02em 0.28em;
}

.mw-neues-wort-ziel:hover,
.mw-ws-glossar-ziel:hover,
.mw-neues-wort-erstnennung:hover {
  background: #e5dbff;
  color: #3f2f77;
}

/* Einheitliche Stichpunkte in Aufgabenteilen (Kapitel 4). */
.mw-aufgaben-stichpunkte {
  list-style-type: square;
}

.mw-aufgaben-stichpunkte > li::marker {
  color: var(--mw-aufgaben-label-farbe, #1976d2);
}

/* Lern-Abbildungen: natürliches Seitenverhältnis (width/height-Attribut oder Datei). */
.mw-aufgaben-bild {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center;
}

.ws-buch-glossar-lead {
  font-size: 0.95em;
  color: #555;
  margin: 0 0 1em 0;
  line-height: 1.45;
}

.ws-glossar-beispiel-wrap {
  margin: 0 0 0.65em 0;
}

.ws-glossar-beispiel-label {
  font-size: 0.78em;
  font-weight: 600;
  color: #888;
  margin-bottom: 0.25em;
}

.ws-glossar-beispiel {
  color: #333;
  line-height: 1.5;
}

.ws-glossar-material-bild-wrap {
  margin: 0 0 0.85em 0;
  max-width: 380px;
}

.ws-glossar-material-svg {
  display: block;
  width: 100%;
  height: auto;
}

.ws-glossar-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1em;
}

.ws-glossar-buchstabe {
  list-style: none;
  margin: 1.15em 0 0.35em 0;
  padding: 0;
}

.ws-glossar-buchstabe:first-child {
  margin-top: 0;
}

.ws-glossar-buchstabe-label {
  display: inline-block;
  min-width: 1.6em;
  font-size: 1.05em;
  font-weight: 800;
  color: #22684e;
  letter-spacing: 0.02em;
  border-bottom: 2px solid #d4e8df;
  padding-bottom: 0.12em;
}

.ws-glossar-eintrag {
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  padding: 0.85em 1em;
  background: #fff;
}

.ws-glossar-eintrag--focus {
  border-color: #f39c12;
  box-shadow: 0 0 0 2px rgba(243, 156, 18, 0.25);
}

.ws-glossar-eintrag-kopf {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.45em 0.65em;
  margin-bottom: 0.55em;
}

.ws-glossar-term {
  font-size: 1.08em;
  color: #22684e;
  outline: none;
}

.ws-glossar-badge {
  font-size: 0.72em;
  font-weight: 600;
  color: #c46e00;
  background: #fff7e6;
  border: 1px solid #f4d4a8;
  border-radius: 4px;
  padding: 0.12em 0.45em;
}

.ws-glossar-eintrag-body {
  display: block;
}

.ws-glossar-eintrag-body--mit-bild {
  display: flex;
  flex-wrap: wrap;
  gap: 1em;
  align-items: flex-start;
}

.ws-glossar-bild-wrap {
  flex: 0 0 140px;
  max-width: 100%;
}

.ws-glossar-bild-wrap--hat-bild .ws-glossar-bild-preview {
  display: block;
  width: 100%;
  max-height: 120px;
  object-fit: contain;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  margin-bottom: 0.45em;
  background: #fafafa;
}

.ws-glossar-bild-preview[hidden] {
  display: none !important;
}

.ws-glossar-bild-actions {
  display: flex;
  flex-direction: column;
  gap: 0.35em;
}

.ws-glossar-bild-btn {
  display: inline-block;
  font-size: 0.82em;
  font-weight: 600;
  color: #22684e;
  border: 1px solid #cfd9e6;
  border-radius: 6px;
  padding: 0.35em 0.6em;
  cursor: pointer;
  background: #f9fbfd;
}

.ws-glossar-bild-remove {
  font-size: 0.78em;
  color: #666;
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
  font-family: inherit;
}

.ws-glossar-def-wrap {
  flex: 1 1 200px;
  min-width: 0;
  margin-bottom: 0.55em;
}

.ws-glossar-def-label {
  font-size: 0.78em;
  font-weight: 600;
  color: #888;
  margin-bottom: 0.25em;
}

.ws-glossar-def {
  min-height: 3.5em;
  line-height: 1.5;
  outline: none;
  border-bottom: 1px dashed #d0d0d0;
  padding: 0.2em 0;
}

.ws-glossar-def:focus {
  border-bottom-color: #3774a9;
}

.ws-glossar-def--material {
  min-height: auto;
  border-bottom: none;
  padding: 0.15em 0 0.5em;
  color: #333;
  line-height: 1.5;
}

.ws-glossar-def-leer {
  color: #999;
  font-style: italic;
}

.ws-glossar-vorkommen-wrap {
  margin-bottom: 0.65em;
}

.ws-glossar-vorkommen-label {
  font-size: 0.78em;
  font-weight: 600;
  color: #888;
  margin-bottom: 0.25em;
}

.ws-glossar-kommentar-label {
  font-size: 0.78em;
  font-weight: 600;
  color: #666;
  margin-bottom: 0.25em;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.35em;
  user-select: none;
}

.ws-glossar-kommentar-label::-webkit-details-marker {
  display: none;
}

.ws-glossar-kommentar-label::before {
  content: '▶';
  font-size: 0.72em;
  color: #888;
  transition: transform 0.12s ease;
}

.ws-glossar-kommentar-wrap[open] > .ws-glossar-kommentar-label::before {
  transform: rotate(90deg);
}

.ws-glossar-kommentar-wrap[open] > .ws-glossar-kommentar-label {
  margin-bottom: 0.45em;
}

.ws-glossar-vorkommen-liste {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15em 0;
  line-height: 1.55;
}

.ws-glossar-vorkommen-link {
  font: inherit;
  font-size: 0.92em;
  font-weight: 600;
  color: #22684e;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.ws-glossar-vorkommen-link:hover {
  color: #174a38;
}

.ws-glossar-vorkommen-trenner {
  color: #aaa;
  font-weight: 400;
  user-select: none;
}

.ws-glossar-vorkommen-leer {
  color: #aaa;
}

.ws-glossar-kommentar-wrap {
  margin-top: 0.35em;
  border: none;
}

.ws-glossar-leer-hinweis {
  margin: 0.35em 0 0;
  color: #777;
  font-size: 0.95em;
  line-height: 1.45;
  list-style: none;
}

.ws-glossar-kommentar-notiz {
  margin-top: 0.25em;
  max-width: 100%;
}

.ws-glossar-kommentar-notiz .k73-notiz {
  width: 100%;
}

.ws-glossar-kommentar {
  display: block;
  width: 100%;
  min-height: 4.5em;
  box-sizing: border-box;
  font: inherit;
  line-height: 1.5;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 0.5em 0.65em;
  resize: vertical;
  background: #fcfcfc;
}

.ws-glossar-kommentar:focus {
  outline: none;
  border-color: #3774a9;
  box-shadow: 0 0 0 2px rgba(55, 116, 169, 0.15);
}

.ws-glossar-kommentar-wrap .ws-glossar-eintrag-body--mit-bild {
  margin-top: 0.35em;
}

.ws-glossar-kommentar-wrap .ws-glossar-kommentar {
  flex: 1 1 200px;
  min-width: 0;
}

.ws-buch-glossar-hint {
  font-size: 0.88em;
  color: #777;
  margin: 1.2em 0 0;
}

@media (max-width: 640px) {
  .ws-glossar-eintrag-body--mit-bild {
    flex-direction: column;
  }
  .ws-glossar-bild-wrap {
    flex: 1 1 auto;
    width: 100%;
  }
}

#ws-buch-page img,
#wissensspeicher-page img,
#wissensspeicher-dock-page img {
  max-width: 100%;
  height: auto;
}

@media (max-width: 640px) {
  .ws-glossar-list {
    columns: 1;
  }
  #ws-buch-page {
    padding: 1em 1.1em 1.2em;
  }
}

#wissensspeicher-dock {
  position: fixed;
  top: 0;
  right: 0;
  width: 50vw;
  height: 100vh;
  background: #fff;
  box-shadow: -10px 0 28px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  z-index: 10000;
}

#wissensspeicher-dock .pm-body {
  flex: 1 1 auto;
  min-height: 0;
}

.pm-btn--danger {
  border-color: #e5b3b3;
  color: #b3261e;
}

/* Split-Dock: Titel darf schrumpfen, Aktionsbuttons bleiben in einer Zeile */
#wissensspeicher-dock .pm-header {
  min-width: 0;
}
#wissensspeicher-dock .pm-title {
  color: #22684e;
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#wissensspeicher-dock .pm-actions {
  flex-wrap: nowrap;
  flex-shrink: 0;
}

.teacher-only { display: none; }
body[data-role="teacher"] .teacher-only { display: initial; } /* oder block/inline passend zum Element */



/* Pillenförmige, zentrierte Top‑Bar wie in Koordinaten */
.topbar{background:transparent; position:sticky; top:0; z-index:1000}
.topbar__pill{
  max-width:1240px;              /* zentriert */
  margin:10px auto;              /* Abstand + mittig */
  display:flex; align-items:center; justify-content:space-between;
  padding:.55rem .9rem;
  background:#2a99b3;            /* gleiches Blau */
  border-radius:14px;            /* runde Enden */
  box-shadow:0 8px 24px #0002;
}

/* Icon-Buttons ohne Umrahmung */
.icon-btn{appearance:none; background:transparent; border:0; padding:.25rem; line-height:0; cursor:pointer}
.icon-btn:focus{outline:none}

/* Info-Dropdown wie bei Koordinaten (Schrift/Look aus deinem style.css) */
.menu-item{position:relative; color:#fff; font-weight:600}
.menu-item::after{content:" ▼"; font-size:.8em; margin-left:.25rem}
.menu-dropdown{position:absolute; top:120%; left:0; background:#fff; border:1px solid #e6e6e6; border-radius:.6rem; box-shadow:0 10px 24px #0002; min-width:180px; display:none}
.menu-dropdown a{display:block; padding:.6rem .8rem; color:#123; text-decoration:none}
.menu-dropdown a:hover{background:#f6f9f8}
.menu-item:hover .menu-dropdown{display:block}

/* Logo-Größe wie im Kapitel */
.brand{height:28px; width:auto}


.lehrer-badge{display:none;position:relative}
.lehrer-chip{height:22px;width:22px;border-radius:999px;background:#fff;color: #09368f;
             display:grid;place-items:center;font-weight:800;letter-spacing:.3px;font-size:.85rem;
             border:2px solid #fff8}
body[data-role="teacher"] .lehrer-badge{display:block}


/* Globale Icon-Buttons (aus Startseite übernommen) */
.icon-btn {
  appearance: none;
  background: transparent;
  border: 0;
  padding: .25rem;
  cursor: pointer;
  line-height: 0;
}
.icon-btn img { height: 26px; width: auto; vertical-align: middle; }
.icon-btn:focus { outline: none; }
.icon-btn:focus-visible { outline: 2px solid #fff7; outline-offset: 2px; border-radius: 8px; }

/* Verwaister Ella-Floating-Kreis (#leonie-btn direkt am body) — Legacy-Bundle; Ella nur in der Topbar. */
body.mw-has-app-topbar > #leonie-btn,
body.mw-kapitel-4 > #leonie-btn,
body.mw-kapitel-7-3 > #leonie-btn,
body.mw-kapitel-7-6 > #leonie-btn,
body.mw-kapitel-7-8 > #leonie-btn {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

body.mw-has-app-topbar .mw-app-topbar__ella-host #leonie-btn,
body.tibra-ella-topbar #tibraEllaTopbarCluster #leonie-btn,
body.tibra-ella-topbar #topBar #tibraEllaTopbarCluster #leonie-btn {
  display: inline-flex !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

body.tibra-ella-topbar #tibraEllaStatusChip {
  display: inline-flex !important;
  visibility: visible !important;
}

