:root {
  --bg: #0b0d14;
  --text: #f6f3ec;
  --text-2: rgba(246, 243, 236, .72);
  --akzent: #ffba49;
  --glas: rgba(255, 255, 255, .12);
  --glas-rand: rgba(255, 255, 255, .28);
  --glas-glanz: rgba(255, 255, 255, .18);
  --schatten: 0 10px 40px rgba(0, 0, 0, .35);
  --radius: 28px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--text);
  font: 16px/1.45 ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", sans-serif; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Liquid Glass */
.glas {
  background: linear-gradient(135deg, var(--glas-glanz), var(--glas) 45%, rgba(255,255,255,.06));
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  backdrop-filter: blur(22px) saturate(180%);
  border: 1px solid var(--glas-rand);
  box-shadow: var(--schatten), inset 0 1px 0 rgba(255,255,255,.35);
}

/* Kamera-Ebene */
#ar { position: fixed; inset: 0; }
#ar video { object-fit: cover; }

/* Startkarte */
.start { position: fixed; inset: 0; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(1200px 600px at 20% 10%, #3b2a5e 0%, transparent 60%),
              radial-gradient(900px 600px at 90% 90%, #0f5e4e 0%, transparent 55%), var(--bg);
  transition: opacity .4s ease; }
.karte { width: min(380px, 100%); border-radius: var(--radius); padding: 32px 28px 28px; text-align: center; }
.marke { width: 72px; height: 72px; margin: 0 auto 14px; border-radius: 22px; display: grid; place-items: center;
  background: rgba(0,0,0,.35); border: 1px solid var(--glas-rand); }
.marke svg { width: 48px; height: 48px; stroke-width: 4; }
.marke circle { fill: var(--akzent); stroke: none; }
h1 { margin: 0 0 6px; font-size: 30px; letter-spacing: -.02em; }
.karte p { margin: 0 0 24px; color: var(--text-2); }
.los { display: inline-flex; align-items: center; gap: 10px; padding: 16px 26px; border-radius: 999px;
  background: var(--text); color: #12141c; font-weight: 700; font-size: 17px;
  box-shadow: 0 8px 30px rgba(255,186,73,.35); transition: transform .15s ease, opacity .2s; }
.los:active { transform: scale(.96); }
.los:disabled { opacity: .55; cursor: progress; }
.fortschritt { height: 4px; margin: 18px 20px 0; border-radius: 4px; background: rgba(255,255,255,.15); overflow: hidden; }
.fortschritt b { display: block; height: 100%; width: 0; background: var(--akzent); transition: width .2s; }

/* Runde Glasknöpfe */
.rund { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; }
.info-knopf { position: fixed; right: 16px; bottom: calc(16px + var(--safe-b)); z-index: 5; }

/* Obere Leiste */
.leiste { position: fixed; top: calc(12px + var(--safe-t)); left: 16px; right: 16px; z-index: 4;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  opacity: 0; pointer-events: none; transform: translateY(-8px); transition: .3s ease; }
.knoepfe { display: flex; gap: 10px; }
.chip { padding: 10px 16px; border-radius: 999px; font-weight: 600; font-size: 15px;
  max-width: 55vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#ton .an { display: none; }
#ton[aria-pressed="true"] .an { display: inline; }
#ton[aria-pressed="true"] .aus { display: none; }

/* Suchrahmen */
.sucher { position: fixed; z-index: 2; left: 50%; top: 50%; width: min(72vw, 360px); aspect-ratio: 4 / 3;
  transform: translate(-50%, -50%); opacity: 0; pointer-events: none; transition: opacity .3s; }
.sucher i { position: absolute; width: 36px; height: 36px; border: 4px solid #fff; border-radius: 6px;
  animation: puls 1.6s ease-in-out infinite; filter: drop-shadow(0 0 6px rgba(0,0,0,.5)); }
.sucher i:nth-child(1) { left: 0; top: 0; border-right: 0; border-bottom: 0; }
.sucher i:nth-child(2) { right: 0; top: 0; border-left: 0; border-bottom: 0; }
.sucher i:nth-child(3) { right: 0; bottom: 0; border-left: 0; border-top: 0; }
.sucher i:nth-child(4) { left: 0; bottom: 0; border-right: 0; border-top: 0; }
@keyframes puls { 50% { transform: scale(.88); opacity: .7; } }
.hinweis { position: fixed; z-index: 3; left: 50%; bottom: calc(28px + var(--safe-b)); transform: translateX(-50%);
  padding: 12px 20px; border-radius: 999px; font-weight: 600; opacity: 0; transition: opacity .3s; white-space: nowrap; }

/* Zustände */
body:not([data-zustand="start"]) .start { opacity: 0; pointer-events: none; }
body:not([data-zustand="start"]) .info-knopf { display: none; }
body[data-zustand="suchen"] .sucher,
body[data-zustand="suchen"] .hinweis { opacity: 1; }
body[data-zustand="suchen"] .leiste,
body[data-zustand="gefunden"] .leiste { opacity: 1; pointer-events: auto; transform: none; }

/* Blätter (Info, Fehler) */
.blatt { width: min(420px, calc(100% - 32px)); border-radius: var(--radius); padding: 26px 24px 22px; color: var(--text); }
.blatt::backdrop { background: rgba(0,0,0,.45); }
.blatt h2 { margin: 0 0 12px; font-size: 22px; }
.blatt ol { padding-left: 20px; margin: 0 0 14px; }
.blatt li { margin: 6px 0; }
.blatt .klein, .blatt p { color: var(--text-2); font-size: 14px; margin: 8px 0 0; }
.schliessen { position: absolute; right: 12px; top: 12px; width: 38px; height: 38px; background: rgba(255,255,255,.12); }
@media (prefers-reduced-motion: reduce) { .sucher i { animation: none; } }
