.realm-archive-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: rgba(0,0,0,0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.realm-archive-box {
  width: min(1180px, 96vw);
  max-height: 90vh;
  overflow-y: auto;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  background:
    radial-gradient(circle at 78% 20%, rgba(217,184,111,0.14), transparent 30%),
    linear-gradient(145deg, rgba(18,24,28,0.96), rgba(3,4,5,0.98));
  box-shadow: 0 28px 90px rgba(0,0,0,0.72);
  color: #fff;
  padding: 28px;
}
.realm-archive-top {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 18px;
}
.realm-archive-top h2 {
  margin: 0;
  font-family: "Archivo Black", Impact, sans-serif;
  font-size: clamp(36px, 4vw, 58px);
  font-style: italic;
  line-height: 0.9;
  text-transform: uppercase;
}
.realm-archive-close {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 4px;
  background: rgba(255,255,255,0.06);
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  text-transform: uppercase;
}
.realm-archive-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 22px;
}
.realm-archive-tabs button,
.realm-log-entry button,
.realm-entry-form button,
.realm-folder-list button,
.realm-place-form button,
.realm-image-form button,
.realm-gallery-grid figure button {
  border: 0;
  border-radius: 8px;
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.68);
  cursor: pointer;
  font-weight: 700;
  padding: 9px 12px;
}
.realm-archive-tabs button.active,
.realm-archive-tabs button:hover,
.realm-folder-list button.active,
.realm-folder-list button:hover {
  background: rgba(255,255,255,0.14);
  color: #fff;
}
.realm-logbook-layout,
.realm-places-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.8fr);
  gap: 24px;
}
.realm-collection-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
  gap: 24px;
}
.realm-collection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  align-content: start;
}
.realm-collection-card {
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  background: rgba(255,255,255,0.05);
}
.realm-collection-card img,
.realm-collection-image-empty {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(195,188,158,0.18), rgba(255,255,255,0.04));
  color: rgba(255,255,255,0.62);
  font-family: "Archivo Black", Impact, sans-serif;
  font-size: 28px;
  font-style: italic;
  text-transform: uppercase;
}
.realm-collection-card > div:not(.realm-collection-actions) {
  padding: 16px 16px 0;
}
.realm-collection-card span {
  color: #c3bc9e;
  font-family: "Geist Mono", var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
}
.realm-collection-card h3 {
  margin: 7px 0 8px;
  color: #fff;
}
.realm-collection-card p {
  max-height: 112px;
  overflow: auto;
  color: rgba(255,255,255,0.66);
  white-space: pre-wrap;
}
.realm-collection-actions {
  display: flex;
  gap: 8px;
  padding: 0 16px 16px;
}
.realm-collection-actions button,
.realm-collection-form button {
  border: 0;
  border-radius: 8px;
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.68);
  cursor: pointer;
  font-weight: 700;
  padding: 9px 12px;
}
.realm-collection-actions button:hover,
.realm-collection-form button:hover {
  background: rgba(255,255,255,0.14);
  color: #fff;
}
.realm-collection-preview {
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.12);
}
.realm-logbook-list {
  display: grid;
  gap: 16px;
}
.realm-log-entry,
.realm-entry-form,
.realm-gallery-panel,
.realm-folder-list {
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  background: rgba(255,255,255,0.05);
  padding: 18px;
}
.realm-log-entry span {
  color: #c3bc9e;
  font-family: "Geist Mono", var(--font-mono);
  font-size: 12px;
}
.realm-log-entry h3,
.realm-entry-form h3 {
  margin: 8px 0 10px;
  color: #ecedee;
}
.realm-log-entry p {
  color: rgba(255,255,255,0.66);
}
.realm-log-entry pre {
  white-space: pre-wrap;
  color: rgba(255,255,255,0.72);
  font-family: "Geist", var(--font-body);
  line-height: 1.55;
}
.realm-entry-form,
.realm-place-form,
.realm-image-form {
  display: grid;
  gap: 10px;
  align-content: start;
}
.realm-entry-form input,
.realm-entry-form textarea,
.realm-place-form input,
.realm-image-form input,
.realm-collection-form input,
.realm-collection-form textarea {
  width: 100%;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 4px;
  background: rgba(0,0,0,0.42);
  color: #fff;
  padding: 10px 12px;
  font-family: "Geist", var(--font-body);
}
.realm-places-layout {
  grid-template-columns: 260px minmax(0, 1fr);
}
.realm-folder-list {
  display: grid;
  gap: 10px;
  align-content: start;
}
.realm-folder-list button {
  text-align: left;
}
.realm-folder-list strong,
.realm-folder-list span {
  display: block;
}
.realm-folder-list span {
  color: rgba(255,255,255,0.5);
  font-size: 12px;
  margin-top: 3px;
}
.realm-gallery-panel {
  display: grid;
  gap: 16px;
}
.realm-place-form {
  grid-template-columns: minmax(160px, 0.8fr) minmax(220px, 1fr) auto;
}
.realm-image-form {
  grid-template-columns: minmax(180px, 0.8fr) minmax(220px, 1fr) auto;
}
.realm-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}
.realm-gallery-grid figure {
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  background: rgba(0,0,0,0.24);
}
.realm-gallery-grid img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #050607;
}
.realm-gallery-grid figcaption {
  padding: 10px 12px 4px;
  color: rgba(255,255,255,0.78);
}
.realm-gallery-grid figure button {
  margin: 8px 12px 12px;
}

@media (max-width: 620px) {
  .realm-archive-modal {
    padding: 12px;
  }

  .realm-archive-box {
    padding: 18px;
  }

  .realm-place-form,
  .realm-image-form {
    grid-template-columns: 1fr;
  }
}

/* Aus style.css verschoben (2026-09-05, CSS-Restaufteilung "Restliche
   Oberflaeche"): war dort Teil einer Sammelregel, die Archiv-Selektoren
   (.realm-archive-box/.realm-log-entry/.realm-entry-form/.realm-gallery-panel/
   .realm-folder-list) zusammen mit Home-Portal-/Dashboard-Selektoren
   (.realm-panel/.realm-campaign-card/.realm-player-hub/.realm-character-card/
   .realm-glass-panel) mischte - exakt die im Auftrag dokumentierte
   Mehrfach-Selektor-Kaskaden-Falle (Praezedenzfall app-shell.css). Aufgesplittet
   statt komplett an eine Datei gehaengt: diese Datei besitzt bislang KEINE
   eigene html[data-theme="light"]-Regel fuer ihre Selektoren (per Grep
   bestaetigt), die Ladereihenfolge relativ zu archive-library.css aendert sich
   fuer diese Klassen also nicht, wenn die Regel hier ans Ende angehaengt wird.
   Der Home-Portal-Anteil der urspruenglichen Sammelregel ist mit identischem
   Deklarationskoerper nach public/styles/components/home-portal.css gewandert. */
html[data-theme="light"] .realm-archive-box,
html[data-theme="light"] .realm-log-entry,
html[data-theme="light"] .realm-entry-form,
html[data-theme="light"] .realm-gallery-panel,
html[data-theme="light"] .realm-folder-list {
  background: linear-gradient(135deg, rgba(255,255,255,0.76), rgba(247,239,228,0.88));
  border-color: rgba(109,89,57,0.12);
  color: var(--parchment);
  box-shadow: var(--shadow-md);
}
