:root{
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: #07070b;
  overflow: hidden;
}

canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh; /* mobile vero */
  display: block;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  touch-action: none;
}

* {
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* OVERLAYS */
.overlay{
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0,0,0,0.75);
  z-index: 50;
  padding: calc(18px + var(--safe-top)) 18px calc(18px + var(--safe-bottom)) 18px;
}

.hidden{ display:none; }

.overlayCard{
  width: min(92vw, 720px);
  border: 2px solid rgba(160,160,255,0.65);
  background: rgba(12,12,20,0.92);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.55);
}

.overlayTop{
  display:flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 14px 10px 14px;
}

.overlayTitle{
  font: 700 16px system-ui, -apple-system, Segoe UI, Arial;
  color: #ffd3ff;
  letter-spacing: 0.6px;
}

.videoWrap{
  width: 100%;
  background: #000;
  display: grid;
  place-items: center;
}

.video{
  width: 100%;
  height: auto;
  max-height: 62dvh;
  object-fit: contain;
  background: #000;
}

.overlayBottom{
  padding: 12px 14px 14px 14px;
  display:flex;
  flex-direction: column;
  gap: 10px;
}

.btnPrimary{
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 12px 14px;
  font: 900 16px system-ui, -apple-system, Segoe UI, Arial;
  background: #6f6fff;
  color: #090914;
}

.btnGhost{
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.06);
  color: #fff;
  border-radius: 12px;
  padding: 10px 12px;
  font: 700 13px system-ui, -apple-system, Segoe UI, Arial;
  white-space: nowrap;
}

.hint{
  font: 500 12px system-ui, -apple-system, Segoe UI, Arial;
  color: rgba(220,220,255,0.85);
}
