@font-face {
  font-family: 'Geist Mono';
  src: url('../assets/fonts/GeistMono-Variable.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

#lienzo { cursor: default; }

.pista {
  position: fixed; left: 14px; top: var(--ui-arriba, 14px); z-index: 4; margin: 0;
  padding: 7px 11px; border-radius: 999px; background: rgb(7 8 12 / 0.6);
  font: 400 12px/1.2 'Geist Mono', ui-monospace, monospace; letter-spacing: 0.08em; color: rgb(244 246 255 / 0.85);
  pointer-events: none; max-width: calc(100% - 28px);
}
html:not(.embed) .pista { top: max(52px, env(safe-area-inset-top)); }

.fondo-nombre {
  position: fixed; left: 50%; top: calc(var(--ui-arriba, 14px) + 44px); z-index: 4; margin: 0; transform: translate(-50%, 0) scale(0.96);
  font: 700 clamp(28px, 6vw, 56px)/1 'Geist', system-ui, sans-serif; letter-spacing: -0.03em; color: #fff;
  text-shadow: 0 0 30px rgb(255 138 0 / 0.8); opacity: 0; pointer-events: none; transition: opacity 300ms, transform 300ms;
}
.fondo-nombre.visible { opacity: 1; transform: translate(-50%, 0) scale(1); }

.controles {
  position: fixed; right: 14px; bottom: var(--ui-abajo, 14px); z-index: 5; display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end;
}
.controles .btn, .permiso .btn {
  min-height: 44px; padding: 0 16px; font: 500 12.5px/1 'Geist Mono', ui-monospace, monospace; letter-spacing: 0.04em;
  background: rgb(7 8 12 / 0.72); border: 1px solid rgb(244 246 255 / 0.28); color: #F4F6FF;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.controles .btn:hover, .permiso .btn:hover { border-color: var(--naranja); transform: none; }
.controles .btn--naranja, .permiso .btn--naranja { background: var(--naranja); border-color: var(--naranja); color: #09090B; }
.controles .btn[hidden] { display: none; }

/* vista previa de la cámara: transparencia sobre lo que se está usando */
.camara {
  position: fixed; left: 14px; bottom: var(--ui-abajo, 14px); z-index: 5; width: 132px; margin: 0;
  border-radius: 12px; overflow: hidden; background: #000; border: 1px solid rgb(255 255 255 / 0.18);
}
.camara[hidden] { display: none; }
.camara video { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transform: scaleX(-1); }
.camara__aviso {
  margin: 0; padding: 5px 7px; font: 400 9.5px/1.25 'Geist Mono', ui-monospace, monospace; color: rgb(244 246 255 / 0.8);
  background: rgb(7 8 12 / 0.85);
}
.camara__aviso i { display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: #ff3b30; vertical-align: 1px; animation: enVivo 1.4s infinite; }
@keyframes enVivo { 50% { opacity: 0.3; } }

/* pedido de permiso antes de que el navegador pregunte */
.permiso { position: fixed; inset: 0; z-index: 7; display: grid; place-items: center; background: rgb(0 0 0 / 0.45); padding: 16px; }
.permiso[hidden] { display: none; }
.permiso__caja {
  width: min(380px, 100%); padding: 22px 20px 18px; border-radius: 18px; text-align: left;
  background: rgb(9 9 11 / 0.86); border: 1px solid rgb(255 138 0 / 0.5);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.permiso__titulo { margin: 0; font: 700 22px/1.1 'Geist', system-ui, sans-serif; letter-spacing: -0.02em; }
.permiso__texto { margin: 10px 0 0; font-size: 15px; line-height: 1.45; color: rgb(244 246 255 / 0.85); }
.permiso__nota { margin: 10px 0 0; font: 400 12px/1.4 'Geist Mono', ui-monospace, monospace; color: #FFB25C; }
.permiso__botones { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; flex-wrap: wrap; }

.embed .volver { display: none; }
.foto .pista, .foto .controles, .foto .burbuja, .foto .volver, .foto .camara { display: none !important; }

@media (max-width: 600px) {
  .camara { width: 104px; }
  .pista { font-size: 11px; }
}
