:root {
  --navy: #011A3D;
  --cyan: #F0AD7C;
  --cyan-l: #5FE0FF;
  --bg: #02060f;
  --ink: #d8f4ff;
  --dim: #7fa9c2;
  --accent: #F0AD7C;
  --mono: "JetBrains Mono", "DejaVu Sans Mono", "Fira Mono", ui-monospace, monospace;
}
.seo-titel { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--ink); font-family: var(--mono); }
#app, #app canvas { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
[hidden] { display: none !important; }

/* ---------- Kopfzeile ---------- */
#hud { position: fixed; top: 16px; left: 16px; pointer-events: none; text-shadow: 0 0 8px rgba(52,195,240,.6); }
.brand { font-weight: 700; letter-spacing: .18em; font-size: 15px; color: var(--cyan-l); }
.brand span, .boot-logo span { color: #8A5CFF; margin: 0 .35em; }
.sub { font-size: 12px; color: var(--dim); margin-top: 3px; }
.found { margin-top: 8px; font-size: 12px; color: var(--cyan); }

#help { position: fixed; left: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 4px;
  font-size: 12px; color: var(--dim); background: rgba(2,10,24,.55); border: 1px solid rgba(52,195,240,.25);
  padding: 10px 12px; border-radius: 6px; pointer-events: none; max-width: calc(100vw - 32px); }
#help b { color: var(--cyan-l); letter-spacing: .15em; font-size: 11px; }
kbd { display: inline-block; min-width: 1.6em; text-align: center; padding: 0 4px; margin: 0 1px;
  border: 1px solid rgba(95,224,255,.5); border-radius: 3px; color: var(--cyan-l); font-family: var(--mono); font-size: 11px; }

#fps { position: fixed; top: 16px; right: 16px; font-size: 11px; color: var(--dim); pointer-events: none; }
#minimap { position: fixed; right: 16px; bottom: 16px; width: 170px; height: 170px; opacity: .92; pointer-events: none; }

/* ---------- Hinweis „E drücken“ ---------- */
#prompt { position: fixed; left: 50%; bottom: 12%; transform: translateX(-50%); font-family: var(--mono);
  font-size: 15px; color: var(--ink); background: rgba(2,12,28,.78); border: 1px solid var(--accent);
  box-shadow: 0 0 18px color-mix(in srgb, var(--accent) 45%, transparent); padding: 10px 18px; border-radius: 6px;
  cursor: pointer; animation: pulse 1.6s ease-in-out infinite; max-width: calc(100vw - 32px); }
#prompt kbd { font-size: 13px; }
@keyframes pulse { 50% { box-shadow: 0 0 4px color-mix(in srgb, var(--accent) 30%, transparent); } }

/* ---------- Projekt-Panel ---------- */
#panel { position: fixed; z-index: 9; top: 50%; right: 24px; transform: translateY(-50%); width: min(420px, calc(100vw - 32px));
  max-height: calc(100vh - 48px); overflow: auto; background: linear-gradient(160deg, rgba(4,20,44,.55), rgba(2,8,20,.55));
  border: 1px solid var(--accent); border-radius: 10px; padding: 22px 22px 18px;
  box-shadow: 0 0 30px color-mix(in srgb, var(--accent) 35%, transparent), inset 0 0 40px rgba(52,195,240,.06);
  backdrop-filter: blur(6px); animation: panelIn .25s ease-out; }
@keyframes panelIn { from { opacity: 0; transform: translateY(-50%) translateX(30px); } }
.panel-kicker { font-size: 11px; letter-spacing: .2em; color: var(--accent); }
#panel h2 { margin: 6px 0 4px; font-size: 21px; line-height: 1.25; color: #fff; text-shadow: 0 0 10px color-mix(in srgb, var(--accent) 60%, transparent); }
#panel-sub { color: var(--dim); font-size: 13px; margin-bottom: 14px; }
#panel-text { margin: 0 0 14px; padding-left: 0; list-style: none; font-size: 14px; line-height: 1.55; }
#panel-text li { position: relative; padding-left: 18px; margin-bottom: 8px; }
#panel-text li::before { content: "›"; position: absolute; left: 2px; color: var(--accent); font-weight: 700; }
#panel-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
#panel-tags span { font-size: 11px; padding: 3px 8px; border-radius: 99px; border: 1px solid color-mix(in srgb, var(--accent) 60%, transparent); color: var(--accent); }
#panel-links { display: flex; flex-wrap: wrap; gap: 8px; }
#panel-links a { font-size: 13px; color: #021022; background: var(--accent); padding: 8px 14px; border-radius: 6px; text-decoration: none; font-weight: 700; }
#panel-links a:hover { filter: brightness(1.15); }
#panel-close { position: absolute; top: 10px; right: 12px; background: none; border: 0; color: var(--dim); font-size: 18px; cursor: pointer; }
#panel-close:hover { color: #fff; }

#toast { position: fixed; top: 64px; left: 50%; transform: translateX(-50%); background: rgba(2,12,28,.85);
  border: 1px solid var(--cyan); padding: 8px 14px; border-radius: 6px; font-size: 13px; }

/* ---------- Touch-Joystick ---------- */
#joystick { position: fixed; left: 24px; bottom: 24px; width: 130px; height: 130px; border-radius: 50%;
  border: 2px solid rgba(52,195,240,.45); background: rgba(2,12,28,.35); touch-action: none; }
#stick { position: absolute; left: 50%; top: 50%; width: 54px; height: 54px; margin: -27px 0 0 -27px; border-radius: 50%;
  background: rgba(52,195,240,.45); box-shadow: 0 0 14px rgba(52,195,240,.6); }

/* ---------- Startbildschirm ---------- */
#boot { position: fixed; inset: 0; display: grid; place-items: center; padding: 16px;
  background: radial-gradient(ellipse at center, rgba(4,18,42,.45) 0%, rgba(2,6,15,.9) 78%); z-index: 10; transition: opacity .6s; }
#boot.weg { opacity: 0; pointer-events: none; }
.boot-box { width: min(560px, 100%); }
.boot-logo { font-size: clamp(18px, 5vw, 28px); font-weight: 700; letter-spacing: .2em; color: var(--cyan-l); text-shadow: 0 0 14px rgba(52,195,240,.7); margin-bottom: 18px; }
#bootlog { min-height: 9.5em; margin: 0 0 14px; font-size: 13px; line-height: 1.6; color: #8fe3ff; white-space: pre-wrap; }
.bar { height: 4px; background: rgba(52,195,240,.15); border-radius: 2px; overflow: hidden; margin-bottom: 18px; }
.bar i { display: block; height: 100%; width: 0; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); transition: width .2s; }
#enter { font-family: var(--mono); font-size: 16px; letter-spacing: .15em; color: var(--cyan-l); background: transparent;
  border: 1px solid var(--cyan); padding: 12px 22px; border-radius: 6px; cursor: pointer; }
#enter:not(:disabled):hover { background: rgba(52,195,240,.15); box-shadow: 0 0 18px rgba(52,195,240,.5); }
#enter:disabled { opacity: .5; cursor: wait; }
.boot-hint { color: var(--dim); font-size: 12px; margin-top: 16px; }

@media (max-width: 640px) {
  #minimap { width: 120px; height: 120px; }
  #fps { display: none; }
  #help { display: none !important; }
  #panel { top: auto; bottom: 16px; right: 16px; transform: none; max-height: 60vh; }
  @keyframes panelIn { from { opacity: 0; transform: translateY(30px); } }
}

/* ---------- Gebäude: Kino-Balken, Titel, Überspringen, Panel-Knöpfe ---------- */
.kino-balken { position: fixed; left: 0; right: 0; height: 0; background: #000; z-index: 5; transition: height .8s ease; pointer-events: none; }
#balken-oben { top: 0; } #balken-unten { bottom: 0; }
body.kino .kino-balken { height: 9vh; }
#intro-titel { position: fixed; left: 50%; bottom: 14vh; transform: translateX(-50%); text-align: center; z-index: 6;
  opacity: 0; transition: opacity 1s ease; pointer-events: none; text-shadow: 0 0 16px rgba(52,195,240,.7); padding: 0 16px; width: 100%; }
#intro-titel.zeigen { opacity: 1; }
#intro-titel .t1 { font-size: clamp(20px, 4.5vw, 40px); font-weight: 700; letter-spacing: .25em; color: #fff; }
#intro-titel .t2 { font-size: clamp(12px, 2vw, 16px); letter-spacing: .3em; color: var(--cyan-l); margin-top: 8px; }
#skip { position: fixed; right: 16px; bottom: calc(9vh + 12px); z-index: 7; font-family: var(--mono); font-size: 13px;
  color: var(--cyan-l); background: rgba(2,12,28,.7); border: 1px solid rgba(52,195,240,.6); padding: 8px 14px; border-radius: 6px; cursor: pointer; }
#panel-links button.pbtn { font-family: var(--mono); font-size: 13px; color: var(--ink); background: rgba(52,195,240,.08);
  border: 1px solid var(--accent); padding: 9px 14px; border-radius: 6px; cursor: pointer; }
#panel-links button.pbtn:hover { background: color-mix(in srgb, var(--accent) 25%, transparent); }
#panel-links button.pbtn.aktiv { background: var(--accent); color: #021022; font-weight: 700; cursor: default; }
#panel-links button.pbtn small { display: block; font-size: 10px; opacity: .75; margin-top: 2px; }
#ort { margin-top: 8px; font-size: 12px; color: var(--cyan); }

/* ---------- Zugangskarte ---------- */
#karte { position: fixed; left: 50%; bottom: calc(9vh + 24px); z-index: 8; width: min(380px, 70vw);
  transform: translate(-50%, 40px) perspective(800px) rotateX(18deg) scale(.9); opacity: 0; pointer-events: none;
  transition: transform .6s cubic-bezier(.2,.9,.3,1.2), opacity .4s; }
#karte.zeigen { opacity: 1; transform: translate(-50%, 0) perspective(800px) rotateX(0) scale(1); }
#karte img { width: 100%; display: block; border-radius: 16px; box-shadow: 0 0 0 1px rgba(95,224,255,.5), 0 10px 40px rgba(52,195,240,.45); }
#zugang { position: fixed; left: 50%; top: calc(9vh + 24px); transform: translateX(-50%); z-index: 8; font-size: clamp(14px, 2.2vw, 20px);
  letter-spacing: .2em; color: #39FF88; background: rgba(2,20,12,.75); border: 1px solid #39FF88; border-radius: 8px; padding: 10px 18px;
  text-shadow: 0 0 12px rgba(57,255,136,.8); opacity: 0; transition: opacity .3s; pointer-events: none; white-space: nowrap; }
#zugang.zeigen { opacity: 1; }

/* ---------- Steuerleiste Präsentation ---------- */
#praes-bar { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 6; display: flex; align-items: center; gap: 10px;
  background: rgba(2,12,28,.82); border: 1px solid var(--accent); border-radius: 10px; padding: 8px 10px; max-width: calc(100vw - 32px);
  box-shadow: 0 0 20px color-mix(in srgb, var(--accent) 35%, transparent); flex-wrap: wrap; justify-content: center; }
#praes-bar button, #praes-bar a { font-family: var(--mono); font-size: 13px; color: var(--ink); background: rgba(52,195,240,.08);
  border: 1px solid color-mix(in srgb, var(--accent) 70%, transparent); border-radius: 6px; padding: 8px 12px; cursor: pointer; text-decoration: none; }
#praes-bar button:hover, #praes-bar a:hover { background: color-mix(in srgb, var(--accent) 25%, transparent); }
.praes-mitte { display: flex; flex-direction: column; align-items: center; min-width: 180px; font-size: 12px; gap: 2px; }
.praes-mitte b { color: var(--accent); letter-spacing: .12em; font-size: 12px; }
.praes-mitte span { color: var(--dim); }
.praes-leiste { width: 100%; height: 3px; background: rgba(255,255,255,.1); border-radius: 2px; overflow: hidden; }
.praes-leiste i { display: block; height: 100%; width: 0; background: var(--accent); }

/* ---------- Überblendung, Führung ---------- */
#fade { position: fixed; inset: 0; background: #000; opacity: 0; pointer-events: none; z-index: 20; transition: opacity .4s ease; }
#fade.an { opacity: 1; }
#tour-bar { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 6; width: min(760px, calc(100vw - 32px));
  background: rgba(2,12,28,.85); border: 1px solid #F0AD7C; border-radius: 10px; padding: 14px 18px; display: flex; flex-direction: column; gap: 6px;
  box-shadow: 0 0 22px rgba(52,195,240,.35); }
#tour-bar b { color: #5FE0FF; letter-spacing: .15em; font-size: 12px; }
#tour-bar span { font-size: 16px; line-height: 1.5; }
#tour-bar small { color: var(--dim); font-size: 11px; }

/* ---------- Karten im Gespräch mit Paul ---------- */
#panel { max-height: 88vh; overflow-y: auto; }
.pkarten { width: 100%; margin: 6px 0 4px; }
.pk-titel { font-size: 12px; letter-spacing: .12em; color: var(--accent); margin: 8px 0 8px; text-transform: uppercase; }
.pk-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
#panel-links button.pkarte { text-align: left; font-family: var(--mono); color: var(--ink); background: rgba(240,173,124,.07);
  border: 1px solid color-mix(in srgb, var(--accent) 70%, transparent); border-radius: 8px; padding: 9px 10px; cursor: pointer; display: grid; gap: 2px; }
#panel-links button.pkarte:hover { background: color-mix(in srgb, var(--accent) 25%, transparent); transform: translateY(-1px); }
.pk-icon { font-size: 20px; line-height: 1; }
#panel-links button.pkarte b { font-size: 12.5px; color: #fff; }
#panel-links button.pkarte small { font-size: 10.5px; opacity: .8; line-height: 1.3; }

/* ---------- Zertifikat im Panel ---------- */
#panel-bild { display: block; width: 100%; border-radius: 6px; margin: 4px 0 12px; box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 60%, transparent); }

/* ---------- Nachgebaute Tastatur (unten links) ---------- */
#help { padding: 10px 12px 8px; background: rgba(2,10,24,.72); border: 1px solid rgba(52,195,240,.4); border-radius: 12px; backdrop-filter: blur(4px); }
.kb { display: flex; flex-direction: column; gap: 5px; }
.kb-zeile { display: flex; gap: 5px; align-items: stretch; }
.kt { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 54px; padding: 5px 6px 4px; border-radius: 8px;
  background: linear-gradient(#17314f, #0c1f36); border: 1px solid rgba(95,224,255,.45); border-bottom-width: 3px; color: #d8f4ff; transition: transform .06s, background .1s; text-align: center; }
#help .kt b { font-size: 14px; line-height: 1; color: #fff; letter-spacing: 0; }
.kt small { font-size: 9.5px; line-height: 1.15; margin-top: 3px; color: #8fb0c6; max-width: 64px; }
.kt.an { transform: translateY(2px); border-bottom-width: 1px; background: linear-gradient(#34C3F0, #1c8fb8); }
#help .kt.an b, .kt.an small { color: #021022; }
.kt-m { background: linear-gradient(#2a2036, #17101f); border-color: rgba(240,173,124,.5); }
.kt-shift { min-width: 70px; }
.kt-space { min-width: 150px; }
.kt-esc { min-width: 54px; }
.kb-luecke { display: block; width: 30px; }
.kb-luecke2 { width: 48px; }
.kb-maus { font-size: 10.5px; color: #8fb0c6; margin-top: 2px; }
.kt-maus { font-size: 13px; }

#help { opacity: .5; transform: scale(.8); transform-origin: left bottom; }

/* Workshop-Fenster: die Website als kleiner Browser in der Welt */
#ws { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; background: rgba(2,8,20,.45); }
#ws[hidden] { display: none; }
#ws .ws-fenster { width: min(1000px, 88vw); height: min(720px, 84vh); display: flex; flex-direction: column; border-radius: 12px; overflow: hidden;
  background: #0b1626; border: 1px solid rgba(52,195,240,.5); box-shadow: 0 12px 50px rgba(0,0,0,.6); }
#ws .ws-kopf { display: flex; align-items: center; gap: 10px; padding: 7px 10px; background: #0f2036; color: #8fb0c6; font-size: 12px; }
#ws .ws-url { flex: 1; padding: 3px 10px; border-radius: 6px; background: rgba(255,255,255,.07); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#ws .ws-zu { cursor: pointer; border: 0; border-radius: 6px; padding: 4px 10px; background: #F06CC8; color: #021022; font-weight: 700; }
#ws iframe { flex: 1; width: 100%; border: 0; background: #fff; }
@media (max-width: 700px) { #ws .ws-fenster { width: 100vw; height: 100vh; border-radius: 0; } }

.boot-warten { color: var(--cyan-l); font-size: 14px; margin-top: 14px; animation: warten 1.6s ease-in-out infinite; }
#enter:not([disabled]) ~ .boot-warten { display: none; }
@keyframes warten { 50% { opacity: .45; } }
:root {
