:root {
  --fondo: #120914;
  --magenta: #ff2e93;
  --dorado: #ffc83d;
  --turquesa: #19d3c5;
  --texto: #fff6ee;
  --suave: #d9c3cf;
  --panel: rgba(30, 12, 32, 0.72);
  --borde: rgba(255, 200, 61, 0.35);
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: var(--fondo); }
html, body { margin: 0; height: 100%; color: var(--texto); }
body { font-family: 'Fredoka', system-ui, -apple-system, sans-serif; overflow-x: hidden; }
.fondo { position: fixed; inset: 0; background: url('/web/img/fondo.jpg') center / cover no-repeat; z-index: -2; }
.fondo::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(18,9,20,.55), rgba(18,9,20,.82) 45%, rgba(18,9,20,.9)); }
main { max-width: 480px; margin: 0 auto; min-height: 100dvh; padding: max(16px, env(safe-area-inset-top)) 16px max(20px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; }
.oculto { display: none !important; }
.cabeza { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 14px; }
.logo { width: 150px; filter: drop-shadow(0 0 18px rgba(255,46,147,.45)); }
.chip { display: flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px; border-radius: 999px; background: var(--panel); border: 1px solid rgba(255,46,147,.5); box-shadow: 0 0 16px rgba(255,46,147,.25); font-weight: 600; }
.chip img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; border: 2px solid var(--magenta); }
.chip .sep { width: 1px; height: 22px; background: rgba(255,255,255,.25); }
.chip .sorbos b { color: var(--dorado); font-size: 1.15em; }
.pantalla { flex: 1; display: flex; flex-direction: column; gap: 16px; animation: entra .35s ease-out; }
@keyframes entra { from { opacity: 0; transform: translateY(10px) scale(.98); } }
h1 { font-size: 1.7rem; line-height: 1.15; margin: 8px 0 0; text-align: center; font-weight: 700; }
.suave { color: var(--suave); text-align: center; margin: 0; line-height: 1.4; }
.codigo { color: var(--dorado); letter-spacing: .08em; text-shadow: 0 0 14px rgba(255,200,61,.5); }
.campo { display: flex; flex-direction: column; gap: 8px; font-weight: 600; }
.campo input { font: inherit; font-size: 1.25rem; padding: 14px 16px; border-radius: 16px; border: 2px solid var(--borde); background: rgba(0,0,0,.45); color: var(--texto); outline: none; }
.campo input:focus { border-color: var(--magenta); box-shadow: 0 0 0 4px rgba(255,46,147,.2); }
.etiqueta { margin: 0; font-weight: 600; }
.rejilla { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.rejilla button { padding: 0; border: 3px solid transparent; border-radius: 50%; background: none; aspect-ratio: 1; overflow: hidden; cursor: pointer; transition: transform .12s, border-color .12s; }
.rejilla img, .caras img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rejilla button[aria-checked='true'] { border-color: var(--magenta); transform: scale(1.08); box-shadow: 0 0 14px rgba(255,46,147,.6); }
.boton { font: inherit; font-weight: 700; font-size: 1.25rem; color: #fff; border: 0; border-radius: 999px; padding: 16px 20px; cursor: pointer; transition: transform .1s, filter .1s; }
.boton:active { transform: scale(.97); }
.boton:disabled { filter: grayscale(.8) brightness(.6); cursor: default; }
.boton.magenta { background: linear-gradient(180deg, #ff5aa9, #d40f72); box-shadow: 0 0 0 2px rgba(255,120,190,.6) inset, 0 0 24px rgba(255,46,147,.55); }
.boton.turquesa { background: linear-gradient(180deg, #3ff0e1, #0a9d93); box-shadow: 0 0 0 2px rgba(120,255,240,.55) inset, 0 0 24px rgba(25,211,197,.5); }
.boton.grande { font-size: 2rem; padding: 26px 20px; }
.botones { display: flex; flex-direction: column; gap: 18px; margin-top: 8px; }
.cabecera { margin: 0; text-align: center; font-weight: 700; font-size: 1.55rem; color: var(--dorado); text-shadow: 0 0 16px rgba(255,200,61,.45); }
.carta { margin: 0; text-align: center; font-size: 1.5rem; font-weight: 600; font-style: italic; line-height: 1.25; }
.caras { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.caras .cara:active .foto { transform: scale(.95); }
.caras .cara { padding: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; background: none; border: 0; color: var(--texto); font: inherit; font-weight: 600; cursor: pointer; }
.caras .cara span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.caras .foto { width: 100%; aspect-ratio: 1; transition: transform .12s; border-radius: 50%; overflow: hidden; border: 3px solid var(--borde); }
.caras .cara.elegida .foto { border-color: var(--magenta); box-shadow: 0 0 18px rgba(255,46,147,.7); }
.listo { text-align: center; font-size: 1.6rem; font-weight: 700; padding: 30px 0; color: var(--turquesa); text-shadow: 0 0 16px rgba(25,211,197,.5); }
.pie { margin-top: auto; display: flex; flex-direction: column; align-items: center; gap: 10px; padding-top: 12px; }
.anillo { position: relative; width: 64px; height: 64px; }
.anillo svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.anillo circle { fill: none; stroke-width: 4; }
.anillo .pista { stroke: rgba(255,255,255,.15); }
.anillo .arco { stroke: var(--dorado); stroke-linecap: round; stroke-dasharray: 119.4; transition: stroke-dashoffset .25s linear; }
.anillo b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 1.5rem; }
.lista { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.lista li { display: flex; align-items: center; gap: 12px; padding: 8px 14px 8px 8px; border-radius: 16px; background: var(--panel); border: 1px solid rgba(255,255,255,.08); font-weight: 600; }
.lista li img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.lista li .s { margin-left: auto; color: var(--dorado); }
.lista li.bebe { border-color: var(--magenta); box-shadow: 0 0 14px rgba(255,46,147,.4); }
.lista li.off { opacity: .45; }
.lista li .tag { font-size: .8rem; color: var(--magenta); }
.premios { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; text-align: center; }
.premios li { padding: 14px; border-radius: 18px; background: var(--panel); border: 1px solid var(--borde); font-size: 1.15rem; }
.premios b { display: block; color: var(--dorado); font-size: 1.3rem; }
#res-titulo.bebes { color: var(--magenta); font-size: 2.4rem; text-shadow: 0 0 20px rgba(255,46,147,.7); animation: late .6s ease-out; }
@keyframes late { 0% { transform: scale(.6); } 60% { transform: scale(1.12); } }
.aviso-red { position: fixed; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); transform: translateX(-50%); padding: 10px 18px; border-radius: 999px; background: rgba(0,0,0,.8); border: 1px solid var(--dorado); font-weight: 600; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
