:root {
  --tanne: #0e201c;
  --tanne-hell: #183d30;
  --gold: #d6b26a;
  --weiss: #f0f4f1;
  --schatten: 0 8px 28px rgba(0, 0, 0, .45);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--tanne);
  color: var(--weiss);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* Alles, was über der AR-Szene liegt. Standardmäßig für Zeigegeräte
   durchlässig, damit Tippen auf den Boden bei der Szene ankommt. */
.ebene {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: max(1rem, env(safe-area-inset-top)) 1rem max(1.1rem, env(safe-area-inset-bottom));
}

.ebene > * { pointer-events: auto; }

/* --- Startbildschirm --- */

#start {
  position: fixed;
  inset: 0;
  z-index: 30;
  background:
    radial-gradient(120% 80% at 50% 0%, var(--tanne-hell) 0%, var(--tanne) 70%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 2rem 1.5rem max(2rem, env(safe-area-inset-bottom));
  gap: .4rem;
}

#start h1 {
  font-size: clamp(1.7rem, 7vw, 2.4rem);
  margin: 0;
  letter-spacing: -.02em;
  line-height: 1.15;
}

#start .unterzeile { color: var(--gold); font-size: .95rem; margin: 0 0 1.4rem; }

#start ol {
  text-align: left;
  margin: 0 0 1.8rem;
  padding: 0;
  list-style: none;
  max-width: 22rem;
  counter-reset: schritt;
}

#start li {
  counter-increment: schritt;
  position: relative;
  padding: .45rem 0 .45rem 2.2rem;
  font-size: .92rem;
  color: rgba(240, 244, 241, .82);
}

#start li::before {
  content: counter(schritt);
  position: absolute;
  left: 0;
  top: .45rem;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: rgba(214, 178, 106, .16);
  color: var(--gold);
  font-size: .8rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.fehler {
  font-size: .85rem;
  color: #f0b8ac;
  background: rgba(224, 100, 79, .12);
  border: 1px solid rgba(224, 100, 79, .35);
  border-radius: 10px;
  padding: .7rem .9rem;
  max-width: 24rem;
  margin: 1rem 0 0;
}

.hinweis {
  font-size: .78rem;
  color: rgba(240, 244, 241, .45);
  max-width: 24rem;
  margin: 1.4rem 0 0;
}

.hinweis a { color: rgba(240, 244, 241, .62); }

/* --- Knöpfe --- */

button {
  font: inherit;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}

.haupt {
  background: var(--gold);
  color: #1a1305;
  font-weight: 700;
  padding: .85rem 2rem;
  font-size: 1.02rem;
  box-shadow: var(--schatten);
}

.haupt:disabled { opacity: .45; }

.leiste {
  display: flex;
  gap: .5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.leiste button {
  background: rgba(12, 20, 18, .68);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--weiss);
  border: 1px solid rgba(255, 255, 255, .16);
  padding: .6rem 1.05rem;
  font-size: .87rem;
  font-weight: 600;
}

.leiste button:disabled { opacity: .35; }

/* --- Kopfzeile und Anweisung während AR --- */

.kopf {
  display: flex;
  justify-content: flex-end;
}

.kopf button {
  background: rgba(12, 20, 18, .6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--weiss);
  border: 1px solid rgba(255, 255, 255, .16);
  width: 2.4rem;
  height: 2.4rem;
  font-size: .95rem;
  font-weight: 700;
  padding: 0;
}

.mitte {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .6rem;
  pointer-events: none;
}

.warnung {
  background: rgba(120, 34, 24, .88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 160, 140, .4);
  border-radius: 14px;
  padding: .8rem 1.1rem;
  font-size: .88rem;
  text-align: left;
  max-width: 22rem;
  margin: 0;
  pointer-events: auto;
}

.warnung b { display: block; margin-bottom: .3rem; }

#anweisung {
  align-self: center;
  /* Sitzt mitten im Bild. Ohne das fängt der Text das Tippen zum Platzieren ab. */
  pointer-events: none;
  background: rgba(12, 20, 18, .72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 14px;
  padding: .7rem 1.1rem;
  font-size: .9rem;
  text-align: center;
  max-width: 20rem;
  transition: opacity .35s;
}

/* --- Infoschicht mit Pflichtangaben --- */

#info {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(8, 14, 12, .93);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  overflow-y: auto;
  padding: max(2rem, env(safe-area-inset-top)) 1.25rem max(2rem, env(safe-area-inset-bottom));
}

#info .inhalt { max-width: 30rem; margin: 0 auto; }
#info h2 { font-size: 1.15rem; margin: 0 0 1rem; }
#info h3 { font-size: .78rem; text-transform: uppercase; letter-spacing: .09em; color: var(--gold); margin: 1.6rem 0 .5rem; }
#info p { font-size: .88rem; color: rgba(240, 244, 241, .78); margin: 0 0 .7rem; }
#info a { color: var(--gold); }
#info .row { display: flex; gap: .7rem; padding: .3rem 0; border-top: 1px solid rgba(255,255,255,.1); font-size: .84rem; }
#info .row:first-child { border-top: 0; }
#info dt { flex: 0 0 9rem; color: rgba(240,244,241,.5); }
#info dd { margin: 0; flex: 1; word-break: break-word; }

[hidden] { display: none !important; }
