/* signum3 boardwalk — lokal, kein CDN */

@font-face {
  font-family: "BodoniModa";
  src: url("../fonts/bodoni/BodoniModaVariable.ttf") format("truetype");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "SpaceGrotesk";
  src: url("../fonts/space/SpaceGroteskVariable.ttf") format("truetype");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Montagu";
  src: url("../fonts/montagu/MontaguVariable.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "MonoLisa";
  src: url("../fonts/monolisa/MonoLisaVariableNormal.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #1a1b1e;
  --paper: #ece8e1;
  --mute: #6b6f78;
  --line: rgba(26, 27, 30, 0.14);
  --accent: #c45c26;
  --hud: rgba(243, 239, 232, 0.92);
}

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

html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  font-family: "SpaceGrotesk", system-ui, sans-serif;
  background: #121316;
  color: var(--ink);
  -webkit-user-select: none;
  user-select: none;
}

#viewport {
  position: fixed;
  inset: 0;
}

#viewport canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.hud {
  position: fixed;
  z-index: 10;
  left: 0;
  right: 0;
  top: 0;
  padding: 0.85rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  align-items: stretch;
  pointer-events: none;
  color: #1a1b1e;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.65),
    0 0 12px rgba(236, 232, 225, 0.85);
}

/* Logo + Theme oben */
.hud__top {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.hud__top-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin-left: auto;
  pointer-events: auto;
}

.hud__home {
  font-family: "MonoLisa", ui-monospace, monospace;
  font-size: 0.62rem;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: lowercase;
  text-decoration: none;
  color: #1a1b1e;
  padding: 0.35rem 0.55rem;
  border-radius: 0.25rem;
  border: 1px solid rgba(26, 27, 30, 0.22);
  background: rgba(243, 239, 232, 0.72);
  opacity: 0.9;
  transition: opacity 0.15s ease, background 0.15s ease;
}

.hud__home:hover {
  opacity: 1;
  background: rgba(243, 239, 232, 0.95);
}

.hud__home:focus-visible {
  outline: 2px solid rgba(20, 184, 166, 0.7);
  outline-offset: 2px;
}

/* Logo ohne Hintergrund */
.hud__brand {
  display: flex;
  align-items: center;
  padding: 0;
  background: none;
  border: none;
  line-height: 0;
  filter: drop-shadow(0 1px 2px rgba(255, 255, 255, 0.55));
}

.hud__logo {
  display: block;
  width: 4.6rem;
  height: auto;
  fill: #1a1b1e;
}

/* Dark-Mode als On/Off-Schalter */
.hud__theme {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  border: none;
  background: transparent;
  color: #1a1b1e;
  padding: 0.2rem 0;
  border-radius: 0;
  cursor: pointer;
  pointer-events: auto;
  font-family: "MonoLisa", ui-monospace, monospace;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: lowercase;
  text-shadow: none;
}

.hud__theme-label {
  font-weight: 650;
  opacity: 0.7;
}

.hud__theme-state {
  font-weight: 700;
  min-width: 2.2ch;
  opacity: 0.85;
}

.hud__theme-track {
  position: relative;
  width: 2.4rem;
  height: 1.25rem;
  border-radius: 999px;
  background: rgba(26, 27, 30, 0.22);
  border: 1px solid rgba(26, 27, 30, 0.28);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.12);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.hud__theme-knob {
  position: absolute;
  top: 0.12rem;
  left: 0.12rem;
  width: 0.92rem;
  height: 0.92rem;
  border-radius: 50%;
  background: #f3efe8;
  border: 1px solid rgba(26, 27, 30, 0.2);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease, background 0.2s ease;
}

.hud__theme[aria-checked="true"] .hud__theme-track {
  background: rgba(20, 184, 166, 0.55);
  border-color: rgba(15, 118, 110, 0.55);
}

.hud__theme[aria-checked="true"] .hud__theme-knob {
  transform: translateX(1.05rem);
  background: #fff;
}

.hud__theme:hover .hud__theme-track {
  border-color: rgba(26, 27, 30, 0.5);
}

.hud__theme:focus-visible {
  outline: 2px solid rgba(20, 184, 166, 0.7);
  outline-offset: 3px;
}

.hud__hint {
  font-family: system-ui, sans-serif;
  font-size: 0.78rem;
  font-weight: 550;
  opacity: 0.95;
  padding: 0.25rem 0.55rem;
  border-radius: 0.2rem;
  background: rgba(243, 239, 232, 0.72);
  max-width: min(42rem, 70vw);
  align-self: flex-start;
}

/* Annäherung: Info links + Radar rechts */
.hud__near {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  width: 100%;
  max-width: min(42rem, 100%);
  font-family: "MonoLisa", ui-monospace, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  font-weight: 500;
  padding: 0.4rem 0.55rem 0.4rem 0.75rem;
  border-radius: 0.15rem;
  color: #0c1a1e;
  background:
    linear-gradient(90deg, rgba(20, 184, 166, 0.18), rgba(243, 239, 232, 0.82) 28%),
    rgba(243, 239, 232, 0.88);
  border: 1px solid rgba(15, 118, 110, 0.35);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.35),
    0 0 18px rgba(20, 184, 166, 0.12);
  text-shadow: none;
}

.hud__near-info {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.3rem 0.5rem;
  min-width: 0;
  flex: 1;
}

.hud__near-radar {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  width: 3.6rem;
  height: 3.6rem;
  border-radius: 50%;
  border: 1px solid rgba(15, 118, 110, 0.4);
  background:
    radial-gradient(circle at center, rgba(20, 184, 166, 0.12) 0%, transparent 62%),
    rgba(255, 255, 255, 0.35);
  box-shadow: inset 0 0 0 1px rgba(15, 118, 110, 0.12);
  overflow: hidden;
}

.hud__near-radar canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.hud__near::before,
.hud__near::after {
  content: "";
  position: absolute;
  width: 0.55rem;
  height: 0.55rem;
  border-color: #0f766e;
  border-style: solid;
  pointer-events: none;
}

.hud__near::before {
  top: 0.2rem;
  left: 0.2rem;
  border-width: 1.5px 0 0 1.5px;
}

.hud__near::after {
  top: 0.2rem;
  right: 0.2rem;
  border-width: 1.5px 1.5px 0 0;
}

.hud__near-scan {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(15, 118, 110, 0.05) 2px,
    rgba(15, 118, 110, 0.05) 3px
  );
  opacity: 0.7;
  animation: near-scan 3.2s linear infinite;
}

@keyframes near-scan {
  from { transform: translateY(-8%); }
  to { transform: translateY(8%); }
}

.hud__near-tag {
  position: relative;
  z-index: 1;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #0f766e;
  padding: 0.12rem 0.35rem;
  border: 1px solid rgba(15, 118, 110, 0.45);
  background: rgba(20, 184, 166, 0.12);
}

.hud__near-range,
.hud__near-sep,
.hud__near-target,
.hud__near-status {
  position: relative;
  z-index: 1;
}

.hud__near-range {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #134e4a;
  min-width: 4.5ch;
}

.hud__near-sep {
  opacity: 0.35;
}

.hud__near-target {
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  color: #1a1b1e;
}

.hud__near-status {
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #0f766e;
  opacity: 0.9;
  width: 100%;
}

.hud__near.is-lock .hud__near-status {
  color: #b45309;
  animation: near-pulse 0.9s ease-in-out infinite;
}

@keyframes near-pulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

.hud__score {
  position: fixed;
  left: 1.1rem;
  bottom: max(1.25rem, env(safe-area-inset-bottom));
  top: auto;
  right: auto;
  z-index: 12;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  gap: 0.15rem 0.65rem;
  align-items: baseline;
  pointer-events: none;
  font-family: "SpaceGrotesk", system-ui, sans-serif;
  min-width: 7.5rem;
  padding: 0.55rem 0.85rem 0.5rem;
  border-radius: 1rem;
  color: #0f172a;
  background:
    linear-gradient(145deg, #fde68a 0%, #fbbf24 42%, #14b8a6 100%);
  box-shadow:
    0 0 0 3px rgba(15, 23, 42, 0.12),
    0 10px 28px rgba(15, 23, 42, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.hud__score-label {
  grid-column: 1 / -1;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.7;
  color: #134e4a;
}

.hud__score-value {
  font-family: "MonoLisa", ui-monospace, monospace;
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  min-width: 2.5ch;
  line-height: 1;
  text-align: left;
  color: #0f172a;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform 0.2s ease, color 0.2s ease;
}

.hud__score-value.is-plus {
  color: #065f46;
  transform: scale(1.12);
  text-shadow: 0 0 16px rgba(16, 185, 129, 0.55);
}

.hud__score-value.is-minus {
  color: #9a3412;
  transform: scale(1.12);
  text-shadow: 0 0 16px rgba(249, 115, 22, 0.55);
}

.hud__score-flash {
  font-family: "MonoLisa", ui-monospace, monospace;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  justify-self: end;
  align-self: end;
  opacity: 0.95;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.12);
}

.hud__font {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  pointer-events: auto;
  font-family: "SpaceGrotesk", system-ui, sans-serif;
  font-size: 0.72rem;
  padding: 0.3rem 0.45rem;
  border-radius: 0.35rem;
  background: rgba(243, 239, 232, 0.72);
  color: #1a1b1e;
}

.hud__font span {
  opacity: 0.7;
  margin-right: 0.25rem;
  font-weight: 600;
}

.hud__font button {
  appearance: none;
  border: 1px solid rgba(26, 27, 30, 0.28);
  background: rgba(255, 255, 255, 0.55);
  color: #1a1b1e;
  padding: 0.3rem 0.55rem;
  border-radius: 2px;
  cursor: pointer;
  font: inherit;
}

.hud__font button.is-active {
  background: #1a1b1e;
  color: #f3efe8;
  border-color: transparent;
  font-weight: 650;
}

.hud__font button:hover {
  border-color: rgba(26, 27, 30, 0.55);
}

.gate {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  background:
    radial-gradient(800px 400px at 30% 20%, rgba(196, 92, 38, 0.18), transparent 60%),
    linear-gradient(165deg, #1c1e22, #0e0f11);
  color: var(--paper);
}

.gate[hidden] {
  display: none !important;
}

.gate__panel {
  width: min(92vw, 28rem);
  padding: 2rem;
}

.gate__eyebrow {
  margin: 0 0 0.75rem;
  font-family: system-ui, sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.6;
}

.gate h1 {
  margin: 0;
  font-family: "BodoniModa", Georgia, serif;
  font-weight: 500;
  font-size: clamp(3rem, 12vw, 4.5rem);
  line-height: 0.9;
  letter-spacing: -0.03em;
}

.gate__lead {
  margin: 1.25rem 0 1.75rem;
  font-family: system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.45;
  opacity: 0.8;
  max-width: 28ch;
}

.gate__btn {
  appearance: none;
  border: none;
  background: var(--paper);
  color: var(--ink);
  font-family: system-ui, sans-serif;
  font-weight: 650;
  font-size: 0.95rem;
  padding: 0.85rem 1.35rem;
  border-radius: 2px;
  cursor: pointer;
  margin-top: 2rem;
}

.gate__btn:hover {
  opacity: 0.9;
}

.gate__keys {
  margin: 1.25rem 0 0;
  font-family: system-ui, sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  opacity: 0.5;
}

.pop,
.bento-pop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: clamp(0.75rem, 2vw, 1.75rem);
  background:
    radial-gradient(ellipse at 50% 40%, rgba(40, 120, 140, 0.12), transparent 55%),
    rgba(8, 10, 14, 0.62);
  backdrop-filter: blur(14px);
}

.pop[hidden],
.bento-pop[hidden] {
  display: none !important;
}

.bento-pop__tile {
  --pop-font: "SpaceGrotesk", system-ui, sans-serif;
  --pop-display: "BodoniModa", Georgia, serif;
  --pop-glow: rgba(90, 210, 230, 0.35);
  position: relative;
  width: min(94vw, 68rem);
  max-height: min(94vh, 52rem);
  overflow: auto;
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.97), rgba(236, 240, 244, 0.94));
  color: var(--ink);
  border-radius: 0.35rem;
  padding: clamp(1.75rem, 3.5vw, 3.25rem) clamp(1.5rem, 3.2vw, 3rem) 1.5rem;
  box-shadow:
    0 0 0 1px rgba(90, 210, 230, 0.28),
    0 0 40px rgba(90, 210, 230, 0.08),
    0 28px 80px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(26, 27, 30, 0.08);
  font-family: var(--pop-font);
  animation: bento-boot 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.bento-pop__tile.is-dark,
.bento-pop__tile.is-gallery,
.bento-pop__tile.is-story,
.bento-pop__tile.is-contact,
.bento-pop__tile.is-tool {
  background:
    linear-gradient(165deg, rgba(22, 24, 28, 0.96), rgba(12, 14, 18, 0.94));
  color: #ece8e1;
  --pop-glow: rgba(90, 210, 230, 0.45);
  box-shadow:
    0 0 0 1px rgba(90, 210, 230, 0.35),
    0 0 48px rgba(90, 210, 230, 0.1),
    0 28px 80px rgba(0, 0, 0, 0.5);
}

.bento-pop__tile.is-accent {
  background:
    linear-gradient(165deg, rgba(196, 92, 38, 0.95), rgba(150, 60, 20, 0.92));
  color: #fff6ea;
  --pop-glow: rgba(255, 200, 140, 0.4);
}

.bento-pop__scan {
  pointer-events: none;
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(0, 0, 0, 0.03) 2px,
      rgba(0, 0, 0, 0.03) 4px
    );
  mix-blend-mode: multiply;
  opacity: 0.55;
  z-index: 1;
}

.bento-pop__tile.is-dark .bento-pop__scan,
.bento-pop__tile.is-gallery .bento-pop__scan,
.bento-pop__tile.is-story .bento-pop__scan,
.bento-pop__tile.is-contact .bento-pop__scan,
.bento-pop__tile.is-tool .bento-pop__scan {
  mix-blend-mode: screen;
  background:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(90, 210, 230, 0.04) 2px,
      rgba(90, 210, 230, 0.04) 4px
    );
  opacity: 0.7;
}

.bento-pop__scan::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 28%;
  background: linear-gradient(
    180deg,
    transparent,
    rgba(90, 210, 230, 0.08),
    transparent
  );
  animation: pop-scan 3.8s linear infinite;
}

.bento-pop__corners {
  pointer-events: none;
  position: absolute;
  inset: 0.65rem;
  z-index: 2;
}

.bento-pop__corners span {
  position: absolute;
  width: 1rem;
  height: 1rem;
  border-color: var(--pop-glow);
  border-style: solid;
  border-width: 0;
  opacity: 0.85;
}

.bento-pop__corners span:nth-child(1) {
  top: 0;
  left: 0;
  border-top-width: 2px;
  border-left-width: 2px;
}

.bento-pop__corners span:nth-child(2) {
  top: 0;
  right: 0;
  border-top-width: 2px;
  border-right-width: 2px;
}

.bento-pop__corners span:nth-child(3) {
  bottom: 0;
  left: 0;
  border-bottom-width: 2px;
  border-left-width: 2px;
}

.bento-pop__corners span:nth-child(4) {
  bottom: 0;
  right: 0;
  border-bottom-width: 2px;
  border-right-width: 2px;
}

.bento-pop__layout {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: clamp(1.1rem, 2.8vh, 2rem);
  min-height: min(72vh, 38rem);
}

.bento-pop__font {
  position: absolute;
  top: 0.85rem;
  left: 1rem;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.bento-pop__font button {
  appearance: none;
  border: 1px solid rgba(26, 27, 30, 0.2);
  background: rgba(255, 255, 255, 0.55);
  color: inherit;
  font-family: "MonoLisa", ui-monospace, monospace;
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.28rem 0.45rem;
  border-radius: 2px;
  cursor: pointer;
}

.bento-pop__tile.is-dark .bento-pop__font button,
.bento-pop__tile.is-gallery .bento-pop__font button,
.bento-pop__tile.is-story .bento-pop__font button,
.bento-pop__tile.is-contact .bento-pop__font button,
.bento-pop__tile.is-tool .bento-pop__font button,
.bento-pop__tile.is-accent .bento-pop__font button {
  border-color: rgba(236, 232, 225, 0.28);
  background: rgba(0, 0, 0, 0.28);
}

.bento-pop__font button.is-active {
  border-color: transparent;
  background: rgba(90, 210, 230, 0.85);
  color: #0c0e12;
}

.bento-pop__close {
  position: absolute;
  top: 0.7rem;
  right: 0.9rem;
  z-index: 4;
  border: 1px solid rgba(26, 27, 30, 0.18);
  background: rgba(255, 255, 255, 0.4);
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 2px;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  color: inherit;
  opacity: 0.7;
}

.bento-pop__tile.is-dark .bento-pop__close,
.bento-pop__tile.is-gallery .bento-pop__close,
.bento-pop__tile.is-story .bento-pop__close,
.bento-pop__tile.is-contact .bento-pop__close,
.bento-pop__tile.is-tool .bento-pop__close,
.bento-pop__tile.is-accent .bento-pop__close {
  border-color: rgba(236, 232, 225, 0.25);
  background: rgba(0, 0, 0, 0.25);
}

.bento-pop__close:hover {
  opacity: 1;
}

.bento-pop__head {
  display: grid;
  grid-template-columns: minmax(6rem, 0.34fr) minmax(0, 1fr);
  gap: clamp(0.85rem, 2.2vw, 2rem);
  align-items: end;
  padding-top: 1.5rem;
}

.bento-pop__abbr {
  margin: 0;
  font-family: var(--pop-font);
  font-weight: 300;
  font-size: clamp(4.2rem, 15vw, 9.5rem);
  letter-spacing: -0.05em;
  line-height: 0.8;
  opacity: 0.42;
  text-shadow: 0 0 24px var(--pop-glow);
}

.bento-pop__tile.is-dark .bento-pop__abbr,
.bento-pop__tile.is-gallery .bento-pop__abbr,
.bento-pop__tile.is-story .bento-pop__abbr,
.bento-pop__tile.is-contact .bento-pop__abbr,
.bento-pop__tile.is-tool .bento-pop__abbr,
.bento-pop__tile.is-accent .bento-pop__abbr {
  opacity: 0.9;
}

.bento-pop__titles {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  justify-content: flex-end;
  min-height: 100%;
}

.bento-pop__meta {
  margin: 0;
  font-family: "MonoLisa", ui-monospace, monospace;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.45;
}

.bento-pop__tile h2 {
  margin: 0;
  font-family: var(--pop-display);
  font-weight: 500;
  font-size: clamp(1.7rem, 4.2vw, 2.85rem);
  letter-spacing: -0.03em;
  line-height: 1.08;
  max-width: 18ch;
}

.bento-pop__lead {
  margin: 0;
  font-family: var(--pop-font);
  font-size: clamp(0.98rem, 1.7vw, 1.2rem);
  line-height: 1.55;
  opacity: 0.72;
  max-width: 42rem;
}

.bento-pop__tile.is-quote .bento-pop__lead {
  font-family: var(--pop-display);
  font-size: clamp(1.25rem, 3vw, 2rem);
  line-height: 1.35;
  font-weight: 500;
  opacity: 0.92;
  max-width: 36rem;
}

.bento-pop__tile.is-story .bento-pop__lead {
  font-size: clamp(1.05rem, 2.1vw, 1.35rem);
  line-height: 1.6;
  max-width: none;
  columns: 1;
}

/* Büro / Story: kompakter Kopf, Bild + Text nebeneinander */
.bento-pop__tile.is-story {
  width: min(96vw, 74rem);
  max-height: min(96vh, 56rem);
  padding: clamp(1.35rem, 2.5vw, 2.25rem) clamp(1.15rem, 2.5vw, 2.25rem) 1.1rem;
}

.bento-pop__tile.is-story .bento-pop__layout {
  min-height: min(84vh, 48rem);
  gap: 0.85rem;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.bento-pop__tile.is-story .bento-pop__head {
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 1rem;
  padding-top: 1.35rem;
}

.bento-pop__tile.is-story .bento-pop__abbr {
  font-size: clamp(1.5rem, 4vw, 2.4rem);
  line-height: 1;
  opacity: 0.55;
  text-shadow: none;
}

.bento-pop__tile.is-story .bento-pop__titles {
  min-height: 0;
  gap: 0.2rem;
}

.bento-pop__tile.is-story .bento-pop__titles .bento-pop__lead {
  display: none;
}

.bento-pop__tile.is-story h2 {
  font-size: clamp(1.35rem, 2.8vw, 2rem);
  max-width: none;
}

.bento-pop__tile.is-story .bento-pop__main {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(1rem, 2.5vw, 1.75rem);
  align-items: stretch;
  flex: 1;
  min-height: 0;
  justify-content: stretch;
}

.bento-pop__tile.is-story .bento-pop__gallery {
  min-height: 0;
}

.bento-pop__tile.is-story .bento-pop__stage {
  min-height: min(42vh, 22rem);
}

.bento-pop__tile.is-story .bento-pop__gallery .bento-pop__media {
  min-height: min(42vh, 22rem);
  max-height: min(58vh, 30rem);
}

.bento-pop__tile.is-story .bento-pop__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
  font-size: clamp(1rem, 1.55vw, 1.18rem);
  line-height: 1.6;
}

.bento-pop__tile.is-story .bento-pop__story-lead {
  margin: 0;
  opacity: 0.85;
}

.bento-pop__tile.is-tool .bento-pop__body ul {
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
}

@media (max-width: 860px) {
  .bento-pop__tile.is-story .bento-pop__main {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 900px) {
  .bento-pop__tile.is-story .bento-pop__head {
    grid-template-columns: auto 1fr;
  }
}

.bento-pop__main {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
  min-height: 0;
  justify-content: center;
}

/* Gallery: Bildfläche dominiert, Caption darunter */
.bento-pop__tile.is-gallery {
  width: min(96vw, 74rem);
  max-height: min(96vh, 56rem);
  padding: clamp(1.35rem, 2.5vw, 2.25rem) clamp(1.15rem, 2.5vw, 2.25rem) 1.1rem;
}

.bento-pop__tile.is-gallery .bento-pop__layout {
  min-height: min(84vh, 48rem);
  gap: 0.75rem;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.bento-pop__tile.is-gallery .bento-pop__head {
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 1rem;
  padding-top: 1.35rem;
}

.bento-pop__tile.is-gallery .bento-pop__abbr {
  font-size: clamp(1.35rem, 3.5vw, 2.1rem);
  line-height: 1;
  opacity: 0.5;
  letter-spacing: 0.02em;
  text-shadow: none;
}

.bento-pop__tile.is-gallery .bento-pop__titles {
  min-height: 0;
  gap: 0.2rem;
}

.bento-pop__tile.is-gallery h2 {
  font-size: clamp(1.25rem, 2.5vw, 1.85rem);
  max-width: none;
}

.bento-pop__tile.is-gallery .bento-pop__main {
  flex: 1;
  min-height: 0;
  justify-content: stretch;
}

.bento-pop__media {
  margin: 0;
  border-radius: 0.25rem;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: rgba(0, 0, 0, 0.2);
  flex: 1;
  min-height: 12rem;
  box-shadow: 0 0 0 1px rgba(90, 210, 230, 0.2);
}

.bento-pop__gallery {
  margin: 0;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  gap: 0.85rem;
}

.bento-pop__gallery[hidden] {
  display: none !important;
}

.bento-pop__stage {
  position: relative;
  flex: 1 1 auto;
  min-height: min(58vh, 32rem);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.65rem;
}

.bento-pop__gallery .bento-pop__media {
  grid-column: 2;
  aspect-ratio: auto;
  width: 100%;
  height: 100%;
  min-height: min(58vh, 32rem);
  max-height: min(68vh, 38rem);
  background: #08090b;
  display: grid;
  place-items: center;
}

.bento-pop__nav {
  appearance: none;
  border: 1px solid rgba(90, 210, 230, 0.45);
  background: rgba(90, 210, 230, 0.08);
  color: inherit;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 2px;
  font-size: 1.55rem;
  line-height: 1;
  cursor: pointer;
  align-self: center;
  flex-shrink: 0;
}

.bento-pop__nav:hover {
  background: rgba(90, 210, 230, 0.22);
}

.bento-pop__caption {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem 1.25rem;
  align-items: baseline;
  padding: 0.15rem 0.15rem 0;
  border-top: 1px solid rgba(90, 210, 230, 0.18);
  padding-top: 0.75rem;
}

.bento-pop__ref-title {
  margin: 0;
  font-family: var(--pop-display);
  font-size: clamp(1.05rem, 2.2vw, 1.45rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.bento-pop__ref-count {
  margin: 0;
  font-family: "MonoLisa", ui-monospace, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.55;
  white-space: nowrap;
}

.bento-pop__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  animation: pop-img-in 0.55s ease both;
}

.bento-pop__tile.is-quote .bento-pop__abbr {
  font-size: clamp(5.5rem, 18vw, 11rem);
  opacity: 0.55;
  line-height: 0.75;
}

.bento-pop__body {
  margin-top: 0;
  font-family: var(--pop-font);
  font-size: clamp(1rem, 1.55vw, 1.15rem);
  line-height: 1.55;
}

.bento-pop__body ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.35rem 1.75rem;
}

.bento-pop__tile.is-contact .bento-pop__body ul {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 720px) {
  .bento-pop__body ul,
  .bento-pop__tile.is-contact .bento-pop__body ul {
    grid-template-columns: 1fr;
  }
}

.bento-pop__body li {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  padding: 0.75rem 0;
  border-top: 1px solid rgba(26, 27, 30, 0.12);
  animation: pop-line 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.bento-pop__tile.is-dark .bento-pop__body li,
.bento-pop__tile.is-gallery .bento-pop__body li,
.bento-pop__tile.is-story .bento-pop__body li,
.bento-pop__tile.is-contact .bento-pop__body li,
.bento-pop__tile.is-tool .bento-pop__body li,
.bento-pop__tile.is-accent .bento-pop__body li {
  border-top-color: rgba(236, 232, 225, 0.14);
}

.bento-pop__body li:nth-child(1) { animation-delay: 0.12s; }
.bento-pop__body li:nth-child(2) { animation-delay: 0.2s; }
.bento-pop__body li:nth-child(3) { animation-delay: 0.28s; }
.bento-pop__body li:nth-child(4) { animation-delay: 0.36s; }
.bento-pop__body li:nth-child(5) { animation-delay: 0.44s; }
.bento-pop__body li:nth-child(6) { animation-delay: 0.52s; }

.bento-pop__body li::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  margin-top: 0.5rem;
  background: currentColor;
  opacity: 0.4;
  flex-shrink: 0;
  box-shadow: 0 0 8px var(--pop-glow);
}

.bento-pop__body a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.bento-pop__link {
  margin: 1.25rem 0 0;
  font-family: "MonoLisa", ui-monospace, monospace;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.bento-pop__hint {
  margin: 0;
  font-family: "MonoLisa", ui-monospace, monospace;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.4;
  border-top: 1px solid rgba(26, 27, 30, 0.1);
  padding-top: 0.85rem;
}

.bento-pop__tile.is-dark .bento-pop__hint,
.bento-pop__tile.is-gallery .bento-pop__hint,
.bento-pop__tile.is-story .bento-pop__hint,
.bento-pop__tile.is-contact .bento-pop__hint,
.bento-pop__tile.is-tool .bento-pop__hint,
.bento-pop__tile.is-accent .bento-pop__hint {
  border-top-color: rgba(236, 232, 225, 0.12);
}

/* gestaffeltes Einblenden */
.pop-reveal {
  opacity: 0;
  transform: translateY(0.85rem);
  filter: blur(4px);
}

.bento-pop__tile.is-open .pop-reveal {
  animation: pop-reveal 0.65s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.bento-pop__tile.is-open .pop-reveal[data-reveal="1"] { animation-delay: 0.05s; }
.bento-pop__tile.is-open .pop-reveal[data-reveal="2"] { animation-delay: 0.18s; }
.bento-pop__tile.is-open .pop-reveal[data-reveal="3"] { animation-delay: 0.32s; }

@keyframes bento-boot {
  from {
    opacity: 0;
    transform: translateY(1.1rem) scale(0.985);
    clip-path: inset(8% 4% 8% 4%);
  }
  to {
    opacity: 1;
    transform: none;
    clip-path: inset(0 0 0 0);
  }
}

@keyframes pop-reveal {
  to {
    opacity: 1;
    transform: none;
    filter: none;
  }
}

@keyframes pop-line {
  from {
    opacity: 0;
    transform: translateX(-0.6rem);
    filter: blur(2px);
  }
  to {
    opacity: 1;
    transform: none;
    filter: none;
  }
}

@keyframes pop-scan {
  from { top: -30%; }
  to { top: 110%; }
}

@keyframes pop-img-in {
  from {
    opacity: 0;
    transform: scale(1.04);
    filter: brightness(1.3) contrast(0.85);
  }
  to {
    opacity: 1;
    transform: none;
    filter: none;
  }
}

@media (max-width: 720px) {
  .bento-pop__head {
    grid-template-columns: 1fr;
    gap: 0.35rem;
    align-items: start;
    padding-top: 0.35rem;
    padding-right: 2.6rem; /* Platz für × */
  }

  .bento-pop__abbr {
    font-size: clamp(2.4rem, 14vw, 3.6rem);
    line-height: 0.85;
    opacity: 0.55;
    letter-spacing: -0.04em;
  }

  .bento-pop__titles {
    gap: 0.35rem;
    min-height: 0;
    justify-content: flex-start;
  }

  .bento-pop__titles h2 {
    font-size: clamp(1.35rem, 6.5vw, 1.85rem);
    line-height: 1.15;
  }

  .bento-pop__meta {
    font-size: 0.68rem;
  }

  .bento-pop__lead {
    font-size: 0.88rem;
    line-height: 1.35;
  }

  .bento-pop__tile.is-tool .bento-pop__head {
    grid-template-columns: auto 1fr;
    align-items: center;
    padding-top: 0.5rem;
  }

  .bento-pop__tile.is-tool .bento-pop__abbr {
    font-size: 1rem;
  }

  /* mobil: keine Esc / T / wischen-Hinweise — Font-Leiste bleibt */
  .bento-pop__hint,
  .bento-pop__font,
  .hud__hint,
  .gate__keys {
    display: none !important;
  }

  .bento-pop__layout {
    min-height: 0;
  }

  .bento-pop__font {
    max-width: calc(100% - 3.5rem);
  }

  .bento-pop__stage {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr auto;
    gap: 0.55rem;
  }

  .bento-pop__gallery .bento-pop__media {
    grid-column: 1;
    min-height: min(42vh, 20rem);
    max-height: min(48vh, 24rem);
  }

  .bento-pop__nav--prev,
  .bento-pop__nav--next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
  }

  .bento-pop__nav--prev { left: 0.4rem; }
  .bento-pop__nav--next { right: 0.4rem; }

  .bento-pop__caption {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hud__near-scan,
  .hud__near.is-lock .hud__near-status {
    animation: none !important;
  }

  .bento-pop__tile,
  .pop-reveal,
  .bento-pop__body li,
  .bento-pop__media img,
  .bento-pop__scan::after {
    animation: none !important;
  }

  .pop-reveal {
    opacity: 1;
    transform: none;
    filter: none;
  }

  * {
    scroll-behavior: auto !important;
  }
}

/* ——— Teams-Buchung im Popup ——— */
.bento-pop,
.bento-pop input,
.bento-pop textarea,
.bento-pop label,
.bento-pop button {
  -webkit-user-select: text;
  user-select: text;
}

.bento-pop__icon {
  display: block;
  width: clamp(3.5rem, 10vw, 5.5rem);
  height: clamp(3.5rem, 10vw, 5.5rem);
  opacity: 0.9;
}

.bento-pop__tile.is-tool {
  width: min(96vw, 42rem);
  max-height: min(94vh, 52rem);
}

.bento-pop__tile.is-tool .bento-pop__layout {
  min-height: 0;
}

.bento-pop__tile.is-tool .bento-pop__head {
  grid-template-columns: auto 1fr;
  align-items: center;
  padding-top: 1.35rem;
}

.bento-pop__tile.is-tool .bento-pop__abbr {
  font-size: 1rem;
  opacity: 1;
  line-height: 1;
  text-shadow: none;
}

.bento-pop__tile.is-tool .bento-pop__main {
  justify-content: flex-start;
}

.bw-book {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  font-family: "SpaceGrotesk", system-ui, sans-serif;
}

.bw-book__intro {
  margin: 0;
  font-size: 0.95rem;
  opacity: 0.7;
  line-height: 1.45;
}

.bw-book__cal-wrap {
  border: 1px solid rgba(90, 210, 230, 0.28);
  border-radius: 0.5rem;
  padding: 0.75rem;
  background: rgba(0, 0, 0, 0.22);
}

.bw-book__loading {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.65;
  padding: 1rem 0.25rem;
}

.bw-book__cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.bw-book__cal-header button {
  appearance: none;
  width: 2.1rem;
  height: 2.1rem;
  border: 1px solid rgba(90, 210, 230, 0.4);
  background: rgba(90, 210, 230, 0.1);
  color: inherit;
  border-radius: 2px;
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
}

.bw-book__cal-header button:disabled {
  opacity: 0.3;
  cursor: default;
}

.bw-book__weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.25rem;
  margin-bottom: 0.35rem;
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.45;
  text-align: center;
}

.bw-book__weekdays .is-weekend {
  opacity: 0.35;
}

.bw-book__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.3rem;
}

.bw-book__day {
  appearance: none;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.04);
  color: inherit;
  aspect-ratio: 1;
  border-radius: 0.35rem;
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
}

.bw-book__day.is-empty {
  visibility: hidden;
  pointer-events: none;
}

.bw-book__day.is-weekend,
.bw-book__day.is-holiday,
.bw-book__day.is-no-slots {
  opacity: 0.28;
  cursor: default;
}

.bw-book__day.has-slots {
  border-color: rgba(90, 210, 230, 0.45);
  background: rgba(90, 210, 230, 0.12);
}

.bw-book__day.has-slots:hover {
  background: rgba(90, 210, 230, 0.25);
}

.bw-book__day.is-selected {
  background: rgba(90, 210, 230, 0.85);
  color: #0c0e12;
  border-color: transparent;
  font-weight: 700;
}

.bw-book__times {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.75rem;
}

.bw-book__time {
  appearance: none;
  border: 1px solid rgba(90, 210, 230, 0.35);
  background: rgba(0, 0, 0, 0.2);
  color: inherit;
  padding: 0.4rem 0.65rem;
  border-radius: 2px;
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
}

.bw-book__time.is-selected {
  background: rgba(90, 210, 230, 0.85);
  color: #0c0e12;
  border-color: transparent;
  font-weight: 650;
}

.bw-book__selected {
  margin: 0.5rem 0 0;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  opacity: 0.65;
}

.bw-book__fields {
  display: grid;
  gap: 0.65rem;
}

.bw-book__fields label {
  display: grid;
  gap: 0.3rem;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.85;
}

.bw-book__fields input {
  appearance: none;
  border: 1px solid rgba(236, 232, 225, 0.22);
  background: rgba(0, 0, 0, 0.28);
  color: inherit;
  padding: 0.65rem 0.75rem;
  border-radius: 0.35rem;
  font-family: "SpaceGrotesk", system-ui, sans-serif;
  font-size: 1rem;
  text-transform: none;
  letter-spacing: 0;
  opacity: 1;
}

.bw-book__fields input:focus {
  outline: 2px solid rgba(90, 210, 230, 0.55);
  outline-offset: 1px;
}

.bw-book__consent {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  font-size: 0.82rem;
  line-height: 1.4;
  opacity: 0.8;
  cursor: pointer;
}

.bw-book__consent input {
  margin-top: 0.2rem;
  flex-shrink: 0;
}

.bw-book__msg {
  margin: 0;
  min-height: 1.2em;
  font-size: 0.88rem;
}

.bw-book__msg.is-err {
  color: #ff9a6b;
}

.bw-book__msg.is-ok {
  color: #7ddeb0;
}

.bw-book__submit {
  appearance: none;
  border: none;
  background: linear-gradient(135deg, #5eead4, #14b8a6);
  color: #0c0e12;
  font-family: "SpaceGrotesk", system-ui, sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.85rem 1.25rem;
  border-radius: 0.35rem;
  cursor: pointer;
}

.bw-book__submit:hover {
  filter: brightness(1.06);
}

.bw-book__submit:disabled {
  opacity: 0.5;
  cursor: wait;
}

.bw-book__note {
  margin: 0;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.4;
}

.bw-book__process,
.bw-book__success {
  padding: 1.25rem 0.5rem;
  text-align: center;
}

.bw-book__process ol {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.bw-book__process li {
  opacity: 0.35;
  font-size: 0.95rem;
}

.bw-book__process li.is-active {
  opacity: 1;
  color: #5eead4;
}

.bw-book__process li.is-done {
  opacity: 0.7;
}

.bw-book__success-icon {
  margin: 0;
  font-size: 2.5rem;
  color: #5eead4;
}

.bw-book__success h3 {
  margin: 0.35rem 0;
  font-family: "BodoniModa", Georgia, serif;
  font-weight: 500;
  font-size: 1.6rem;
}

.bw-book__teams {
  margin: 0.75rem 0 0;
  font-size: 0.9rem;
}

.bw-book__teams a {
  color: #5eead4;
}

/* HUD-Font: aktiver Button klar lesbar */
.hud__font button.is-active {
  background: #1a1b1e;
  color: #f3efe8;
  border-color: transparent;
  font-weight: 650;
}

/* Steuerung: Modus + Tasten (getrennt von Maus/Gyro) */
.controls-hud {
  position: fixed;
  z-index: 13;
  right: 1rem;
  bottom: max(1.25rem, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  align-items: flex-end;
  pointer-events: none;
  max-width: min(16rem, 46vw);
  font-family: "MonoLisa", ui-monospace, monospace;
}

.controls-hud[hidden] {
  display: none !important;
}

.controls-hud__modes {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.4rem;
  pointer-events: auto;
}

.controls-hud__mode {
  appearance: none;
  font-family: inherit;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: lowercase;
  padding: 0.55rem 0.85rem;
  border-radius: 0.35rem;
  border: 1px solid rgba(26, 27, 30, 0.22);
  background: rgba(243, 239, 232, 0.72);
  color: #1a1b1e;
  opacity: 0.5;
  cursor: pointer;
  line-height: 1;
}

button.controls-hud__mode:hover {
  opacity: 0.85;
}

.controls-hud__mode.is-active {
  opacity: 1;
  font-weight: 700;
  background: rgba(37, 99, 235, 0.92);
  border-color: transparent;
  color: #f8fafc;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.35);
}

.controls-hud[data-mode="mouse"] .controls-hud__mode[data-mode="mouse"],
.controls-hud[data-mode="gyro"] .controls-hud__mode[data-mode="gyro"],
.controls-hud[data-mode="touch"] .controls-hud__mode[data-mode="touch"] {
  background: rgba(20, 184, 166, 0.92);
}

.controls-hud__keys {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  padding: 0.45rem 0.5rem;
  border-radius: 0.35rem;
  background: rgba(243, 239, 232, 0.78);
  border: 1px solid rgba(26, 27, 30, 0.14);
  transition: opacity 0.2s ease, filter 0.2s ease;
}

.controls-hud__keys.is-dimmed {
  opacity: 0.38;
  filter: grayscale(0.4);
}

.controls-hud__row {
  display: flex;
  gap: 0.28rem;
  justify-content: center;
}

.controls-hud__keys kbd {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.1rem;
  min-width: 2.65rem;
  min-height: 2.35rem;
  padding: 0.25rem 0.4rem;
  border-radius: 0.3rem;
  border: 1px solid rgba(26, 27, 30, 0.28);
  background: rgba(255, 255, 255, 0.7);
  color: #1a1b1e;
  font: 650 0.78rem/1 "MonoLisa", ui-monospace, monospace;
  box-shadow: 0 1px 0 rgba(26, 27, 30, 0.12);
  transition: transform 0.08s ease, background 0.08s ease, color 0.08s ease;
}

.controls-hud__keys kbd span {
  font-size: 0.48rem;
  letter-spacing: 0.04em;
  font-weight: 600;
  opacity: 0.7;
  text-transform: lowercase;
}

.controls-hud__spacer {
  width: 2.65rem;
}

.controls-hud__keys kbd.is-down {
  transform: translateY(1px);
  background: #1a1b1e;
  color: #f3efe8;
  border-color: transparent;
  box-shadow: none;
}

.controls-hud__keys kbd.is-down span {
  opacity: 0.85;
}

.controls-hud__hint {
  margin: 0;
  font-size: 0.58rem;
  letter-spacing: 0.04em;
  line-height: 1.35;
  text-align: right;
  max-width: 14rem;
  padding: 0.3rem 0.45rem;
  border-radius: 0.25rem;
  background: rgba(243, 239, 232, 0.72);
  color: #1a1b1e;
}

body.is-world-dark .controls-hud__mode {
  background: rgba(18, 19, 22, 0.65);
  border-color: rgba(243, 239, 232, 0.22);
  color: #f3efe8;
}

body.is-world-dark button.controls-hud__mode:hover {
  opacity: 0.9;
}

body.is-world-dark .controls-hud__mode.is-active {
  background: rgba(96, 165, 250, 0.95);
  border-color: transparent;
  color: #0c0e12;
  box-shadow: 0 0 0 1px rgba(96, 165, 250, 0.4);
}

body.is-world-dark .controls-hud[data-mode="mouse"] .controls-hud__mode[data-mode="mouse"],
body.is-world-dark .controls-hud[data-mode="gyro"] .controls-hud__mode[data-mode="gyro"],
body.is-world-dark .controls-hud[data-mode="touch"] .controls-hud__mode[data-mode="touch"] {
  background: rgba(45, 212, 191, 0.95);
  color: #0c0e12;
}

body.is-world-dark .controls-hud__keys,
body.is-world-dark .controls-hud__hint {
  background: rgba(18, 19, 22, 0.72);
  border-color: rgba(243, 239, 232, 0.2);
  color: #f3efe8;
}

body.is-world-dark .controls-hud__keys kbd {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(243, 239, 232, 0.3);
  color: #f3efe8;
}

body.is-world-dark .controls-hud__keys kbd.is-down {
  background: #ece8e1;
  color: #1a1b1e;
  border-color: transparent;
}

@media (max-width: 720px) {
  .controls-hud {
    right: auto;
    left: 1rem;
    bottom: max(5.5rem, calc(env(safe-area-inset-bottom) + 4.5rem));
    align-items: flex-start;
    max-width: min(14rem, 55vw);
  }

  .controls-hud__keys {
    display: none;
  }

  .controls-hud__hint {
    text-align: left;
    font-size: 0.55rem;
  }

  .controls-hud__mode[data-mode="keyboard"],
  .controls-hud__mode[data-mode="mouse"] {
    display: none;
  }

  .controls-hud__mode[data-mode="touch"],
  .controls-hud__mode[data-mode="gyro"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.5rem;
    min-width: 4.5rem;
    font-size: 0.78rem;
  }
}

@media (pointer: fine) {
  .controls-hud__mode[data-mode="touch"],
  .controls-hud__mode[data-mode="gyro"] {
    display: none;
  }
}

/* Mobil: Höhen-Pad */
.touch-pad {
  position: fixed;
  z-index: 14;
  right: 1rem;
  bottom: max(1.25rem, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  pointer-events: auto;
}

.touch-pad[hidden] {
  display: none !important;
}

.touch-pad__btn {
  appearance: none;
  width: 3.1rem;
  height: 3.1rem;
  border: 1px solid rgba(243, 239, 232, 0.45);
  background: rgba(18, 19, 22, 0.55);
  color: #f3efe8;
  border-radius: 0.75rem;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.touch-pad__btn:active {
  background: rgba(90, 210, 230, 0.45);
  color: #0c0e12;
}

@media (pointer: fine) {
  .touch-pad {
    display: none !important;
  }
}

@media (max-width: 720px) {
  .hud {
    padding-right: 1.25rem;
  }

  .hud__score {
    left: 1rem;
    right: auto;
    top: auto;
    bottom: max(1.25rem, env(safe-area-inset-bottom));
    min-width: 5.5rem;
    padding: 0.4rem 0.55rem;
  }

  .hud__score-value {
    font-size: 1.35rem;
  }

  .hud__logo {
    width: 3.8rem;
  }

  .hud__font {
    font-size: 0.65rem;
    pointer-events: auto;
  }

  .hud__near {
    font-size: 0.66rem;
    padding: 0.4rem 0.6rem;
  }

  .hud__near-status {
    margin-left: 0;
    width: 100%;
  }
}

/* Dark-Mode HUD: helle Schrift auf dunklem Himmel */
body.is-world-dark .hud {
  color: #f3efe8;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.65);
}

body.is-world-dark .hud__brand {
  background: none;
  border: none;
  filter: drop-shadow(0 1px 8px rgba(0, 0, 0, 0.65));
}

body.is-world-dark .hud__home {
  background: rgba(18, 19, 22, 0.72);
  border-color: rgba(243, 239, 232, 0.28);
  color: #f3efe8;
}

body.is-world-dark .hud__home:hover {
  background: rgba(18, 19, 22, 0.92);
}

body.is-world-dark .hud__hint,
body.is-world-dark .hud__font {
  background: rgba(18, 19, 22, 0.72);
  color: #f3efe8;
  border-color: rgba(243, 239, 232, 0.22);
}

body.is-world-dark .hud__theme {
  background: transparent;
  color: #f3efe8;
  border: none;
}

body.is-world-dark .hud__theme-track {
  background: rgba(243, 239, 232, 0.18);
  border-color: rgba(243, 239, 232, 0.35);
}

body.is-world-dark .hud__theme[aria-checked="true"] .hud__theme-track {
  background: rgba(45, 212, 191, 0.45);
  border-color: rgba(94, 234, 212, 0.55);
}

body.is-world-dark .hud__theme-knob {
  background: #ece8e1;
  border-color: rgba(0, 0, 0, 0.25);
}

body.is-world-dark .hud__logo {
  fill: #f3efe8;
}

body.is-world-dark .hud__near {
  color: #e6fffb;
  background:
    linear-gradient(90deg, rgba(45, 212, 191, 0.22), rgba(18, 19, 22, 0.82) 32%),
    rgba(18, 19, 22, 0.78);
  border-color: rgba(45, 212, 191, 0.45);
  box-shadow:
    inset 0 0 0 1px rgba(45, 212, 191, 0.12),
    0 0 20px rgba(45, 212, 191, 0.15);
}

body.is-world-dark .hud__near-radar {
  border-color: rgba(94, 234, 212, 0.45);
  background:
    radial-gradient(circle at center, rgba(45, 212, 191, 0.16) 0%, transparent 62%),
    rgba(0, 0, 0, 0.35);
}

body.is-world-dark .hud__near::before,
body.is-world-dark .hud__near::after {
  border-color: #5eead4;
}

body.is-world-dark .hud__near-tag {
  color: #99f6e4;
  border-color: rgba(45, 212, 191, 0.5);
  background: rgba(45, 212, 191, 0.12);
}

body.is-world-dark .hud__near-range,
body.is-world-dark .hud__near-status {
  color: #5eead4;
}

body.is-world-dark .hud__near-target {
  color: #f3efe8;
}

body.is-world-dark .hud__near.is-lock .hud__near-status {
  color: #fbbf24;
}

body.is-world-dark .hud__font button {
  border-color: rgba(243, 239, 232, 0.35);
  background: rgba(0, 0, 0, 0.28);
  color: #f3efe8;
}

body.is-world-dark .hud__font button.is-active {
  background: #ece8e1;
  color: #1a1b1e;
}

/* Galerie: wischen — horizontal erlaubt; Buttons nur auf Touch ausblenden */
.bento-pop__gallery .bento-pop__media,
.bento-pop__gallery .bento-pop__media img {
  touch-action: pan-y pinch-zoom;
  user-select: none;
  -webkit-user-drag: none;
  cursor: grab;
}

.bento-pop__gallery.is-swipeable .bento-pop__media {
  touch-action: none; /* Wischgeste zuverlässig an JS */
}

.bento-pop__tile.is-gallery .bento-pop__caption {
  grid-template-columns: 1fr auto;
  align-items: baseline;
}

.bento-pop__tile.is-gallery .bento-pop__ref-title {
  display: block;
}

.bento-pop__tile.is-story .bento-pop__ref-title:empty,
.bento-pop__tile.is-story .bento-pop__ref-title[hidden] {
  display: none;
}

@media (pointer: coarse) {
  .bento-pop__gallery .bento-pop__nav {
    display: none;
  }

  .bento-pop__stage {
    grid-template-columns: 1fr;
  }

  .bento-pop__gallery .bento-pop__media {
    grid-column: 1;
  }

  .bento-pop__tile.is-story .bento-pop__caption {
    justify-items: center;
    text-align: center;
    grid-template-columns: 1fr;
  }
}

.touch-pad__btn--gyro {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.touch-pad__btn--gyro.is-on {
  background: rgba(90, 210, 230, 0.55);
  color: #0c0e12;
  border-color: transparent;
}
