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

:root {
  --bg: #05080f;
  --text: #d6e4f0;
  --muted: #5d7489;
  --accent: #35c9ff;
  --accent-dim: rgba(53, 201, 255, 0.14);
  --live: #ff5d5d;
}

html, body { height: 100%; }

body {
  background:
    radial-gradient(ellipse 120% 60% at 50% -10%, rgba(53, 201, 255, 0.07), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: "Rajdhani", "Segoe UI", system-ui, sans-serif;
  display: flex;
  justify-content: center;
}

main {
  width: 100%;
  max-width: 480px;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: max(20px, env(safe-area-inset-top)) 20px max(20px, env(safe-area-inset-bottom));
  gap: 14px;
}

header { text-align: center; }

h1 {
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.45em;
  margin-left: 0.45em; /* optischer Ausgleich fuers letzte Spacing */
  text-transform: uppercase;
  color: var(--text);
}

/* Statuszeile als Systemausgabe: Punkt + Text */
#status {
  color: var(--muted);
  margin-top: 8px;
  min-height: 1.3em;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
}
#status::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-right: 8px;
  vertical-align: 1px;
  background: var(--muted);
  transition: background 0.3s, box-shadow 0.3s;
}
body.live #status::before { background: var(--accent); box-shadow: 0 0 8px var(--accent); }
body.connecting #status::before { background: var(--text); animation: blink 0.8s infinite; }

@keyframes blink { 50% { opacity: 0.2; } }

/* Orb: Canvas zeichnet, der Button darueber ist unsichtbar und klickbar */
#stage {
  position: relative;
  width: min(68vw, 300px);
  height: min(68vw, 300px);
  flex-shrink: 0;
}
#orb { position: absolute; inset: 0; width: 100%; height: 100%; }
#talk {
  position: absolute;
  inset: 18%;
  border-radius: 50%;
  border: none;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
#talk:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 6px;
}

#hint { color: var(--muted); font-size: 0.8rem; letter-spacing: 0.04em; }

/* Transkript als HUD-Feed: Seitenlinie statt Sprechblasen */
#transcript {
  width: 100%;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 12px;
  scrollbar-width: thin;
  scrollbar-color: var(--accent-dim) transparent;
}

.turn {
  font-size: 0.95rem;
  line-height: 1.45;
  padding: 2px 0 2px 14px;
  border-left: 2px solid var(--accent-dim);
}
.turn.otto { border-left-color: var(--accent); color: var(--text); }
.turn.user { border-left-color: var(--muted); color: var(--muted); }
.turn.system {
  border-left: none;
  padding-left: 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
}

@media (prefers-reduced-motion: reduce) {
  body.connecting #status::before { animation: none; }
}
