:root {
  --oryk-bg: #000000;
  --oryk-cyan: #4de0ff;
  --oryk-gold: #F0B429;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  width: 100%;
  height: 100%;
  background: var(--oryk-bg);
  overflow: hidden;
  overscroll-behavior: none;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  color: #E8E6E0;
  user-select: none;
  -webkit-user-select: none;
}

#oryk-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  pointer-events: none;
  z-index: 1;
}

#oryk-status {
  position: fixed;
  top: calc(12px + var(--safe-top));
  left: calc(12px + var(--safe-left));
  font-size: 12px;
  letter-spacing: 0.08em;
  color: #7a7770;
  z-index: 10;
  white-space: pre-wrap;
  max-width: 80vw;
}
#oryk-status.error { color: #ff6b6b; }
#oryk-status.ok { color: #4a9b6e; }

/* ============ Botões topo (ver tela / modo live) — respeita notch ============ */
#oryk-vision-btn,
#oryk-live-btn {
  top: calc(16px + var(--safe-top)) !important;
  right: calc(16px + var(--safe-right)) !important;
}
#oryk-live-btn {
  top: calc(60px + var(--safe-top)) !important;
}

/* ============ Botão PTT (espaço/touch) — respeita home indicator ============ */
#oryk-ptt-btn {
  bottom: calc(16px + var(--safe-bottom)) !important;
  right: calc(16px + var(--safe-right)) !important;
  max-width: calc(100vw - 32px - var(--safe-left) - var(--safe-right));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ============ Mobile portrait — UI minimalista, só a Oryk ============ */
/* Wake word "Oryk" já ativa tudo. Botões desktop são ruído. */
@media (max-width: 600px), (orientation: portrait) {
  #oryk-vision-btn,
  #oryk-live-btn,
  #oryk-ptt-btn {
    display: none !important;
  }
  /* hint do espaço também não faz sentido em touch */
  body > div[style*="bottom"][style*="font:12px"] {
    display: none !important;
  }
}

/* ============ Hint inicial — discreto, base da tela, fade gracioso ============ */
#oryk-tap-init {
  position: fixed;
  bottom: calc(56px + var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  animation: orykHintIn 1.6s cubic-bezier(.2,.7,.2,1) 1s forwards;
}
#oryk-tap-init .hint-line {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 10px;
  font-weight: 300;
  letter-spacing: .42em;
  text-transform: lowercase;
  color: rgba(160, 240, 255, 0.42);
  margin: 0;
  text-indent: .42em;
}
#oryk-tap-init .hint-sub {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 8.5px;
  font-weight: 300;
  letter-spacing: .3em;
  text-transform: lowercase;
  color: rgba(122, 166, 200, 0.28);
  margin-top: 8px;
  text-indent: .3em;
}
@keyframes orykHintIn {
  to { opacity: 1; }
}
#oryk-tap-init.dismiss {
  animation: orykHintOut .7s ease-out forwards;
}
@keyframes orykHintOut {
  to { opacity: 0; transform: translateX(-50%) translateY(-3px); filter: blur(2px); }
}
