* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; height: 100dvh; overflow: hidden; overscroll-behavior: none; background: #14110e; color: #1a1f2e;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif; }

#buehne { position: fixed; inset: 0; overflow: hidden; transition: height .8s ease; }
#bild { position: absolute; transition: left .9s ease, top .9s ease, width .9s ease, height .9s ease; }
#bild.sofort { transition: none; }
#standbild, #film, #ueberblend { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#film { opacity: 0; }
#ueberblend { opacity: 0; pointer-events: none; }
#film.sichtbar { opacity: 1; }

/* ---------- Klickflächen ---------- */
#hotspots { position: absolute; inset: 0; opacity: 0; pointer-events: none; transition: opacity .4s; }
#hotspots.an { opacity: 1; pointer-events: auto; }
.hotspot { position: absolute; border: 0; background: transparent; cursor: pointer; border-radius: 6px;
  transition: box-shadow .2s, background .2s; }
.hotspot:hover, .hotspot:focus-visible { background: rgba(255,255,255,.18);
  box-shadow: 0 0 0 3px rgba(255,255,255,.9), 0 0 30px 6px rgba(255,220,140,.7); outline: none; }
.hotspot span { position: absolute; left: 50%; top: calc(100% + 8px); transform: translateX(-50%);
  background: rgba(20,17,14,.85); color: #fff; font-size: 13px; padding: 4px 10px; border-radius: 99px;
  white-space: nowrap; opacity: 0; transition: opacity .2s; pointer-events: none; }
.hotspot:hover span, .hotspot:focus-visible span, .hotspot.immer span { opacity: 1; }
.hotspot.puls::before { content: ""; position: absolute; inset: -6px; border-radius: 50%;
  border: 2px solid rgba(255,220,140,.9); animation: puls 2s infinite; }
@keyframes puls { 0% { transform: scale(.7); opacity: 1; } 100% { transform: scale(1.8); opacity: 0; } }

/* ---------- Bedienung ---------- */
#zurueck, #klassisch { position: fixed; z-index: 30; font: inherit; font-size: 15px; border-radius: 99px;
  padding: 10px 18px; cursor: pointer; text-decoration: none; }
#zurueck { top: 18px; left: 18px; border: 0; background: #fff; color: #1a1f2e; font-weight: 600;
  box-shadow: 0 6px 24px rgba(0,0,0,.35); }
#zurueck:hover { background: #ffe066; }
#schlossknopf { position: fixed; z-index: 30; right: 14px; bottom: 18px; border: 0; border-radius: 99px; padding: 12px 18px;
  font: inherit; font-size: 15px; font-weight: 600; background: #d4a62a; color: #1a1f2e; box-shadow: 0 6px 24px rgba(0,0,0,.35); cursor: pointer; }
#klassisch { bottom: 14px; left: 18px; background: rgba(20,17,14,.55); color: #fff; font-size: 13px; padding: 6px 12px; }

/* ---------- Inhalt rechts ---------- */
#inhalt { position: fixed; z-index: 20; top: 18px; right: 18px; bottom: 18px; width: min(38vw, 600px);
  background: #fff; border-radius: 14px; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,.45);
  transform: translateX(calc(100% + 40px)); opacity: .0; transition: transform .7s cubic-bezier(.2,.8,.2,1), opacity .5s; }
#inhalt.offen { transform: none; opacity: .96; }
#rahmen { width: 100%; height: 100%; border: 0; display: block; }

#schlosskarte { position: fixed; z-index: 20; right: 8vw; top: 50%; transform: translateY(-50%);
  background: #fff; border-radius: 14px; padding: 28px 32px; max-width: 340px; box-shadow: 0 20px 60px rgba(0,0,0,.45); }
#schlosskarte h2 { margin-bottom: 8px; }
#schlosskarte p { color: #5c6579; margin-bottom: 18px; line-height: 1.5; }
.knopf { display: inline-block; background: #1d4ed8; color: #fff; text-decoration: none; font-weight: 600;
  padding: 10px 22px; border-radius: 8px; }

/* ---------- Lader ---------- */
#lader { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: #14110e; color: #e9e1d3;
  text-align: center; transition: opacity .6s; }
#lader.weg { opacity: 0; pointer-events: none; }
.lader-kreis, .boot-kreis { width: 38px; height: 38px; margin: 0 auto 14px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,.25); border-top-color: #fff; animation: dreh 1s linear infinite; }
@keyframes dreh { to { transform: rotate(360deg); } }

/* ---------- Monitor ---------- */
#monitor { position: absolute; left: 0; top: 0; width: 1600px; height: 684px; transform-origin: 0 0;
  background: #000; overflow: hidden; font-size: 16px; }
#monitor > * { position: absolute; inset: 0; opacity: 0; transition: opacity .5s; }
#monitor.boot .boot { opacity: 1; }
#monitor.ki .besprechung, #monitor.software .desktop { opacity: 1; }
.boot { display: grid; place-content: center; background: #05070c; color: #fff; }
.boot-logo { font-size: 64px; font-weight: 800; text-align: center; margin-bottom: 30px; letter-spacing: 2px; }

/* Besprechung */
.besprechung { background: #1f1f1f; color: #fff; display: flex; flex-direction: column; }
.bs-kopf { display: flex; align-items: center; gap: 14px; padding: 12px 20px; background: #292929; font-size: 17px; }
.bs-punkt { width: 26px; height: 26px; border-radius: 6px; background: #5b5fc7; }
.bs-zeit { margin-right: auto; color: #bdbdbd; }
.bs-reiter { color: #d6d6d6; font-size: 15px; padding: 4px 10px; border-radius: 6px; background: #333; }
.bs-raster { flex: 1; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 10px; padding: 12px; min-height: 0; }
.kachel { position: relative; border-radius: 10px; overflow: hidden; display: grid; place-items: end center; }
.kachel svg { height: 96%; width: auto; display: block; }
.kachel .name { position: absolute; left: 10px; bottom: 8px; background: rgba(0,0,0,.6); padding: 3px 10px; border-radius: 6px; font-size: 15px; }
.kachel.spricht { box-shadow: inset 0 0 0 4px #7b83eb; }
.kachel.spricht .mund { animation: reden .35s infinite alternate; transform-origin: center; transform-box: fill-box; }
.kachel .lid { animation: blinzeln 4s infinite; transform-origin: center; transform-box: fill-box; }
.kachel:nth-child(2) .lid { animation-delay: 1.3s; } .kachel:nth-child(3) .lid { animation-delay: 2.1s; } .kachel:nth-child(4) .lid { animation-delay: .6s; }
@keyframes reden { from { transform: scaleY(.3); } to { transform: scaleY(1.2); } }
@keyframes blinzeln { 0%, 94%, 100% { transform: scaleY(1); } 97% { transform: scaleY(.1); } }
.bs-leiste { display: flex; justify-content: center; gap: 12px; padding: 12px; background: #292929; }
.bs-knopf { background: #3d3d3d; border-radius: 8px; padding: 8px 16px; font-size: 20px; }
.bs-auflegen { background: #c4314b; font-size: 16px; font-weight: 600; padding: 10px 20px; }

/* Desktop */
.desktop { background: linear-gradient(135deg, #0b3a67, #3a1c71 60%, #7a2a5b); }
.fenster { position: absolute; background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 16px 50px rgba(0,0,0,.5); }
.fenster-spiel { left: 60px; top: 40px; width: 860px; background: #000; }
.fenster-spiel img { display: block; width: 100%; }
.fenster-kopf { display: flex; justify-content: space-between; padding: 7px 14px; background: #20232b; color: #e8e8e8; font-size: 14px; }
.fenster-kopf i { font-style: normal; letter-spacing: 6px; color: #aaa; }
.fenster-vorschau { right: 120px; top: 14px; width: 400px; height: 610px; background: #ececef; display: flex; flex-direction: column; }
.vorschau-kopf { display: flex; align-items: center; gap: 12px; padding: 9px 12px; background: #f6f6f7; border-bottom: 1px solid #d9d9de; font-size: 12px; }
.ampel { display: flex; gap: 6px; } .ampel b { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.ampel b:nth-child(2) { background: #febc2e; } .ampel b:nth-child(3) { background: #28c840; }
.vorschau-titel { display: flex; flex-direction: column; line-height: 1.2; } .vorschau-titel small { color: #777; font-size: 10px; }
.vorschau-wahl { margin-left: auto; border: 1px solid #ccc; border-radius: 6px; padding: 4px 10px; background: #fff; }
.vorschau-flaeche { flex: 1; display: grid; place-items: center; min-height: 0; }
.vorschau-fuss { display: flex; justify-content: space-between; padding: 5px 12px; font-size: 11px; color: #666; border-top: 1px solid #d9d9de; }
.iphone { position: relative; width: 240px; height: 505px; border-radius: 40px; border: 8px solid #17171a; background: #f2f2f7;
  box-shadow: 0 12px 30px rgba(0,0,0,.3); padding: 0 14px; overflow: hidden; color: #000; }
.iphone-insel { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); width: 76px; height: 22px; border-radius: 12px; background: #000; }
.iphone-status { display: flex; justify-content: space-between; font-size: 11px; font-weight: 600; padding: 12px 8px 0; }
.liste-kopf { display: flex; justify-content: space-between; color: #007aff; font-size: 13px; margin-top: 16px; }
.iphone h3 { font-size: 24px; margin: 6px 0 10px; }
.liste { list-style: none; background: #fff; border-radius: 12px; overflow: hidden; }
.liste li { display: flex; align-items: center; gap: 10px; padding: 9px 12px; font-size: 13px; border-bottom: 1px solid #ececf0; }
.liste li::before { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid #c4c4c9; flex: none; }
.liste li.ok { color: #9a9aa0; text-decoration: line-through; }
.liste li.ok::before { content: "✓"; background: #34c759; border-color: #34c759; color: #fff; font-size: 11px; display: grid; place-items: center; text-decoration: none; }
.iphone-balken { position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%); width: 90px; height: 4px; border-radius: 2px; background: #000; }
.taskleiste { position: absolute; left: 0; right: 0; bottom: 0; height: 46px; background: rgba(20,22,30,.85); display: flex; align-items: center;
  justify-content: center; gap: 16px; color: #fff; font-size: 22px; }
.taskleiste .an { border-bottom: 3px solid #7ab8ff; } .taskleiste .uhr { position: absolute; right: 18px; font-size: 14px; }
.toast { position: absolute; right: 20px; bottom: 60px; background: #20232b; color: #fff; padding: 12px 18px; border-radius: 10px;
  font-size: 15px; box-shadow: 0 8px 30px rgba(0,0,0,.5); transform: translateX(120%); transition: transform .5s .9s; }
#monitor.software .toast { transform: none; }

/* ---------- Startseiten-Panel ---------- */
#startpanel { position: fixed; z-index: 15; left: 50%; bottom: 0; width: min(860px, 94vw); top: 70vh;
  transform: translateX(-50%); background: #fff; border-radius: 14px 14px 0 0; overflow: hidden;
  display: flex; flex-direction: column; box-shadow: 0 -10px 50px rgba(0,0,0,.35);
  transition: top .6s cubic-bezier(.2,.8,.2,1), transform .6s cubic-bezier(.2,.8,.2,1), opacity .4s; }
#startpanel.weg { transform: translate(-50%, 110%); opacity: 0; pointer-events: none; }
.sp-kopf { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid #e3e8ef; flex: none; }
.sp-titel { margin-right: auto; font-size: 15px; } .sp-titel span { color: #5c6579; }
#sp-mehr, .sp-klassisch { font: inherit; font-size: 14px; border-radius: 99px; padding: 6px 14px; cursor: pointer; text-decoration: none; }
#sp-zu { flex: none; width: 44px; height: 44px; border: 0; border-radius: 50%; background: #eef1f6; color: #1a1f2e;
  font-size: 26px; line-height: 44px; text-align: center; padding: 0; cursor: pointer; }
#sp-zu:hover { background: #dfe5ee; }
.hotspot.banner-hs:hover { background: rgba(255,214,102,.18); }
#sp-mehr { border: 1px solid #c9d2e0; background: #f6f8fb; color: #1a1f2e; }
.sp-klassisch { background: #1a1f2e; color: #fff; }
#startrahmen { flex: 1; width: 100%; border: 0; display: block; min-height: 0; }
#hinweis { position: fixed; z-index: 40; left: 50%; top: 22px; transform: translate(-50%, -150%); background: rgba(20,17,14,.9);
  color: #fff; padding: 10px 18px; border-radius: 99px; font-size: 15px; transition: transform .4s; pointer-events: none; max-width: 90vw; text-align: center; }
#hinweis.an { transform: translate(-50%, 0); }
.hotspot.lampe.aktion::before { content: ""; position: absolute; inset: -10px; border-radius: 50%;
  border: 3px solid rgba(255,170,60,.95); animation: puls 1.6s infinite; }
.hotspot.lampe span { opacity: 1; }

/* ---------- Hochformat (Handy) ---------- */
@media (orientation: portrait), (max-width: 760px) {
  body.station:not(.hoch) #buehne { height: 44vh; }
  /* dvh = tatsächlich sichtbare Höhe (iPhone: ohne die ein-/ausfahrenden Leisten); die Gegenstände liegen im oberen ~45 % */
  #inhalt { top: auto; left: 0; right: 0; bottom: 0; width: auto; height: 50vh; height: 50dvh; border-radius: 16px 16px 0 0;
    transform: translateY(105%); }
  #zurueck { top: 12px; left: 12px; padding: 12px 18px; }
  #klassisch { display: none; }
  #startpanel { left: 0; width: 100vw; transform: none; border-radius: 16px 16px 0 0; }
  #startpanel.weg { transform: translateY(110%); }
  .sp-titel { display: none; }   /* steht ja schon auf dem Banner */
  .sp-kopf { justify-content: flex-end; }
  #schlosskarte { left: 16px; right: 16px; top: auto; bottom: 24px; transform: none; max-width: none; }
  .hotspot.ding span { opacity: 1; font-size: 12px; }
}

/* Fahrt wird noch geladen */
body.laedt::after { content: ""; position: fixed; z-index: 60; left: 50%; top: 50%; width: 42px; height: 42px; margin: -21px;
  border-radius: 50%; border: 3px solid rgba(255,255,255,.35); border-top-color: #fff; animation: dreh 1s linear infinite; }

/* Lampen-Beschriftung über der Lampe, damit sie nicht unter dem Panel verschwindet */
.hotspot.lampe span { top: auto; bottom: calc(100% + 8px); }

/* Banner: kleines ⓘ als Hinweis, dass es sich öffnen lässt */
.hotspot.banner-hs::after { content: "i"; position: absolute; right: 6%; top: 50%; transform: translateY(-50%);
  width: 22px; height: 22px; border-radius: 50%; background: #ffd666; color: #1d2b5a; font: 700 14px/22px Georgia, serif;
  text-align: center; box-shadow: 0 0 0 0 rgba(255,214,102,.7); animation: info-puls 2.4s infinite; }
@keyframes info-puls { 0% { box-shadow: 0 0 0 0 rgba(255,214,102,.7); } 70%, 100% { box-shadow: 0 0 0 10px rgba(255,214,102,0); } }
@media (orientation: portrait), (max-width: 760px) {
  .hotspot.banner-hs span { display: none; }
}

/* Lampe: keine Beschriftung, kein Ring, kein Leuchtrahmen – was sie macht, sollen Besucher selbst entdecken */
.hotspot.lampe span, .hotspot.lampe.aktion::before { display: none !important; }
.hotspot.lampe:hover, .hotspot.lampe:focus-visible { background: transparent; box-shadow: none; }
