:root {
  --gold: #f2c66d;
  --dunkel: rgba(22, 15, 8, 0.82);
  --rand: rgba(242, 198, 109, 0.45);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #dcd4c3; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: #fff;
  -webkit-user-select: none; user-select: none;
  -webkit-tap-highlight-color: transparent;
}
#szene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }

.chip {
  position: fixed; top: calc(10px + env(safe-area-inset-top)); left: 12px;
  background: var(--dunkel); border: 1px solid var(--rand); border-radius: 999px;
  padding: 6px 14px; font-size: 14px; pointer-events: none;
}
#toast { left: 50%; transform: translateX(-50%); top: calc(54px + env(safe-area-inset-top)); color: var(--gold); }

#leiste {
  position: fixed; right: 12px; bottom: calc(14px + env(safe-area-inset-bottom));
  display: flex; gap: 8px;
}
button {
  font: inherit; color: #fff; background: var(--dunkel); border: 1px solid var(--rand);
  border-radius: 12px; padding: 10px 14px; min-width: 48px; min-height: 48px; cursor: pointer;
}
button:active { transform: scale(0.96); }
button.haupt { background: #8a5a1c; border-color: var(--gold); font-weight: 600; }
.nur-tour { display: none; }
body.touring .nur-tour { display: inline-block; }
body.touring .nur-frei { display: none; }

#untertitel {
  position: fixed; left: 12px; right: 12px; bottom: calc(76px + env(safe-area-inset-bottom));
  max-width: 820px; margin: 0 auto; background: var(--dunkel); border: 1px solid var(--rand);
  border-radius: 14px; padding: 12px 16px; pointer-events: none;
}
#untertitel.zu #ut-text { display: none; }
button.aus { opacity: 0.55; text-decoration: line-through; }
#ut-titel { color: var(--gold); font-weight: 700; margin-bottom: 6px; }
#ut-text { font-size: 15px; line-height: 1.45; max-height: 30vh; overflow: hidden; }

#fadenkreuz {
  position: fixed; left: 50%; top: 50%; width: 10px; height: 10px; margin: -5px 0 0 -5px;
  border: 2px solid rgba(255, 255, 255, 0.7); border-radius: 50%; pointer-events: none;
  box-shadow: 0 0 3px rgba(0, 0, 0, 0.6);
}
#fadenkreuz.an { border-color: var(--gold); background: rgba(242, 198, 109, 0.5); }
body.touring #fadenkreuz { display: none; }
#btn-info {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(76px + env(safe-area-inset-bottom));
  max-width: calc(100% - 24px); display: flex; align-items: center; gap: 10px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-color: var(--gold);
}
#btn-info:active { transform: translateX(-50%) scale(0.96); }
#btn-info .i {
  flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--gold); color: #2a1d10;
  font: italic 700 16px Georgia, serif; line-height: 24px; text-align: center;
}
#info-name { overflow: hidden; text-overflow: ellipsis; }
#info {
  position: fixed; inset: 0; background: rgba(10, 6, 2, 0.5); display: flex; align-items: center; justify-content: center;
  padding: calc(10px + env(safe-area-inset-top)) 10px calc(10px + env(safe-area-inset-bottom));
}
.info-karte {
  background: rgba(28, 19, 10, 0.95); border: 1px solid var(--rand); border-radius: 16px;
  width: 100%; max-width: 760px; max-height: 100%; display: flex; flex-direction: column; padding: 14px 16px;
}
.info-kopf { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; }
#info-titel { color: var(--gold); font: 700 21px Georgia, "Times New Roman", serif; }
#info-ref { color: #c9b994; font-size: 13px; margin-top: 2px; }
#info-zu { flex: none; }
#info-tabs { display: flex; gap: 6px; margin: 12px 0 8px; flex-wrap: wrap; }
#info-tabs button { min-height: 38px; padding: 6px 12px; font-size: 14px; border-radius: 999px; }
#info-tabs button.an { background: #8a5a1c; border-color: var(--gold); }
#info-text {
  overflow-y: auto; -webkit-overflow-scrolling: touch; color: #f3ead8; font-size: 16px; line-height: 1.55;
  -webkit-user-select: text; user-select: text; padding-right: 4px;
}
#info-text p { margin: 0 0 12px; }
#info-text .stelle { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-top: 6px; }
#info-text h3 { margin: 0 0 6px; color: var(--gold); font-size: 16px; }
#info-text a.bs { color: #9cc3ff; font-size: 13px; white-space: nowrap; }
#info-quelle { margin-top: 8px; }

#joy {
  position: fixed; width: 120px; height: 120px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.5); background: rgba(0, 0, 0, 0.18); pointer-events: none;
}
#knob {
  position: absolute; left: 35px; top: 35px; width: 50px; height: 50px; border-radius: 50%;
  background: rgba(242, 198, 109, 0.85);
}

#start, #laden {
  position: fixed; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(30, 20, 10, 0.35); padding: 16px;
}
#laden { background: #2a1d10; }
.karte {
  background: var(--dunkel); border: 1px solid var(--rand); border-radius: 18px;
  padding: 24px 22px; max-width: 440px; width: 100%; text-align: center;
}
.karte h1 { margin: 0; color: var(--gold); font-family: Georgia, "Times New Roman", serif; font-size: 34px; }
.unter { margin: 6px 0 18px; color: #e9dfcc; }
button.gross { display: block; width: 100%; margin: 10px 0; font-size: 17px; padding: 14px; }
.hilfe { color: #e9dfcc; font-size: 14px; line-height: 1.45; }
.quelle { color: #b9ab92; font-size: 11px; margin-bottom: 0; }
[hidden] { display: none !important; }

@media (max-width: 520px) {
  #ut-text { font-size: 14px; }
  button { padding: 8px 12px; }
}
