.top-right-box {
  position: fixed !important;
  top: 15px !important;
  left:40px !important;
  right: auto !important; 
  
  /* DYNAMIK START */
  width: auto !important;         /* Keine feste Breite mehr */
  min-width: 120px;               /* Mindestbreite, damit es nicht zu mickrig aussieht */
  max-width: 90vw !important;     /* Maximal 90% der Bildschirmbreite (Sicherheit) */
  display: inline-block !important; /* Passt sich dem Inhalt an */
  /* DYNAMIK ENDE */

  max-height: 85vh;
  overflow-y: auto;
  background-color: #ffffff !important;
  color: #000000 !important;
  font-family: "Segoe UI", sans-serif;
  border-radius: 8px;
  box-shadow: 5px 5px 25px rgba(0,0,0,0.4);
  z-index: 99999;
  user-select: none;
}

/* Der Haupt-Button (Menü) */
summary {
  list-style: none;
  padding: 12px 20px;
  content: '▼';
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between; /* Pfeil bleibt rechts, Text links */
  background-color: #6b9e4d;      /* Das Grün aus deinem Bild */
  color: white;
  border-radius: 8px;
  white-space: nowrap;            /* Verhindert Zeilenumbruch im Button */
}

/* Wenn das Menü offen ist, unten die Ecken eckig machen für die Liste */
details[open] summary {
  border-radius: 8px 8px 0 0;
}

/* Die Links müssen auch flexibel sein */
.top-right-box a {
  display: block;
  padding: 12px 20px;
  white-space: nowrap;            /* Name der Galerie bleibt in einer Zeile */
  text-decoration: none;
  color: #333;
}.top-right-box a:last-child {
    margin-bottom: 20px; /* Nur der letzte Link drückt den Rand nach unten */
    border-bottom: 1; /* Entfernt die Trennlinie beim letzten Punkt */
}