:root {
  --bg: #07080b;
  --ink: #f3efe6;
  --muted: #a39e93;
  --ice: #8eecff;
  --gold: #d4b07a;
  --line: rgba(243, 239, 230, 0.14);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: Outfit, system-ui, sans-serif;
}

html:not([data-ac-lang="de"]) [data-l="de"],
html:not([data-ac-lang="en"]) [data-l="en"],
html:not([data-ac-lang="es"]) [data-l="es"] {
  display: none;
}

a { color: var(--ice); text-decoration: none; }
a:hover { color: #fff; }

.shell {
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.bar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--ink);
}

.brand svg { width: 28px; height: 28px; flex: 0 0 auto; }

.brand b {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}

.brand span { color: var(--ice); }

.word {
  margin: 0;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}

.home {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  border: 1px solid rgba(142, 236, 255, 0.35);
  border-radius: 999px;
  padding: 6px 12px;
}

.stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
}

#view {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--bg);
  touch-action: none;
  cursor: grab;
}

#view.is-drag { cursor: grabbing; }

.hint {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  margin: 0;
  text-align: center;
  pointer-events: none;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: #2a241c;
  text-shadow: 0 1px 0 rgba(255, 250, 242, 0.9), 0 0 10px rgba(255, 250, 242, 0.75);
}

.hint .cap { display: none; }

.hint.is-cap {
  left: 50%;
  right: auto;
  width: min(34rem, calc(100% - 32px));
  transform: translateX(-50%);
  padding: 10px 16px 12px;
  background: rgba(20, 16, 12, 0.82);
  border: 1px solid rgba(212, 176, 122, 0.42);
  border-radius: 14px;
  letter-spacing: 0;
  color: var(--ink);
  text-shadow: none;
}

.hint.is-cap .idle { display: none; }
.hint.is-cap .cap { display: block; }

.cap b {
  display: block;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--ink);
}

.cap i {
  display: block;
  margin-top: 4px;
  font-style: normal;
  font-family: Outfit, sans-serif;
  font-size: 0.82rem;
  line-height: 1.35;
  letter-spacing: 0.01em;
  color: var(--muted);
}

.fallback {
  display: none;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
}

.fallback a {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--ink);
  font-size: 0.85rem;
}

.fallback.is-open { display: flex; }

@media (prefers-reduced-motion: reduce) {
  html, body { height: auto; min-height: 100%; overflow: auto; }
  .shell { height: auto; min-height: 100dvh; }
  .stage { flex: none; height: 68dvh; }
  .fallback { display: flex; }
}

@media (max-width: 640px) {
  .word { display: none; }
  .brand b { font-size: 0.66rem; }
}
