@font-face {
  font-family: "Ease";
  src: url("assets/fonts/EaseDoubleRounded-Regular.woff2") format("woff2"),
       url("assets/fonts/EaseDoubleRounded-Regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Ease";
  src: url("assets/fonts/EaseDoubleRounded-Semibold.woff") format("woff");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #e9e6df;
  --black: #000;
  --white: #fff;
  --font: "Ease", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--paper);
  color: var(--black);
  font-family: var(--font);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Weiße Schrift mit schwarzem Rand, lesbar auf jedem Kartenausschnitt */
.outlined {
  color: var(--white);
  -webkit-text-stroke: var(--stroke, 3px) var(--black);
  paint-order: stroke fill;
}

/* ---------- Bühne ---------- */

#stage, #earth, #interior {
  position: fixed;
  inset: 0;
}

#earth[hidden], #interior[hidden] { display: none; }

/* Zieh-Fläche über der Google-Karte; unten frei für Googles Logo und Quellenangaben */
.drag-pad {
  position: absolute;
  inset: 0 0 40px 0;
  cursor: grab;
  touch-action: none;
}
.drag-pad:active { cursor: grabbing; }

#interior canvas, #interior iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

#veil {
  position: fixed;
  inset: 0;
  background: #1c1a17; /* gleiche Farbe wie der Raum, damit die Überblendung ruhig bleibt */
  opacity: 0;
  pointer-events: none;
  transition: opacity .45s ease;
}
#veil.on { opacity: 1; }

/* Cesium (nur Ersatzmodus ohne Key) */
.cesium-viewer-bottom { left: auto !important; right: 12px; bottom: 8px !important; font-size: 10px; }
.cesium-credit-logoContainer img { height: 16px; }
.cesium-widget-credits { display: flex; align-items: center; gap: 6px; }

/* ---------- Ort ---------- */

#place {
  position: fixed;
  top: 22px;
  left: 28px;
  pointer-events: none;
}
#place p { margin: 0; line-height: 1.05; }
.place-city {
  --stroke: 7px;
  font-size: clamp(32px, 4.4vw, 58px);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.place-address {
  --stroke: 4px;
  margin-top: 6px !important;
  font-size: 17px;
}

/* ---------- Stufen ---------- */

#levels {
  position: fixed;
  right: 28px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

#levels button {
  all: unset;
  cursor: pointer;
  display: grid;
  grid-template-columns: 26px auto auto;
  align-items: baseline;
  gap: 10px;
  padding: 7px 14px 7px 12px;
  background: var(--white);
  color: var(--black);
  font-family: var(--font);
  font-size: 15px;
  transition: color .25s, background .25s;
}
#levels button .num { font-weight: 600; font-size: 12px; font-variant-numeric: tabular-nums; }
#levels button.active { background: var(--black); color: var(--white); }
#levels button:focus-visible { outline: 2px solid var(--black); outline-offset: 2px; }

#levels .sub { display: inline-flex; gap: 4px; margin-left: 4px; align-self: center; }
#levels .sub i {
  width: 6px; height: 6px;
  border: 1px solid currentColor;
  border-radius: 50%;
}
#levels .sub i.on { background: currentColor; }

/* ---------- Hinweise ---------- */

#hint, #status, .interior-note {
  position: fixed;
  margin: 0;
  font-size: 14px;
  --stroke: 3px;
}
#hint { right: 12px; bottom: 9px; text-align: right; font-size: 15px; line-height: 1.25; }
#status { top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 16px; text-align: center; }
.interior-note { right: 12px; bottom: 56px; text-align: right; }

@media (max-width: 640px) {
  #place { top: 16px; left: 16px; }
  #levels { right: 12px; }
  #levels button .label { display: none; }
  #levels button { grid-template-columns: auto; }
  #hint { right: 16px; left: 16px; }
}
