/* Geisterarchiv – Einstellungen als Pergamentfenster (Bibliothek und Wirkraum) */
.einst-huelle {
  position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; padding: 16px;
  background: rgba(6, 4, 2, .72); backdrop-filter: blur(3px); animation: einst-ein .4s ease both;
}
@keyframes einst-ein { from { opacity: 0; } }
.einst-fenster {
  position: relative; width: min(100%, 520px); max-height: calc(100svh - 32px); overflow: auto;
  padding: 26px clamp(18px, 5vw, 32px) 22px;
  background: linear-gradient(180deg, #ecdcb5, #e2cc9a); color: #2b1a0e; border-radius: 3px;
  box-shadow: 0 24px 50px rgba(0, 0, 0, .7), inset 0 0 60px rgba(120, 80, 30, .18);
  font-family: "Alegreya", Georgia, serif; font-size: 16.5px; line-height: 1.45;
}
.einst-fenster h2 { margin: 0 0 6px; font-family: "Fraktur", serif; font-weight: 400; font-size: 40px; line-height: 1; }
.einst-fenster h3 { margin: 18px 0 8px; font-weight: 600; font-variant: small-caps; letter-spacing: .06em; font-size: 18px; color: #9a2c1b; }
.einst-zu {
  position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; border-radius: 50%; cursor: pointer;
  border: 1px solid rgba(154, 44, 27, .4); background: rgba(255, 250, 235, .4); color: #2b1a0e; font-size: 18px;
}
.einst-schalter { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.einst-schalter input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.einst-bahn { flex: none; position: relative; width: 48px; height: 26px; border-radius: 13px; background: rgba(43, 26, 14, .25); transition: background .25s; }
.einst-bahn::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff8e6; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .25s; }
.einst-schalter input:checked + .einst-bahn { background: #9a2c1b; }
.einst-schalter input:checked + .einst-bahn::after { transform: translateX(22px); }
.einst-schalter input:focus-visible + .einst-bahn { outline: 2px solid #9a2c1b; outline-offset: 2px; }
.einst-raeume { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 460px) { .einst-raeume { grid-template-columns: 1fr; } .einst-raum { grid-template-columns: 110px 1fr; } .einst-raum img { grid-row: span 2; } }
.einst-raum {
  position: relative; display: grid; gap: 4px 10px; cursor: pointer; padding: 6px; border-radius: 3px;
  border: 1px solid rgba(43, 26, 14, .2); background: rgba(255, 250, 235, .35); transition: border-color .2s, box-shadow .2s;
}
.einst-raum input { position: absolute; opacity: 0; }
.einst-raum img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 2px; background: #1a0f08; }
.einst-raum strong { font-size: 16px; }
.einst-raum span { font-size: 13.5px; font-style: italic; color: rgba(43, 26, 14, .7); line-height: 1.3; }
.einst-raum:has(input:checked) { border-color: #9a2c1b; box-shadow: 0 0 0 2px rgba(154, 44, 27, .35); }
.einst-raum:has(input:focus-visible) { outline: 2px solid #9a2c1b; outline-offset: 2px; }
.einst-hinweis { margin: 10px 0 0; font-style: italic; color: #9a2c1b; }
.einst-fuss { margin: 16px 0 0; font-size: 13.5px; color: rgba(43, 26, 14, .6); }
.einst-fertig {
  display: block; margin: 14px 0 0 auto; padding: 8px 20px; cursor: pointer; border-radius: 2px;
  border: 1px solid #9a2c1b; background: #9a2c1b; color: #fff4e0; font-family: "Cormorant", serif; font-weight: 600; font-size: 18px;
}

/* Öffner: Zahnrad-Knopf */
.einst-knopf {
  width: 38px; height: 38px; border-radius: 50%; cursor: pointer; padding: 8px; display: inline-flex; align-items: center; justify-content: center;
  background: rgba(20, 12, 6, .45); border: 1px solid rgba(201, 163, 82, .3); color: #c9a352;
}
.einst-knopf svg { width: 100%; height: 100%; display: block; }
.einst-knopf:hover, .einst-knopf:focus-visible { border-color: #c9a352; outline: none; box-shadow: 0 0 12px rgba(255, 180, 80, .2); }

/* Meine Schlüssel (Grimoire) */
.einst-schl-stand { margin: 0 0 8px; font-size: 15px; }
.einst-schl-stand code { font-family: ui-monospace, Consolas, monospace; font-size: 15px; letter-spacing: .04em; background: rgba(255, 250, 235, .5); padding: 1px 5px; }
.einst-schl-weg { margin-left: 6px; padding: 0; border: 0; background: none; color: #9a2c1b; font: inherit; font-size: 13.5px; text-decoration: underline; cursor: pointer; }
.einst-schl-form, .einst-verg-form { display: flex; gap: 8px; }
.einst-schl-form input, .einst-verg-form input { flex: 1; min-width: 0; padding: 8px 10px; font: inherit; font-size: 15px; border: 1px solid rgba(43, 26, 14, .35); background: rgba(255, 250, 235, .7); color: #2b1a0e; }
.einst-schl-form input { font-family: ui-monospace, Consolas, monospace; letter-spacing: .04em; text-transform: uppercase; }
.einst-schl-form button, .einst-verg-form button { padding: 8px 14px; cursor: pointer; border: 1px solid #9a2c1b; background: #9a2c1b; color: #fff4e0; font: inherit; font-size: 15px; }
.einst-schl-meldung { margin: 6px 0 0; min-height: 1em; font-style: italic; color: #9a2c1b; font-size: 14.5px; }
.einst-schl-meldung:empty { display: none; }
.einst-vergessen { margin-top: 8px; font-size: 14.5px; }
.einst-vergessen summary { cursor: pointer; color: rgba(43, 26, 14, .7); }
.einst-vergessen form { margin-top: 8px; }
