:root {
  color-scheme: dark;
  --bg: #050607;
  --chrome: rgba(200, 196, 188, 0.52);
  --chrome-strong: rgba(220, 216, 208, 0.88);
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: #c8c4bc;
  font-family: var(--sans);
}

.stage {
  position: fixed;
  inset: 0;
  isolation: isolate;
}

.stage canvas {
  display: block;
  width: 100%;
  height: 100%;
  outline: none;
  cursor: crosshair;
  touch-action: none;
}

.fallback {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  padding: 2rem;
  background: var(--bg);
  color: rgba(200, 196, 188, 0.65);
  font: 0.72rem/1.5 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
}

.fallback[hidden] {
  display: none;
}

.chrome {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.label,
.strand,
.work-meta,
.telemetry,
.hint {
  position: absolute;
  font-family: var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.label {
  top: 1.15rem;
  left: 1.25rem;
  font-size: 0.68rem;
  color: rgba(200, 196, 188, 0.42);
}

.label b {
  color: var(--chrome-strong);
  font-weight: 500;
}

.strand {
  top: 1.15rem;
  right: 1.25rem;
  font-size: 0.68rem;
  color: var(--chrome);
  text-align: right;
}

.work-meta {
  top: 2.55rem;
  right: 1.25rem;
  max-width: min(42vw, 18rem);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: none;
  color: var(--chrome-strong);
  text-align: right;
  line-height: 1.35;
}

.telemetry {
  bottom: 1.15rem;
  left: 1.25rem;
  font-size: 0.62rem;
  color: rgba(180, 190, 188, 0.4);
}

.hint {
  bottom: 1.15rem;
  right: 1.25rem;
  font-size: 0.62rem;
  line-height: 1.5;
  color: rgba(200, 196, 188, 0.38);
  text-align: right;
}

.open-layer {
  position: fixed;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  background: #050607;
  padding: clamp(1.5rem, 6vw, 4rem);
}

.open-layer[hidden] {
  display: none;
}

.open-layer img {
  max-width: min(92vw, 1100px);
  max-height: min(72vh, 620px);
  width: auto;
  height: auto;
  object-fit: contain;
  /* §4b: clean — kein Overlay, kein Filter */
}

.open-meta {
  position: absolute;
  left: 1.5rem;
  bottom: 1.5rem;
  max-width: min(70vw, 28rem);
}

.open-meta span {
  display: block;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(200, 196, 188, 0.45);
  margin-bottom: 0.45rem;
}

.open-meta h1 {
  font-family: var(--sans);
  font-size: clamp(1.1rem, 2.4vw, 1.65rem);
  font-weight: 500;
  letter-spacing: 0.02em;
  color: rgba(232, 228, 220, 0.92);
}

.open-meta p {
  margin-top: 0.35rem;
  font-size: 0.78rem;
  color: rgba(200, 196, 188, 0.5);
}

.open-hint {
  position: absolute;
  right: 1.5rem;
  bottom: 1.5rem;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(200, 196, 188, 0.35);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body.is-open .chrome {
  opacity: 0;
}

body.is-traveling .hint {
  opacity: 0.35;
}

@media (max-width: 760px) {
  .label,
  .strand,
  .telemetry,
  .hint {
    font-size: 0.58rem;
  }

  .work-meta {
    top: 2.35rem;
    font-size: 0.64rem;
    max-width: 58vw;
  }

  .hint {
    max-width: 48vw;
  }
}

@media (prefers-reduced-motion: reduce) {
  .open-layer img {
    transition: none;
  }
}
