:root {
  --primario: #b08d57;
  --fondo: #1d1b18;
  --texto: #f4efe6;
  --tipografia: Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #1d1b18; color: var(--texto); font-family: var(--sans); overflow: hidden; }
.oculto { display: none !important; }

.capa {
  position: fixed; inset: 0; z-index: 10;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 24px 16px; overflow-y: auto;
}
.tarjeta { width: min(420px, 100%); text-align: center; }
.powered { position: absolute; bottom: 14px; font-size: 12px; letter-spacing: .08em; opacity: .55; }

/* Acceso: marca Eventyoo (no usa el branding del evento) */
.capa-acceso {
  background: radial-gradient(circle at 50% 25%, #0b3d6b, #00284C 65%, #001a33);
  color: #fff; font-family: "Nunito Sans", var(--sans);
}
.eventyoo { font-family: Quicksand, var(--sans); font-weight: 700; font-size: 22px; letter-spacing: .04em; color: #00ABE1; margin-bottom: 6px; }
.marca { font-family: Quicksand, var(--sans); font-weight: 700; font-size: 34px; }
.marca span { color: #00ABE1; }
.indicacion { opacity: .85; margin: 10px 0 22px; font-size: 18px; }
.puntos { display: flex; justify-content: center; gap: 14px; margin-bottom: 10px; }
.puntos i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #00ABE1; transition: background .15s; }
.puntos i.lleno { background: #00ABE1; }
.puntos.error { animation: temblar .35s; }
@keyframes temblar { 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }
.mensaje { min-height: 22px; color: #ffb4a8; margin: 6px 0 14px; }
.teclado { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; max-width: 330px; margin: 0 auto; }
.teclado button {
  height: 76px; border-radius: 18px; border: 1px solid #1d5a8c; background: #063459; color: #fff;
  font-size: 30px; font-family: "Nunito Sans", var(--sans); cursor: pointer; touch-action: manipulation;
}
.teclado button:hover { background: #0a4373; }
.teclado button:active { transform: scale(.96); }
.teclado button[data-accion="ok"] { background: #0E76AB; border-color: #0E76AB; }
.teclado button:disabled { opacity: .4; }

/* Portada (usa el branding del evento) */
.capa-portada { background: var(--fondo); color: var(--texto); overflow: hidden; }
.portada-fondo { position: absolute; inset: -40px; background: var(--fondo) center/cover no-repeat; filter: blur(14px) saturate(1.1); transform: scale(1.05); }
.capa-portada::before { content: ""; position: absolute; inset: 0; z-index: 1;
  background: radial-gradient(ellipse at 50% 35%, color-mix(in srgb, var(--fondo) 35%, transparent), color-mix(in srgb, var(--fondo) 88%, transparent) 75%); }
.capa-portada > .tarjeta, .capa-portada > .powered { position: relative; z-index: 2; }
.capa-portada > .powered { position: absolute; color: var(--texto); }
.tarjeta-portada {
  width: min(460px, 100%); padding: 34px 28px 24px; border-radius: 28px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--fondo) 62%, transparent), color-mix(in srgb, var(--fondo) 80%, transparent));
  border: 1px solid color-mix(in srgb, var(--primario) 45%, transparent);
  box-shadow: 0 30px 80px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.12);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  animation: subir .7s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes subir { from { opacity: 0; transform: translateY(24px) scale(.98); } to { opacity: 1; transform: none; } }
.sello {
  width: 92px; height: 92px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--primario) 70%, #fff), var(--primario) 60%, color-mix(in srgb, var(--primario) 70%, #000));
  box-shadow: 0 10px 30px rgba(0,0,0,.35), inset 0 2px 3px rgba(255,255,255,.35);
  font-family: var(--tipografia); font-size: 34px; font-weight: 600; color: var(--fondo);
}
.sello img { width: 100%; height: 100%; object-fit: contain; }
.etiqueta { margin: 0 0 6px; font-size: 12px; letter-spacing: .28em; text-transform: uppercase; color: var(--primario); }
.capa-portada h1 { font-family: var(--tipografia); font-weight: 600; font-size: clamp(42px, 11vw, 62px); margin: 0; color: var(--texto); line-height: 1.05; }
.fecha { font-size: 16px; margin: 12px 0 4px; opacity: .85; display: flex; align-items: center; justify-content: center; gap: 10px; }
.fecha::before, .fecha::after { content: ""; width: 28px; height: 1px; background: var(--primario); }
.bienvenida { font-family: var(--tipografia); font-style: italic; font-size: 20px; margin: 14px 0 24px; opacity: .95; }
.acciones { display: flex; flex-direction: column; gap: 12px; }
.btn {
  height: 58px; border-radius: 29px; font-size: 18px; font-weight: 600; cursor: pointer; font-family: var(--sans);
  display: flex; align-items: center; justify-content: center; gap: 10px;
  border: 1px solid color-mix(in srgb, var(--primario) 70%, transparent);
  background: color-mix(in srgb, var(--texto) 8%, transparent); color: var(--texto);
  transition: transform .15s, box-shadow .15s, background .15s;
}
.btn svg { width: 24px; height: 24px; fill: currentColor; }
.btn svg.trazo { fill: none; stroke: currentColor; stroke-width: 1.8; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0,0,0,.3); }
.btn:active { transform: translateY(0) scale(.98); }
.btn.primario {
  background: linear-gradient(180deg, color-mix(in srgb, var(--primario) 80%, #fff), var(--primario) 55%, color-mix(in srgb, var(--primario) 80%, #000));
  color: var(--fondo); border-color: transparent; box-shadow: 0 8px 22px color-mix(in srgb, var(--primario) 35%, transparent), inset 0 1px 0 rgba(255,255,255,.4);
}
.calidad { margin-top: 20px; display: flex; gap: 10px; align-items: center; justify-content: center; font-size: 13px; opacity: .9; }
.segmentos { display: inline-flex; padding: 3px; border-radius: 16px; background: color-mix(in srgb, var(--texto) 10%, transparent); }
.segmentos button { border: 0; background: transparent; color: var(--texto); border-radius: 13px; padding: 6px 14px; cursor: pointer; font: 600 13px var(--sans); }
.segmentos button.activo { background: var(--primario); color: var(--fondo); }
.diagnostico { font-size: 11px; opacity: .55; margin: 14px 0 0; }
.creditos { font-size: 11px; opacity: .6; margin-top: 8px; line-height: 1.4; text-align: left; }
.creditos summary { cursor: pointer; text-align: center; }

.btn-flotante {
  position: fixed; top: max(14px, env(safe-area-inset-top)); left: 14px; z-index: 11;
  display: flex; align-items: center; gap: 8px; border: 1px solid rgba(255,255,255,.25); border-radius: 22px;
  padding: 9px 16px 9px 12px; font: 600 15px var(--sans); color: #fff; cursor: pointer;
  background: rgba(0,0,0,.45); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: opacity .4s;
}
.btn-flotante svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.btn-flotante.desvanecido { opacity: 0; pointer-events: none; }
.aviso {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 20;
  background: rgba(0,0,0,.8); color: #fff; padding: 12px 18px; border-radius: 12px; max-width: calc(100% - 32px); font-size: 15px;
}
