:root {
  --akz: #b98cff;
  --akz2: #6fe3ff;
  --bg: #05040f;
  --karte-bg: rgba(14, 10, 36, 0.88);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background: var(--bg);
  color: #f2f0ff;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}

#welt {
  position: fixed;
  inset: 0;
  display: block;
}

.schirm {
  position: fixed;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: env(safe-area-inset-top) 18px env(safe-area-inset-bottom);
  text-align: center;
}
.schirm.an { display: flex; }

#laden { gap: 10px; }
#laden p { color: #a89cd6; letter-spacing: 0.04em; }

.marke {
  font-weight: 800;
  letter-spacing: 0.06em;
  font-size: 15px;
  color: #a89cd6;
}
.marke b { color: #f2f0ff; }
.marke i {
  font-style: normal;
  color: var(--akz);
  margin-left: 6px;
}
.marke.gross { font-size: 34px; margin: 0 0 4px; }

.karte {
  background: var(--karte-bg);
  border: 1px solid rgba(185, 140, 255, 0.25);
  border-radius: 20px;
  padding: 26px 24px 22px;
  max-width: 440px;
  width: 100%;
  backdrop-filter: blur(14px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.karte.klein-karte { max-width: 340px; }

.unter {
  color: #cdc4ee;
  font-size: 14.5px;
  line-height: 1.5;
  margin: 0 0 18px;
}

.wahl {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
  text-align: left;
}
.wahl span { font-size: 12.5px; color: #9c90c9; text-transform: uppercase; letter-spacing: 0.06em; }
.reihe { display: flex; gap: 8px; flex-wrap: wrap; }
.reihe button {
  flex: 1;
  min-width: 84px;
  padding: 9px 10px;
  border-radius: 10px;
  border: 1px solid rgba(185, 140, 255, 0.3);
  background: rgba(255, 255, 255, 0.04);
  color: #ded7ff;
  font-size: 13.5px;
  cursor: pointer;
}
.reihe button.an {
  background: linear-gradient(135deg, var(--akz), var(--akz2));
  color: #100a24;
  border-color: transparent;
  font-weight: 700;
}

.gross-knopf {
  width: 100%;
  padding: 14px 18px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--akz), var(--akz2));
  color: #100a24;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.02em;
  cursor: pointer;
  margin-top: 4px;
}
.rand-knopf {
  width: 100%;
  padding: 11px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  color: #ded7ff;
  font-size: 14px;
  cursor: pointer;
  margin-top: 10px;
}

.vr-bereich { margin-top: 12px; min-height: 4px; }
.vr-bereich :where(button) {
  width: 100%;
  border-radius: 12px !important;
  padding: 12px !important;
  font-weight: 700;
}

.hinweis {
  margin: 14px 0 0;
  font-size: 11.5px;
  color: #8a7db8;
  line-height: 1.5;
}

.kopf {
  position: fixed;
  top: env(safe-area-inset-top, 0);
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
}
.zurueck {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #ded7ff;
  border-radius: 999px;
  padding: 7px 14px 7px 8px;
  font-size: 13px;
  cursor: pointer;
}
.zurueck svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.leiste { display: flex; gap: 8px; }
.klein {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: #ded7ff;
  cursor: pointer;
  font-size: 15px;
}
.klein.aus { opacity: 0.4; }

#hud { justify-content: flex-start; pointer-events: none; }
.leiste-oben {
  position: fixed;
  top: env(safe-area-inset-top, 0);
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  pointer-events: none;
}
.chip {
  background: rgba(10, 6, 26, 0.72);
  border: 1px solid rgba(185, 140, 255, 0.3);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13.5px;
  color: #cdc4ee;
  pointer-events: auto;
}
.chip b { color: #fff; margin-left: 6px; }
.leben { display: flex; gap: 6px; flex: 1; }
.leben-punkt {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff3c4, #ffb833);
  box-shadow: 0 0 8px rgba(255, 184, 51, 0.7);
}
.leiste-oben #pause-knopf { pointer-events: auto; }

.pause-schicht {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(4, 2, 14, 0.78);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.pause-schicht button { max-width: 260px; pointer-events: auto; }
#hud.pausiert .pause-schicht { display: flex; pointer-events: auto; }
.pause-schicht p { font-size: 20px; font-weight: 700; margin: 0 0 8px; }

#dpad {
  position: fixed;
  left: 14px;
  bottom: calc(18px + env(safe-area-inset-bottom));
  width: 148px;
  height: 148px;
  display: none;
}
#dpad.zeige { display: block; }
body.xr-aktiv #dpad { display: none !important; }
#dpad button {
  position: absolute;
  width: 50px;
  height: 50px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: #ded7ff;
  font-size: 16px;
  touch-action: none;
}
.d-oben { left: 49px; top: 0; }
.d-unten { left: 49px; bottom: 0; }
.d-links { left: 0; top: 49px; }
.d-rechts { right: 0; top: 49px; }

#ende h2 { margin: 0 0 6px; font-size: 24px; }
#ende p { color: #cdc4ee; margin: 0 0 18px; }

@media (min-width: 720px) {
  .karte { padding: 34px 32px 28px; }
}
