/* Lunas Lesetraining · „Luna und das Mondschloss im Nebel“ (25.10.2026) – gehört zu js/mondschloss.js
   Aquarell-Räume bildschirmfüllend, Erzähltext auf Papier, Aufgaben auf Pergament. Lesen bleibt ruhig (.ruhig). */
body.ms-offen { overflow: hidden; }
.ms-ebene { position: fixed; inset: 0; z-index: 4200; background: #120c22; color: #fff; opacity: 0; transition: opacity .35s; }
.ms-ebene.da { opacity: 1; }
.ms-buehne { position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; opacity: 0; transition: opacity .7s ease; isolation: isolate; }
.ms-buehne.da { opacity: 1; }
.ms-buehne.weg { opacity: 0; pointer-events: none; }
:where(.ms-ebene) button { font-size: 1rem; font-family: inherit; }

/* Bild: langsame Kamera (Ken Burns), unten dunkler für den Text */
.ms-bild { position: fixed; inset: 0; z-index: -3; background: center / cover no-repeat; animation: msKamera 52s ease-in-out infinite alternate; }
.ms-buehne::before { content: ''; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background: linear-gradient(180deg, rgba(10, 6, 24, .35) 0%, rgba(10, 6, 24, 0) 24%, rgba(10, 6, 24, 0) 52%, rgba(10, 6, 24, .62) 100%); }
@keyframes msKamera { from { transform: scale(1); } to { transform: scale(1.06) translate(-1%, -1%); } }
.ms-buehne.ruhig .ms-bild { animation-play-state: paused; }

/* Nebel, Funkeln, Fledermäuse */
.ms-nebel { position: fixed; left: -20%; right: -20%; bottom: -5%; height: 38%; z-index: -1; pointer-events: none; opacity: .55;
  background: radial-gradient(60% 60% at 30% 70%, rgba(220, 225, 245, .45), transparent 70%), radial-gradient(50% 55% at 75% 80%, rgba(210, 215, 240, .4), transparent 70%);
  animation: msNebel 26s ease-in-out infinite alternate; filter: blur(6px); }
@keyframes msNebel { from { transform: translateX(-4%); } to { transform: translateX(4%); } }
.ms-funkeln { position: fixed; inset: 0; z-index: -1; pointer-events: none; }
.ms-funkeln i { position: absolute; width: 14px; height: 14px; background: linear-gradient(135deg, #fffbe6, #f3d77e 55%, #d9a93a);
  clip-path: polygon(50% 0%, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0% 50%, 39% 39%); filter: drop-shadow(0 0 4px rgba(255, 220, 120, .9));
  animation: msGlitzer var(--t) ease-in-out infinite; animation-delay: var(--d); opacity: .2; }
.ms-funkeln.viel i { width: 20px; height: 20px; }
@keyframes msGlitzer { 0%, 100% { opacity: .1; transform: scale(.4) rotate(0); } 50% { opacity: .95; transform: scale(1.1) rotate(45deg); } }
.ms-fliegen { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.ms-fliegen img { position: absolute; left: -8%; width: 40px; opacity: .85; animation: msFliegen var(--t) linear infinite; animation-delay: var(--d); }
@keyframes msFliegen { from { left: -8%; transform: translateY(0); } 50% { transform: translateY(-16px); } to { left: 108%; transform: translateY(6px); } }
.ms-buehne.ruhig .ms-fliegen, .ms-buehne.ruhig .ms-funkeln { display: none; }

/* Keller: zusätzliche Netze, die sich mit jeder richtigen Antwort lösen; eine kleine Spinne seilt sich ab */
.ms-netze { position: fixed; inset: 0; z-index: -1; pointer-events: none; }
.ms-netz { position: absolute; width: 30vw; max-width: 380px; aspect-ratio: 1; opacity: calc(.8 - var(--ms-anteil, 0) * .8); transition: opacity .8s, transform .8s;
  transform: scale(calc(1 - var(--ms-anteil, 0) * .3));
  background: repeating-radial-gradient(circle at 0 0, transparent 0 22px, rgba(235, 240, 255, .45) 22px 23.5px),
    repeating-conic-gradient(from 0deg at 0 0, transparent 0 7deg, rgba(235, 240, 255, .45) 7deg 7.6deg); -webkit-mask: radial-gradient(circle at 0 0, #000 60%, transparent 72%); mask: radial-gradient(circle at 0 0, #000 60%, transparent 72%); }
.ms-netz.n0 { top: 0; left: 0; } .ms-netz.n1 { top: 0; right: 0; transform-origin: top right; scale: -1 1; }
.ms-netz.n2 { bottom: 18%; left: 0; scale: 1 -1; width: 18vw; } .ms-netz.n3 { bottom: 22%; right: 0; scale: -1 -1; width: 16vw; }
.ms-spinne { position: fixed; top: 0; left: 72%; z-index: -1; width: 2px; height: 26vh; background: linear-gradient(rgba(230, 235, 250, .6), rgba(230, 235, 250, .2));
  transform-origin: top; animation: msSeil 7s ease-in-out infinite; pointer-events: none; }
.ms-spinne::after { content: ''; position: absolute; bottom: -10px; left: -9px; width: 20px; height: 16px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #4a3d5c, #1d1428); box-shadow: 0 0 0 2px rgba(0, 0, 0, .2); }
@keyframes msSeil { 0%, 100% { height: 18vh; } 50% { height: 30vh; } }
.r-keller.geloest .ms-spinne { animation: none; height: 6vh; transition: height 1s; }

/* Geheimgang: dunkel, Fackeln gehen eine nach der anderen an */
.ms-dunkel { position: fixed; inset: 0; z-index: -2; pointer-events: none; background: rgba(6, 8, 22, calc(.55 - var(--ms-anteil, 0) * .5)); transition: background .8s; }
.ms-fackeln { position: fixed; inset: 0; z-index: -1; pointer-events: none; }
.ms-fackeln i { position: absolute; width: 120px; height: 120px; margin: -60px 0 0 -60px; border-radius: 50%; opacity: 0; transition: opacity .6s;
  background: radial-gradient(circle, rgba(255, 214, 120, .95) 0%, rgba(255, 150, 50, .55) 22%, rgba(255, 120, 30, 0) 62%); mix-blend-mode: screen; }
.ms-fackeln i.an { opacity: 1; animation: msFlackern 1.4s ease-in-out infinite; }
.ms-fackeln .f0 { left: 12%; top: 38%; } .ms-fackeln .f1 { left: 88%; top: 38%; } .ms-fackeln .f2 { left: 24%; top: 41%; } .ms-fackeln .f3 { left: 76%; top: 41%; }
.ms-fackeln .f4 { left: 34%; top: 43%; } .ms-fackeln .f5 { left: 66%; top: 43%; } .ms-fackeln .f6 { left: 41%; top: 45%; } .ms-fackeln .f7 { left: 59%; top: 45%; }
@keyframes msFlackern { 0%, 100% { transform: scale(1); opacity: .9; } 40% { transform: scale(1.08); opacity: 1; } 70% { transform: scale(.95); opacity: .82; } }

/* Spiegelsaal: Beschlag, der mit jeder richtigen Antwort klarer wird */
.ms-beschlag { position: fixed; inset: 0; z-index: -1; pointer-events: none; backdrop-filter: blur(calc(6px - var(--ms-anteil, 0) * 6px));
  -webkit-backdrop-filter: blur(calc(6px - var(--ms-anteil, 0) * 6px));
  background: rgba(225, 230, 248, calc(.32 - var(--ms-anteil, 0) * .32)); transition: background 1s, backdrop-filter 1s; }

/* Dachboden: Wind lässt alles kühl werden, die Lupe bündelt das Mondlicht */
.r-dach.wind .ms-bild { filter: brightness(.6) saturate(.8); transition: filter 1.2s; }
.r-dach.lupe .ms-bild { filter: brightness(.75) saturate(.95); }
.r-dach.lupe::after { content: ''; position: fixed; left: 50%; top: 32%; width: 34vmin; height: 34vmin; margin: -17vmin 0 0 -17vmin; border-radius: 50%; z-index: -1; pointer-events: none;
  background: radial-gradient(circle, rgba(220, 235, 255, .6), rgba(160, 190, 255, .15) 50%, transparent 70%); animation: msMondlicht 3s ease-in-out infinite; }
@keyframes msMondlicht { 0%, 100% { transform: scale(.95); opacity: .8; } 50% { transform: scale(1.06); opacity: 1; } }

/* Kopfzeile */
.ms-kopf { position: sticky; top: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px;
  background: linear-gradient(180deg, rgba(12, 8, 28, .75), rgba(12, 8, 28, 0)); }
.ms-zurueck { color: #fff; font-weight: 700; padding: 9px 16px; border-radius: 999px; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .3); backdrop-filter: blur(6px); }
.ms-schluessel { display: flex; align-items: center; gap: 6px; padding: 6px 12px 6px 8px; border-radius: 999px; background: rgba(12, 8, 28, .55); border: 1px solid rgba(242, 199, 92, .55); }
.ms-sl { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, .08); }
.ms-sl img { width: 26px; height: 26px; object-fit: contain; filter: grayscale(1) brightness(.5); transition: filter .6s; }
.ms-sl.da img { filter: drop-shadow(0 0 6px rgba(255, 210, 110, .9)); }
.ms-sl.neu { animation: msNeu 1s ease; }
@keyframes msNeu { 0% { transform: scale(.6); } 60% { transform: scale(1.35); } 100% { transform: scale(1); } }
.ms-schluessel b { color: #f2c75c; margin-left: 4px; }

/* Inhalt */
.ms-inhalt { min-height: calc(100dvh - 64px); display: flex; flex-direction: column; justify-content: space-between; padding: 0 18px 22px; max-width: 1100px; margin: 0 auto; }
.ms-ober { display: inline-block; font-size: .85rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #f2c75c; }
.ms-raum-titel { text-align: center; }
.ms-raum-titel h2, .ms-plakat-text h1 { font-size: clamp(1.8rem, 4.4vw, 3rem); line-height: 1.1; margin: 4px 0 0;
  background: linear-gradient(180deg, #fff6d6, #f0c65a); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 3px 10px rgba(0, 0, 0, .6)); }
.ms-szene { display: flex; align-items: flex-end; gap: 18px; margin-top: auto; }
.ms-figur { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; flex: 0 0 auto; max-width: 300px; }
.ms-figur-kreis { position: relative; width: 132px; height: 132px; border-radius: 50%; overflow: hidden; border: 4px solid var(--f); background: #fff;
  box-shadow: 0 0 0 3px rgba(242, 199, 92, .85), 0 12px 28px rgba(0, 0, 0, .5); animation: msWippen 3.4s ease-in-out infinite; }
.ms-figur-kreis video { width: 100%; height: 100%; object-fit: cover; transform: scale(1.27); }
@keyframes msWippen { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.ms-rede { order: -1; position: relative; padding: 12px 16px; border-radius: 16px; color: #2a2418; background: #fffaf0; border: 2px solid var(--f);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .35); font-size: 1.02rem; line-height: 1.4; }
.ms-rede b { display: block; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--f); }
.ms-rede::after { content: ''; position: absolute; left: 40px; bottom: -11px; width: 18px; height: 18px; background: #fffaf0; border-right: 2px solid var(--f); border-bottom: 2px solid var(--f); transform: rotate(45deg); }
.ms-blatt { flex: 1; padding: 20px 24px; border-radius: 18px; color: #2a2418; background: linear-gradient(180deg, rgba(255, 250, 238, .96), rgba(246, 234, 208, .96));
  border: 2px solid #d9b968; box-shadow: 0 16px 40px rgba(0, 0, 0, .45); }
.ms-blatt p { font-size: clamp(1.08rem, 2.2vw, 1.25rem); line-height: 1.6; margin: 0; }
.ms-knoepfe { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.ms-gold { padding: 13px 24px; border-radius: 999px; font-weight: 800; font-size: 1.05rem !important; color: #2b1d55; background: linear-gradient(180deg, #ffe08a, #f0a93a);
  box-shadow: 0 4px 0 #a8701c, 0 10px 20px rgba(0, 0, 0, .3); }
.ms-gold:hover { filter: brightness(1.06); transform: translateY(-1px); }
.ms-leise { padding: 12px 20px; border-radius: 999px; font-weight: 700; color: #2b1d55; background: rgba(255, 255, 255, .7); border: 1px solid rgba(43, 29, 85, .25); }

/* Startplakat mit Lunas Brief */
.ms-plakat .ms-inhalt { justify-content: space-between; }
.ms-plakat-text { text-align: center; padding-top: 6px; }
.ms-brief { position: relative; align-self: flex-end; max-width: 520px; margin-top: auto; padding: 22px 26px 22px 26px; border-radius: 6px 22px 22px 22px;
  color: #3a2c14; background: linear-gradient(180deg, #fffaf0, #f3e3bf); border: 2px solid #d9b968; box-shadow: 0 20px 50px rgba(0, 0, 0, .5); transform: rotate(-1deg); }
.ms-brief .ms-figur { position: absolute; top: -70px; left: -40px; }
.ms-brief .ms-figur-kreis { width: 110px; height: 110px; }
.ms-brief p { font-size: 1.1rem; line-height: 1.55; margin: 0 0 10px; font-family: 'Segoe Script', 'Bradley Hand', cursive; }
.ms-brief p.anrede { margin-left: 64px; font-weight: 700; }
.ms-brief p.gruss { text-align: right; font-weight: 700; color: #6b4bb8; }

/* Aufgaben: helles Pergament, ruhig */
.ms-aufgabe { margin: auto auto 0; width: min(100%, 760px); padding: 20px; border-radius: 22px; color: #2a2418; background: rgba(255, 250, 238, .97);
  border: 2px solid #d9b968; box-shadow: 0 20px 50px rgba(0, 0, 0, .5); }
.ms-auf-kopf { display: flex; align-items: center; gap: 14px; }
.ms-auf-kopf img { width: 62px; height: 62px; border-radius: 50%; border: 3px solid var(--f); object-fit: cover; background: #fff; flex-shrink: 0; }
.ms-auf-kopf p { font-size: 1.15rem; font-weight: 700; line-height: 1.4; color: #2a2418; margin: 0; }
.ms-punkte { display: flex; justify-content: center; gap: 8px; margin: 14px 0 6px; }
.ms-punkte i { width: 12px; height: 12px; border-radius: 50%; background: #e5dcc4; }
.ms-punkte i.voll { background: #d9a93a; } .ms-punkte i.jetzt { background: #f08a24; box-shadow: 0 0 0 3px rgba(240, 138, 36, .3); }
.ms-woerter { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 12px; }
.ms-woerter.drei { grid-template-columns: repeat(3, 1fr); }
.ms-woerter[hidden] { display: none; }
.ms-wort { font-size: clamp(1.3rem, 3.4vw, 1.7rem) !important; font-weight: 700; color: #1b2235; padding: 16px 8px; border-radius: 14px; background: #fff; border: 3px solid #e3d5b5; box-shadow: 0 4px 0 #e3d5b5; }
.ms-wort:hover:not(:disabled), .ms-antwort:hover:not(:disabled) { border-color: #f08a24; }
.ms-wort.richtig, .ms-antwort.richtig { border-color: #3a7d4e; background: #e1f2e5; box-shadow: 0 4px 0 #3a7d4e; }
.ms-wort.falsch, .ms-antwort.falsch { border-color: #c0504d; background: #f8e1e1; box-shadow: 0 4px 0 #c0504d; opacity: .75; }
.ms-rueck { min-height: 1.5em; margin: 12px 0 0; text-align: center; font-weight: 700; font-size: 1.1rem; color: #3b2a6b; }
.ms-blitz { position: relative; margin: 12px auto 0; height: 140px; display: grid; place-items: center; border-radius: 18px;
  background: radial-gradient(circle at 50% 60%, #3a2864, #1a1131); border: 2px solid rgba(242, 199, 92, .6); }
.ms-blitzwort { padding: 10px 22px; border-radius: 14px; font-size: clamp(1.8rem, 5vw, 2.6rem); font-weight: 800; color: #1b2235; background: #fff; opacity: 0; box-shadow: 0 0 30px rgba(255, 190, 80, .8); }
.ms-blitzwort.zu-sehen { opacity: 1; }
.ms-pergament { margin-top: 12px; padding: 18px 22px; border-radius: 14px; background: linear-gradient(180deg, #fff9ec, #f6ead0); border: 1px solid #e0c98a; max-height: 52vh; overflow-y: auto; }
.ms-pergament h3 { text-align: center; color: #5a3a12; font-size: 1.35rem; margin: 0 0 8px; }
.ms-pergament p { font-size: clamp(1.1rem, 2.5vw, 1.25rem); line-height: 1.75; margin: 0 0 10px; }
.ms-antworten { display: grid; gap: 10px; margin-top: 12px; }
.ms-antwort { text-align: left; font-size: 1.15rem !important; font-weight: 700; color: #1b2235; padding: 14px 16px; border-radius: 14px; background: #fff; border: 3px solid #e3d5b5; box-shadow: 0 4px 0 #e3d5b5; }

/* Zauberspruch auf dem Dachboden */
.ms-spruch { margin: 14px 0 0; padding: 16px; border-radius: 14px; text-align: center; background: radial-gradient(circle, #2f2558, #1b1438); color: #fff4c9;
  font-size: clamp(1.3rem, 3.5vw, 1.8rem); font-weight: 800; line-height: 1.5; box-shadow: 0 0 30px rgba(180, 200, 255, .35) inset; }
.ms-spruch span { display: block; }

/* Schlüssel-Feier */
.ms-feier-schluessel { position: fixed; left: 50%; top: 40%; z-index: 20; transform: translate(-50%, -50%) scale(.4); display: flex; flex-direction: column; align-items: center; gap: 10px;
  opacity: 0; animation: msSchluesselKommt .6s cubic-bezier(.2, 1.4, .4, 1) forwards; pointer-events: none; }
.ms-feier-schluessel img { width: 150px; filter: drop-shadow(0 0 22px rgba(255, 210, 110, .95)); }
.ms-feier-schluessel b { font-size: 1.6rem; color: #fff4c9; text-shadow: 0 2px 10px rgba(0, 0, 0, .7); }
.ms-feier-schluessel.fliegt { transition: transform .9s ease-in, opacity .9s; transform: translate(calc(50vw - 140px), calc(-40vh + 30px)) scale(.2); opacity: 0; }
@keyframes msSchluesselKommt { to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }

/* Fest */
.ms-fest-tiere { display: flex; justify-content: center; gap: 16px; margin: auto 0 18px; flex-wrap: wrap; }
.ms-fest-tiere .ms-figur-kreis { width: 104px; height: 104px; animation: msHuepfen 1.3s ease-in-out infinite; animation-delay: calc(var(--i) * .18s); }
@keyframes msHuepfen { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-18px); } }
.ms-fest .ms-blatt { flex: 0 0 auto; }

@media (max-width: 760px) {
  .ms-szene { flex-direction: column; align-items: stretch; }
  .ms-figur { flex-direction: row; align-items: flex-end; max-width: none; }
  .ms-figur-kreis { width: 96px; height: 96px; flex-shrink: 0; }
  .ms-rede { order: 0; }
  .ms-rede::after { left: -11px; bottom: 30px; border: none; border-left: 2px solid var(--f); border-bottom: 2px solid var(--f); }
  .ms-brief { align-self: stretch; margin-top: 90px; }
  .ms-brief .ms-figur { left: 50%; top: -84px; transform: translateX(-50%); }
  .ms-brief p.anrede { margin-left: 0; }
  .ms-woerter, .ms-woerter.drei { grid-template-columns: 1fr; }
  .ms-schluessel b { display: none; }
}
@media (prefers-reduced-motion: reduce) { .ms-ebene *, .ms-ebene *::before, .ms-ebene *::after { animation: none !important; transition: none !important; } }

/* Fackeln genau auf den Fackelköpfen im Bild: Fläche hat dieselbe Größe wie das per „cover“ gezeigte Bild (16:9) */
.ms-fackeln { inset: auto; left: 50%; top: 50%; width: max(100vw, 177.78vh); height: max(56.25vw, 100vh); transform: translate(-50%, -50%);
  animation: msKameraF 52s ease-in-out infinite alternate; }
@keyframes msKameraF { from { transform: translate(-50%, -50%) scale(1); } to { transform: translate(-50%, -50%) scale(1.06) translate(-1%, -1%); } }
.ms-fackeln i { width: 9vmin; height: 9vmin; margin: -4.5vmin 0 0 -4.5vmin; }
.ms-fackeln .f0 { left: 14%; top: 17%; } .ms-fackeln .f1 { left: 93.5%; top: 14%; }
.ms-fackeln .f2 { left: 39%; top: 33%; } .ms-fackeln .f3 { left: 74%; top: 33%; }
.ms-fackeln .f4 { left: 45.5%; top: 43%; } .ms-fackeln .f5 { left: 67.5%; top: 43%; }
.ms-fackeln .f6 { left: 50%; top: 48%; } .ms-fackeln .f7 { left: 64%; top: 48%; }
.ms-fackeln .f0, .ms-fackeln .f1 { width: 14vmin; height: 14vmin; margin: -7vmin 0 0 -7vmin; }

/* Gemeinsame Bildfläche, deckungsgleich mit dem Raumbild (16:9, cover) */
.ms-bildflaeche { position: fixed; left: 50%; top: 50%; width: max(100vw, 177.78vh); height: max(56.25vw, 100vh); z-index: -1; pointer-events: none;
  transform: translate(-50%, -50%); animation: msKameraF 52s ease-in-out infinite alternate; }
.ms-buehne.ruhig .ms-bildflaeche, .ms-buehne.ruhig .ms-fackeln { animation-play-state: paused; }
.ms-schlossglanz { position: absolute; left: 57%; top: 37.5%; width: 12%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 226, 140, .95) 0%, rgba(255, 190, 80, .55) 25%, transparent 65%); mix-blend-mode: screen;
  opacity: calc(var(--ms-anteil, 0) * 1); transition: opacity .8s; animation: msFlackern 2.2s ease-in-out infinite; }
.r-keller.geloest .ms-schlossglanz { opacity: 1; width: 16%; }

/* Dachboden: Mondstrahl vom Fenster zur Laterne, sobald die Lupe da ist; vorher nur ein schwaches Glimmen */
.r-dach.lupe::after { display: none; }
.ms-mondstrahl { position: absolute; left: 46%; top: 30%; width: 22%; height: 26%; transform-origin: 100% 0; opacity: 0; transition: opacity 1.2s;
  background: linear-gradient(200deg, rgba(220, 235, 255, .55), rgba(200, 220, 255, .15) 60%, transparent); clip-path: polygon(100% 0, 82% 0, 0 100%, 26% 100%);
  left: 47%; top: 26%; mix-blend-mode: screen; }
.r-dach.lupe .ms-mondstrahl { opacity: 1; animation: msMondlicht 3s ease-in-out infinite; }
.ms-laternenglanz { position: absolute; left: 46%; top: 50%; width: 14%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; opacity: .35;
  background: radial-gradient(circle, rgba(255, 226, 150, .9), rgba(255, 190, 90, .35) 35%, transparent 65%); mix-blend-mode: screen; transition: opacity .8s; }
.r-dach.wind .ms-laternenglanz { opacity: 0; }
.r-dach.lupe .ms-laternenglanz { opacity: .7; background: radial-gradient(circle, rgba(225, 238, 255, .95), rgba(180, 205, 255, .35) 35%, transparent 65%); }
.ms-auf-bild { width: 62px; height: 62px; border-radius: 50%; overflow: hidden; border: 3px solid var(--f); background: #fff; flex-shrink: 0; }
.ms-auf-bild img { width: 100% !important; height: 100% !important; border: none !important; object-fit: cover; transform: scale(1.27); }
body.ms-offen #zg-install, body.lhw-offen #zg-install { display: none !important; }
/* Spiegelsaal: kein backdrop-filter (ließ die Seite dahinter durchscheinen), nur ein milchiger Schleier, der klarer wird */
.ms-beschlag { backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
  background: radial-gradient(120% 90% at 50% 40%, rgba(235, 238, 252, calc(.30 - var(--ms-anteil, 0) * .30)), rgba(235, 238, 252, calc(.12 - var(--ms-anteil, 0) * .12))) !important; }
.ms-ebene { background: #120c22 !important; }

/* Spiegelsaal: klare Spiegel blenden mit dem Fortschritt über das beschlagene Bild */
.ms-bild-klar { opacity: var(--ms-anteil, 0); transition: opacity 1.2s ease; pointer-events: none; }

/* Schlossglanz: Flackern nur über scale und Helligkeit, damit Lage (translate) und Stärke (opacity = Fortschritt) bleiben */
.ms-schlossglanz { transform: none; translate: -50% -50%; animation-name: msGlimmen; }
@keyframes msGlimmen { 0%, 100% { scale: 1; filter: brightness(.9); } 40% { scale: 1.08; filter: brightness(1.1); } 70% { scale: .95; filter: brightness(.85); } }

/* ---------- Bildschirmgrößen (28.10.2026) ----------
   Handy quer: Kopfzeile lag über der Aufgabenfrage, Lunas Brief über dem Titel.
   iMac/2560 und größer: Karten waren klein vor dem großen Bild. Safari: Unschärfe braucht -webkit-. */
.ms-zurueck { -webkit-backdrop-filter: blur(6px); }
@media (max-height: 500px) and (orientation: landscape) {
  .ms-kopf { position: relative; padding: 6px 12px; }
  .ms-inhalt { min-height: calc(100dvh - 52px); }
  .ms-raum-titel h2, .ms-plakat-text h1 { font-size: 1.55rem; }
  .ms-brief { margin-top: 62px; padding: 14px 18px; }
  .ms-brief .ms-figur { top: -54px; left: -18px; }
  .ms-brief .ms-figur-kreis { width: 80px; height: 80px; }
  .ms-brief p { font-size: 1rem; line-height: 1.45; margin-bottom: 6px; }
  .ms-brief p.anrede { margin-left: 58px; }
}
@media (min-width: 2100px) and (min-height: 1150px) {
  .ms-inhalt { max-width: 1700px; }
  .ms-aufgabe, .ms-brief, .ms-szene, .ms-raum-titel, .ms-plakat-text, .ms-fest-tiere { zoom: 1.5; }
  .ms-pergament { max-height: 36vh; }
  .ms-kopf { zoom: 1.3; }
}
@media (min-width: 3400px) and (min-height: 1900px) {
  .ms-inhalt { max-width: 2800px; }
  .ms-aufgabe, .ms-brief, .ms-szene, .ms-raum-titel, .ms-plakat-text, .ms-fest-tiere { zoom: 2.4; }
  .ms-pergament { max-height: 22vh; }
  .ms-kopf { zoom: 2; }
}
