/* Dilema · estilo de fiesta nocturna: fondo índigo, piezas gruesas y de colores vivos */
:root {
  --fondo: #120a2e; --fondo2: #23104f; --tinta: #fff; --gris: rgba(255, 255, 255, .66); --linea: rgba(255, 255, 255, .13);
  --vidrio: rgba(255, 255, 255, .07); --vidrio2: rgba(255, 255, 255, .12);
  --azul: #3d8bff; --azul2: #1f4fd8; --ama: #ffcb2e; --ama2: #ff9416; --rojo: #ff5c8a; --rojo2: #d81b54;
  --si: #2fdc74; --si2: #109a49; --no: #ff5470; --no2: #c81e45; --oro: #ffd23f; --mor: #8b5cf6; --mor2: #5b2fd1;
  --r: 22px; --titulo: "Titan One", "Fredoka", system-ui, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; margin: 0; }
body {
  font-family: "Fredoka", system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 17px; color: var(--tinta); background: var(--fondo);
  background-image: radial-gradient(900px 600px at 12% -10%, #5b2fd1aa, transparent 60%), radial-gradient(800px 600px at 105% 10%, #d81b5477, transparent 60%), radial-gradient(900px 700px at 50% 120%, #1f4fd877, transparent 60%);
  background-attachment: fixed; overflow-x: hidden; overscroll-behavior: none;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }

/* ── Logo ── */
.logo { white-space: nowrap; flex: 0 0 auto; font-family: var(--titulo); font-weight: 400; line-height: .9; letter-spacing: .5px; display: inline-flex; align-items: center; gap: .18em; transform: rotate(-3deg); user-select: none; }
.logo .l1 { color: var(--oro); background: linear-gradient(#fff3a6, #ffb91f); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; filter: drop-shadow(0 .06em 0 #7a3b00) drop-shadow(0 .1em .12em rgba(0, 0, 0, .45)); }
.logo .l2 { color: #fff; background: linear-gradient(var(--si), var(--si2)); padding: .08em .3em .12em; border-radius: .35em; box-shadow: 0 .09em 0 #0a6a31, 0 .2em .4em rgba(0, 0, 0, .4); transform: rotate(6deg); text-shadow: 0 .05em 0 rgba(0, 0, 0, .25); }
.logo.g { font-size: clamp(54px, 13vw, 104px); }
.logo.ch { font-size: 25px; }

/* ── Botones ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 54px; padding: 0 24px; border-radius: 18px; font-weight: 600; font-size: 19px; color: #fff; background: var(--vidrio2); box-shadow: 0 5px 0 rgba(0, 0, 0, .35); transition: transform .08s, box-shadow .08s, filter .15s; text-align: center; }
.btn:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 1px 0 rgba(0, 0, 0, .35); }
.btn:disabled { opacity: .45; cursor: default; }
.btn.pri { background: linear-gradient(var(--ama), var(--ama2)); color: #3a1c00; box-shadow: 0 5px 0 #b35a00, 0 12px 24px rgba(255, 148, 22, .28); }
.btn.mor { background: linear-gradient(var(--mor), var(--mor2)); box-shadow: 0 5px 0 #3a1c8f; }
.btn.blo { width: 100%; }
.btn.ch { min-height: 42px; padding: 0 16px; font-size: 16px; border-radius: 14px; box-shadow: 0 4px 0 rgba(0, 0, 0, .35); }
.btn.pel { background: linear-gradient(var(--no), var(--no2)); box-shadow: 0 5px 0 #8a1230; }
.btn:hover:not(:disabled) { filter: brightness(1.07); }
.link { color: var(--gris); text-decoration: underline; text-underline-offset: 4px; font-size: 16px; padding: 10px; }
.link:hover { color: #fff; }

.tarjeta { background: var(--vidrio); border: 1px solid var(--linea); border-radius: var(--r); padding: 20px; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 20px 50px rgba(0, 0, 0, .3); }
.campo { display: block; font-size: 15px; color: var(--gris); font-weight: 500; }
.campo input, .unir input { display: block; width: 100%; margin-top: 6px; height: 54px; border-radius: 16px; border: 2px solid var(--linea); background: rgba(0, 0, 0, .28); padding: 0 16px; font-size: 20px; font-weight: 600; color: #fff; outline: 0; }
.campo input:focus, .unir input:focus { border-color: var(--ama); }
::placeholder { color: rgba(255, 255, 255, .35); }

/* ── Inicio ── */
.inicio { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding: 28px 18px 40px; position: relative; }
.hero { text-align: center; display: grid; gap: 16px; justify-items: center; }
.lema { font-size: clamp(17px, 4.4vw, 21px); color: var(--gris); max-width: 420px; font-weight: 500; }
.inicio .tarjeta { width: 100%; max-width: 440px; display: grid; gap: 16px; }
.avs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.av { border-radius: 50%; overflow: hidden; aspect-ratio: 1; border: 3px solid transparent; opacity: .6; transition: transform .15s, opacity .15s, border-color .15s; background: #0006; }
.av img { width: 100%; height: 100%; object-fit: cover; }
.av.on { opacity: 1; border-color: var(--oro); transform: scale(1.12); box-shadow: 0 0 0 3px rgba(255, 210, 63, .25), 0 8px 18px rgba(0, 0, 0, .4); }
.av:disabled { opacity: .18; cursor: default; filter: grayscale(1); }
.av:hover:not(:disabled) { opacity: 1; }
.o { display: flex; align-items: center; gap: 12px; color: var(--gris); font-size: 15px; }
.o::before, .o::after { content: ""; flex: 1; height: 1px; background: var(--linea); }
.unir { display: flex; gap: 10px; }
.unir input { margin: 0; text-transform: uppercase; letter-spacing: 6px; text-align: center; font-family: var(--titulo); font-size: 24px; min-width: 0; }
.invit { text-align: center; font-size: 18px; }
.invit b { font-family: var(--titulo); font-weight: 400; font-size: 26px; letter-spacing: 3px; color: var(--oro); }
.flota { position: absolute; width: 74px; border-radius: 50%; box-shadow: 0 12px 26px rgba(0, 0, 0, .45); border: 3px solid rgba(255, 255, 255, .85); animation: flota 6s ease-in-out infinite; pointer-events: none; }
.flota:nth-of-type(1) { left: 5%; top: 9%; } .flota:nth-of-type(2) { right: 6%; top: 15%; animation-delay: -2s; width: 62px; }
.flota:nth-of-type(3) { left: 8%; bottom: 10%; animation-delay: -4s; width: 60px; } .flota:nth-of-type(4) { right: 7%; bottom: 14%; animation-delay: -1s; }
@keyframes flota { 0%, 100% { transform: translateY(0) rotate(-5deg); } 50% { transform: translateY(-16px) rotate(6deg); } }
@media (max-width: 760px) { .flota { display: none; } }

/* ── Sala de espera ── */
.sala { max-width: 980px; margin: 0 auto; padding: 18px 16px 40px; display: grid; gap: 18px; }
.sala-cab { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sala-cuerpo { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 860px) { .sala-cuerpo { grid-template-columns: 340px 1fr; align-items: start; } }
.cod { text-align: center; display: grid; gap: 12px; justify-items: center; }
.cod small { color: var(--gris); font-size: 15px; font-weight: 500; }
.cod-l { font-family: var(--titulo); font-size: 62px; letter-spacing: 10px; padding-left: 10px; line-height: 1; color: var(--oro); text-shadow: 0 4px 0 #7a3b00, 0 10px 24px rgba(255, 180, 30, .35); }
.qr { width: 168px; background: #fff; border-radius: 16px; padding: 8px; }
.qr svg { display: block; width: 100%; height: auto; }
.jugs { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 12px; }
.jg { position: relative; display: grid; justify-items: center; gap: 6px; padding: 14px 6px 10px; border-radius: 18px; background: var(--vidrio); border: 1px solid var(--linea); animation: entra .35s cubic-bezier(.2, 1.4, .4, 1) both; }
.jg img { width: 68px; height: 68px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 6px 14px rgba(0, 0, 0, .35); }
.jg b { font-weight: 600; font-size: 16px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jg.yo { border-color: var(--oro); background: rgba(255, 210, 63, .12); }
.jg.off img { filter: grayscale(1); opacity: .5; }
.jg .cor { position: absolute; top: -9px; left: 50%; transform: translateX(-50%); font-size: 22px; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .5)); }
.jg .x { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 50%; background: rgba(0, 0, 0, .45); color: #fff; font-size: 15px; line-height: 26px; }
.jg.vacio { border-style: dashed; color: var(--gris); font-size: 14px; align-content: center; min-height: 124px; text-align: center; animation: none; }
@keyframes entra { from { transform: scale(.6); opacity: 0; } }
.cfg { display: grid; gap: 14px; }
.cfg h3, .tarjeta h3 { font-size: 15px; font-weight: 600; color: var(--gris); text-transform: uppercase; letter-spacing: 1px; }
.seg { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.seg button { padding: 9px 14px; border-radius: 13px; background: rgba(0, 0, 0, .28); border: 2px solid var(--linea); font-weight: 600; font-size: 15.5px; }
.seg button.on { background: #fff; color: #23104f; border-color: #fff; }
.seg button:disabled { cursor: default; }
.seg button:disabled:not(.on) { opacity: .4; }
.nota { color: var(--gris); font-size: 15px; text-align: center; }

/* ── Juego ── */
.juego { height: 100dvh; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; grid-template-columns: minmax(0, 1fr); overflow: hidden; }
.barra { display: flex; align-items: center; gap: 10px; padding: 8px 12px; }
.barra .sp { flex: 1; }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 13px; border-radius: 99px; background: var(--vidrio2); font-weight: 600; font-size: 15px; white-space: nowrap; }
.pill b { font-family: var(--titulo); font-weight: 400; letter-spacing: 2px; color: var(--oro); }
.ico { width: 38px; height: 38px; border-radius: 50%; background: var(--vidrio2); display: grid; place-items: center; font-size: 18px; }
.mesa { min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 0 10px; }
@media (min-width: 940px) { .mesa { grid-template-rows: minmax(0, 1fr); grid-template-columns: minmax(0, 1.5fr) minmax(380px, 1fr); gap: 16px; padding: 0 16px; } }
.tab-zona { min-height: 0; display: grid; place-items: center; }
.tab { position: relative; width: 100%; aspect-ratio: 1000 / 640; max-height: 100%; border-radius: 26px; overflow: hidden; background: #1a1140 url(/img/fondo.webp) center/cover; box-shadow: 0 18px 50px rgba(0, 0, 0, .5), inset 0 0 0 2px rgba(255, 255, 255, .12); }
@media (max-width: 939px) { .tab { max-height: 40dvh; width: min(100%, calc(40dvh * 1000 / 640)); border-radius: 18px; } }
@media (min-width: 940px) { .tab-zona { align-content: center; } .tab { width: min(100%, calc((100dvh - 150px) * 1000 / 640)); } }
.tab-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.tab-fichas, .tab-fx { position: absolute; inset: 0; pointer-events: none; }
.ficha { position: absolute; width: 7.2%; aspect-ratio: 1; transform: translate(-50%, -62%); transition: left .26s cubic-bezier(.3, .8, .4, 1), top .26s cubic-bezier(.3, .8, .4, 1); }
.ficha img { width: 100%; height: 100%; border-radius: 50%; border: 2.5px solid #fff; box-shadow: 0 5px 0 rgba(0, 0, 0, .35), 0 8px 14px rgba(0, 0, 0, .5); }
.ficha.salta img { animation: salta .26s ease-out; }
.ficha.yo img { border-color: var(--oro); box-shadow: 0 0 0 3px rgba(255, 210, 63, .45), 0 5px 0 rgba(0, 0, 0, .35), 0 8px 14px rgba(0, 0, 0, .5); }
.ficha.turno::after { content: "?"; position: absolute; right: -14%; top: -18%; width: 46%; aspect-ratio: 1; border-radius: 50%; background: linear-gradient(var(--ama), var(--ama2)); color: #3a1c00; font-family: var(--titulo); font-size: clamp(9px, 1.6vw, 17px); display: grid; place-items: center; box-shadow: 0 2px 0 #7a3b00; animation: late 1.2s ease-in-out infinite; }
.ficha.off { opacity: .45; filter: grayscale(.9); }
.ficha:not(.solo):not(.yo) span { display: none; }
.ficha span { position: absolute; left: 50%; top: 104%; transform: translateX(-50%); background: rgba(10, 5, 30, .78); padding: 1px 7px; border-radius: 8px; font-size: clamp(8px, 1.25vw, 13px); font-weight: 600; white-space: nowrap; max-width: 220%; overflow: hidden; text-overflow: ellipsis; }
@keyframes salta { 0% { transform: translateY(0) scale(1); } 45% { transform: translateY(-55%) scale(1.12); } 100% { transform: translateY(0) scale(1); } }
@keyframes late { 50% { transform: scale(1.22); } }
.fx { position: absolute; transform: translate(-50%, -50%); font-family: var(--titulo); font-size: clamp(14px, 2.6vw, 28px); padding: 2px 10px; border-radius: 12px; color: #fff; white-space: nowrap; animation: sube 1.5s ease-out forwards; text-shadow: 0 2px 0 rgba(0, 0, 0, .4); }
.fx.mas { background: var(--si2); } .fx.menos { background: var(--mor2); } .fx.pts { background: var(--ama2); color: #3a1c00; text-shadow: none; }
@keyframes sube { 0% { opacity: 0; transform: translate(-50%, -20%) scale(.5); } 18% { opacity: 1; transform: translate(-50%, -120%) scale(1.15); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -230%) scale(1); } }

.panel { min-height: 0; min-width: 0; display: grid; grid-template-rows: auto auto minmax(0, 1fr); grid-template-columns: minmax(0, 1fr); gap: 10px; }
.marc { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 6px; scrollbar-width: none; }
.marc::-webkit-scrollbar { display: none; }
.mj { position: relative; flex: 0 0 auto; display: flex; align-items: center; gap: 7px; padding: 5px 12px 5px 5px; border-radius: 99px; background: var(--vidrio); border: 2px solid transparent; font-size: 14.5px; font-weight: 600; }
.mj img { width: 34px; height: 34px; border-radius: 50%; }
.mj i { font-style: normal; font-family: var(--titulo); color: var(--oro); font-size: 16px; }
.mj.turno { border-color: var(--ama); background: rgba(255, 203, 46, .16); }
.mj.yo b::after { content: " (tú)"; color: var(--gris); font-weight: 500; }
.mj.off { opacity: .45; }
.mj .ok { position: absolute; left: 26px; top: -3px; width: 18px; height: 18px; border-radius: 50%; background: var(--si); color: #06341a; font-size: 12px; display: grid; place-items: center; font-weight: 700; animation: entra .3s cubic-bezier(.2, 1.6, .4, 1); }
.reloj { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.reloj i { display: block; height: 100%; width: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--si), var(--ama)); transition: width .25s linear; }
.reloj.poco i { background: linear-gradient(90deg, var(--no), var(--ama2)); }
.fase { min-height: 0; overflow-y: auto; padding: 2px 2px 14px; display: grid; gap: 14px; align-content: start; grid-auto-rows: max-content; grid-template-columns: minmax(0, 1fr); scrollbar-width: thin; }
.fase.nuevo > * { animation: aparece .35s ease both; }
@keyframes aparece { from { opacity: 0; transform: translateY(10px); } }
.tit { font-family: var(--titulo); font-weight: 400; font-size: clamp(21px, 5vw, 27px); line-height: 1.1; text-align: center; }
.tit small { display: block; font-family: "Fredoka", sans-serif; font-size: 16px; font-weight: 500; color: var(--gris); margin-top: 5px; }

/* Cartas */
.carta { position: relative; border-radius: 22px; padding: 18px 18px 20px; color: #fff; background: linear-gradient(145deg, var(--c1), var(--c2)); box-shadow: 0 6px 0 var(--c3), 0 16px 30px rgba(0, 0, 0, .35); overflow: hidden; text-align: left; }
.carta::before { content: "¿?"; position: absolute; right: -6px; bottom: -34px; font-family: var(--titulo); font-size: 130px; line-height: 1; color: rgba(255, 255, 255, .13); transform: rotate(-12deg); pointer-events: none; }
.carta .mz { display: inline-block; font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.2px; padding: 3px 10px; border-radius: 99px; background: rgba(0, 0, 0, .22); margin-bottom: 10px; }
.carta p { position: relative; font-weight: 600; font-size: 17px; line-height: 1.28; text-wrap: balance; }
.carta.a { --c1: #56a2ff; --c2: #1f4fd8; --c3: #14358f; }
.carta.m { --c1: #ffd84a; --c2: #ff9416; --c3: #b35a00; color: #3a1c00; }
.carta.m::before { color: rgba(120, 60, 0, .13); } .carta.m .mz { background: rgba(120, 60, 0, .16); }
.carta.r { --c1: #ff7aa2; --c2: #d81b54; --c3: #8a1230; }
.carta.gde { padding: 22px 22px 26px; }
.carta.gde p { font-size: clamp(21px, 5.2vw, 28px); line-height: 1.2; }
.mano { display: grid; gap: 12px; }
.mano-f { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.mano .carta { cursor: pointer; padding: 12px 12px 16px; border-radius: 18px; transition: transform .15s, box-shadow .15s, opacity .15s; min-height: 132px; }
.mano .carta p { font-size: 14.5px; line-height: 1.24; }
.mano .carta .mz { font-size: 10.5px; padding: 2px 8px; margin-bottom: 7px; }
.mano .carta::before { font-size: 80px; bottom: -22px; }
.mano.eli .carta:not(.on) { opacity: .5; }
.mano .carta.on { transform: translateY(-6px) scale(1.03); box-shadow: 0 0 0 4px #fff, 0 6px 0 var(--c3), 0 18px 30px rgba(0, 0, 0, .45); }
.mano.ver .carta { cursor: default; opacity: .8; }
@media (max-width: 560px) { .mano-f { grid-template-columns: 1fr; } .mano .carta { min-height: 0; } .mano .carta p { font-size: 16px; } }
.pie { position: sticky; bottom: 0; padding-top: 6px; background: linear-gradient(transparent, var(--fondo) 40%); }

.espera { display: grid; justify-items: center; gap: 14px; padding: 18px 0; text-align: center; }
.espera img { width: 112px; height: 112px; border-radius: 50%; border: 4px solid #fff; box-shadow: 0 0 0 6px rgba(255, 203, 46, .35), 0 14px 30px rgba(0, 0, 0, .5); animation: flota 2.4s ease-in-out infinite; }
.puntos i { display: inline-block; width: 9px; height: 9px; margin: 0 3px; border-radius: 50%; background: var(--ama); animation: punto 1s infinite; }
.puntos i:nth-child(2) { animation-delay: .15s; } .puntos i:nth-child(3) { animation-delay: .3s; }
@keyframes punto { 0%, 100% { transform: translateY(0); opacity: .4; } 40% { transform: translateY(-8px); opacity: 1; } }

/* Votar */
.sn { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sn button { height: 92px; border-radius: 22px; font-family: var(--titulo); font-size: 40px; color: #fff; transition: transform .1s, box-shadow .1s, opacity .15s, filter .15s; }
.sn .s { background: linear-gradient(var(--si), var(--si2)); box-shadow: 0 7px 0 #0a6a31; }
.sn .n { background: linear-gradient(var(--no), var(--no2)); box-shadow: 0 7px 0 #8a1230; }
.sn button:active { transform: translateY(5px); }
.sn.eli button:not(.on) { opacity: .45; filter: saturate(.6); }
.sn button.on { box-shadow: 0 0 0 4px #fff, 0 7px 0 rgba(0, 0, 0, .4); transform: scale(1.03); }
.preg-ap { text-align: center; font-weight: 600; font-size: 18px; }
.preg-ap small { display: block; font-weight: 500; color: var(--gris); font-size: 14.5px; }
.nums { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; }
.nums button { width: 54px; height: 54px; border-radius: 16px; background: var(--vidrio2); font-family: var(--titulo); font-size: 24px; box-shadow: 0 4px 0 rgba(0, 0, 0, .35); transition: transform .1s; }
.nums button.on { background: #fff; color: #23104f; transform: scale(1.12); }
.mio { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 8px 15px; border-radius: 99px; background: var(--vidrio2); font-weight: 600; }
.chip.s { background: var(--si2); } .chip.n { background: var(--no2); }

/* Revelar */
.rev { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 10px; }
.rv { display: grid; justify-items: center; gap: 5px; text-align: center; font-size: 14px; font-weight: 600; }
.rv .cara { position: relative; width: 66px; height: 66px; perspective: 400px; }
.rv .giro { position: absolute; inset: 0; transition: transform .5s cubic-bezier(.3, 1.4, .5, 1); transform-style: preserve-3d; }
.rv .giro > * { position: absolute; inset: 0; border-radius: 50%; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.rv img { width: 100%; height: 100%; border-radius: 50%; border: 3px solid #fff; }
.rv .res { transform: rotateY(180deg); display: grid; place-items: center; font-family: var(--titulo); font-size: 23px; border: 3px solid #fff; }
.rv.s .res { background: linear-gradient(var(--si), var(--si2)); } .rv.n .res { background: linear-gradient(var(--no), var(--no2)); } .rv.x .res { background: #4b4270; font-size: 17px; }
.rv.vis .giro { transform: rotateY(180deg); }
.rv .ap { font-size: 13px; color: var(--gris); font-weight: 500; opacity: 0; transition: opacity .3s; }
.rv .pt { font-family: var(--titulo); font-size: 15px; padding: 1px 10px; border-radius: 99px; background: var(--vidrio2); color: var(--gris); opacity: 0; transform: scale(.4); transition: all .35s cubic-bezier(.2, 1.7, .4, 1); }
.rv .pt.g { background: linear-gradient(var(--ama), var(--ama2)); color: #3a1c00; }
.rv.fin .ap { opacity: 1; } .rv.fin .pt { opacity: 1; transform: scale(1); }
.cuenta { text-align: center; opacity: 0; transform: scale(.7); transition: all .4s cubic-bezier(.2, 1.6, .4, 1); }
.cuenta.vis { opacity: 1; transform: scale(1); }
.cuenta .num { font-family: var(--titulo); font-size: 58px; line-height: 1; color: var(--si); text-shadow: 0 4px 0 #0a6a31; }
.cuenta .barra-sn { display: flex; height: 16px; border-radius: 99px; overflow: hidden; background: var(--no2); margin: 10px auto 0; max-width: 320px; }
.cuenta .barra-sn i { background: linear-gradient(90deg, var(--si2), var(--si)); transition: width .8s cubic-bezier(.2, .9, .3, 1); width: 0; }
.bono { text-align: center; font-weight: 600; opacity: 0; transition: opacity .4s; }
.bono.vis { opacity: 1; }
.bono b { color: var(--oro); }

/* Final */
.podio { display: flex; align-items: flex-end; justify-content: center; gap: 10px; padding-top: 8px; }
.pd { display: grid; justify-items: center; gap: 6px; width: 31%; max-width: 130px; font-weight: 600; font-size: 15px; text-align: center; }
.pd img { width: 70%; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 8px 18px rgba(0, 0, 0, .45); }
.pd .base { width: 100%; border-radius: 14px 14px 0 0; display: grid; place-items: center; font-family: var(--titulo); font-size: 30px; color: #3a1c00; }
.pd.p1 .base { height: 96px; background: linear-gradient(#ffe680, #ffb91f); } .pd.p1 img { width: 86%; border-color: var(--oro); box-shadow: 0 0 0 5px rgba(255, 210, 63, .35), 0 8px 18px rgba(0, 0, 0, .45); }
.pd.p2 .base { height: 66px; background: linear-gradient(#e8ecf5, #a9b2c7); } .pd.p3 .base { height: 46px; background: linear-gradient(#f0b27c, #b96a2c); }
.lista { display: grid; gap: 6px; }
.lista div { display: flex; align-items: center; gap: 10px; padding: 7px 12px; border-radius: 14px; background: var(--vidrio); font-weight: 600; }
.lista img { width: 32px; height: 32px; border-radius: 50%; } .lista span { margin-left: auto; font-family: var(--titulo); color: var(--oro); }
#confeti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 40; }

/* Reacciones */
.reacs { display: flex; justify-content: center; gap: 6px; padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); }
.reacs button { width: 42px; height: 42px; border-radius: 50%; background: var(--vidrio); font-size: 22px; transition: transform .12s; }
.reacs button:active { transform: scale(1.35); }
.vuela { position: fixed; bottom: 60px; z-index: 30; display: flex; align-items: center; gap: 4px; font-size: 38px; pointer-events: none; animation: vuela 2.6s ease-out forwards; }
.vuela img { width: 30px; height: 30px; border-radius: 50%; border: 2px solid #fff; }
@keyframes vuela { 0% { transform: translateY(0) scale(.4); opacity: 0; } 12% { transform: translateY(-40px) scale(1.2); opacity: 1; } 100% { transform: translateY(-62vh) scale(1); opacity: 0; } }

/* Ventanas y avisos */
.velo { position: fixed; inset: 0; z-index: 50; background: rgba(8, 4, 24, .72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: grid; place-items: center; padding: 16px; animation: aparece .2s ease; }
.modal { width: 100%; max-width: 480px; max-height: 88dvh; overflow-y: auto; background: #241552; border: 1px solid var(--linea); border-radius: 26px; padding: 22px; display: grid; gap: 14px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }
.modal h2 { font-family: var(--titulo); font-weight: 400; font-size: 26px; }
.pasos { display: grid; gap: 11px; padding: 0; margin: 0; list-style: none; counter-reset: p; }
.pasos li { display: grid; grid-template-columns: 34px 1fr; gap: 11px; align-items: start; line-height: 1.3; font-size: 16.5px; }
.pasos li::before { counter-increment: p; content: counter(p); width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(var(--ama), var(--ama2)); color: #3a1c00; font-family: var(--titulo); display: grid; place-items: center; }
.pasos b { color: var(--oro); }
.fila { display: flex; align-items: center; gap: 10px; }
.fila img { width: 38px; height: 38px; border-radius: 50%; } .fila .sp { flex: 1; font-weight: 600; }
.aviso { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); z-index: 60; background: #fff; color: #23104f; font-weight: 600; padding: 12px 20px; border-radius: 16px; box-shadow: 0 14px 34px rgba(0, 0, 0, .5); animation: aparece .25s ease; max-width: calc(100vw - 32px); text-align: center; }
.aviso.mal { background: var(--no); color: #fff; }

@media (max-width: 520px) {
  .barra { gap: 6px; padding: 8px 10px; } .logo.ch { font-size: 19px; } .pill { height: 34px; padding: 0 10px; font-size: 14px; } .ico { width: 34px; height: 34px; }
  .reacs { gap: 3px; } .reacs button { width: 38px; height: 38px; font-size: 20px; }
  .sn button { height: 76px; font-size: 34px; } .nums button { width: 48px; height: 48px; font-size: 21px; }
  .ficha { width: 8.4%; }
}

/* ── Dado de colores ── */
.dado-res { display: flex; align-items: center; justify-content: center; gap: 14px; }
.dado-res b { display: block; font-family: var(--titulo); font-size: 24px; line-height: 1.1; } .dado-res small { color: var(--gris); font-size: 15px; }
.dado { --d1: #3b4257; --d2: #1b1f2b; position: relative; flex: 0 0 auto; width: 76px; height: 76px; border-radius: 18px; background: linear-gradient(145deg, var(--d1), var(--d2)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .3), 0 6px 0 rgba(0, 0, 0, .5), 0 14px 26px rgba(0, 0, 0, .5); }
.dado.a { --d1: #3a78f2; --d2: #162f86; } .dado.m { --d1: #f3cf6e; --d2: #c08a24; } .dado.r { --d1: #e2496b; --d2: #8c1535; }
.dado i { position: absolute; width: 13px; height: 13px; border-radius: 50%; background: rgba(255, 255, 255, .92); box-shadow: inset 0 -2px 2px rgba(0, 0, 0, .25); }
.dado i:nth-child(1) { left: 14px; top: 14px; } .dado i:nth-child(2) { right: 14px; top: 14px; } .dado i:nth-child(3) { left: 50%; top: 50%; transform: translate(-50%, -50%); } .dado i:nth-child(4) { left: 14px; bottom: 14px; } .dado i:nth-child(5) { right: 14px; bottom: 14px; }
.dado.rueda { animation: rueda 1.1s cubic-bezier(.3, .7, .3, 1); }
@keyframes rueda { 0% { transform: rotate(0) scale(.7); --d1: #3a78f2; --d2: #162f86; } 20% { --d1: #f3cf6e; --d2: #c08a24; } 40% { transform: rotate(400deg) scale(1.15); --d1: #e2496b; --d2: #8c1535; } 60% { --d1: #3a78f2; --d2: #162f86; } 80% { --d1: #f3cf6e; --d2: #c08a24; } 100% { transform: rotate(720deg) scale(1); } }
.dado.rueda + div { animation: aparece .4s ease 1s both; }
.tirar { display: grid; place-items: center; padding: 26px 0; }
.tirar .dado { width: 120px; height: 120px; border-radius: 28px; animation: flota 2.4s ease-in-out infinite; }
.tirar .dado.rueda { animation: rueda 1.1s cubic-bezier(.3, .7, .3, 1) infinite; }
.tirar .dado i { width: 20px; height: 20px; } .tirar .dado i:nth-child(1), .tirar .dado i:nth-child(4) { left: 22px; } .tirar .dado i:nth-child(2), .tirar .dado i:nth-child(5) { right: 22px; } .tirar .dado i:nth-child(1), .tirar .dado i:nth-child(2) { top: 22px; } .tirar .dado i:nth-child(4), .tirar .dado i:nth-child(5) { bottom: 22px; }
.mano.tarde { animation: aparece .45s ease 1.1s both; }

/* ── Tema de lujo: negro y azul noche con dorado, títulos en serif ── */
:root { --fondo: #0a0c11; --vidrio: rgba(255, 255, 255, .05); --vidrio2: rgba(255, 255, 255, .1); --linea: rgba(226, 194, 117, .22); --gris: rgba(255, 255, 255, .62);
  --ama: #f3d98c; --ama2: #c9973a; --si: #27c07a; --si2: #0d7a49; --no: #e04a64; --no2: #96203a; --oro: #e2c275; --mor: #3b4257; --mor2: #232838; --titulo: "Playfair Display", Georgia, serif; }
body { font-family: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif; background-image: radial-gradient(900px 600px at 10% -10%, #1a2a52aa, transparent 60%), radial-gradient(800px 600px at 105% 5%, #4a371077, transparent 60%), radial-gradient(900px 700px at 50% 120%, #0c3a2c66, transparent 60%); }
.logo, .cod-l, .tit, .modal h2, .sn button, .nums button, .cuenta .num, .pd .base, .rv .res, .rv .pt, .mj i, .pill b, .invit b, .fx, .unir input, .pasos li::before, .lista span, .ficha.turno::after, .carta::before { font-weight: 800; }
.tit small, .preg-ap small { font-family: "Outfit", sans-serif; }
.logo { transform: rotate(-2deg); font-style: italic; letter-spacing: 0; }
.logo .l1 { background: linear-gradient(#f8e7b0, #c9973a); -webkit-background-clip: text; background-clip: text; filter: drop-shadow(0 .04em 0 #5a3d0a) drop-shadow(0 .1em .15em rgba(0, 0, 0, .6)); padding-right: .06em; }
.logo .l2 { background: none; color: var(--oro); border: .06em solid var(--oro); border-radius: .22em; box-shadow: 0 .12em .3em rgba(0, 0, 0, .5); text-shadow: none; padding: 0 .26em .08em; transform: rotate(4deg); }
.btn.pri { background: linear-gradient(#f3d98c, #c9973a); color: #1d1503; box-shadow: 0 5px 0 #7a5716, 0 12px 24px rgba(201, 151, 58, .2); }
.btn.mor { background: linear-gradient(#3b4257, #232838); box-shadow: 0 5px 0 #0c0f17, inset 0 0 0 1px var(--linea); }
.modal { background: #131722; }
.seg button.on, .nums button.on { background: var(--oro); color: #1d1503; border-color: var(--oro); }
.aviso { color: #111; }
.cod-l { text-shadow: 0 3px 0 #5a3d0a, 0 10px 24px rgba(226, 194, 117, .25); }
.carta.a { --c1: #3a78f2; --c2: #162f86; --c3: #0c1b52; } .carta.m { --c1: #f3cf6e; --c2: #c08a24; --c3: #74510f; color: #1d1503; } .carta.r { --c1: #e2496b; --c2: #8c1535; --c3: #520a1e; }
.carta { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .3), inset 0 0 0 6px rgba(0, 0, 0, .07), 0 6px 0 var(--c3), 0 16px 30px rgba(0, 0, 0, .45); }
.carta p { font-weight: 500; }
.mano .carta.on { box-shadow: 0 0 0 3px var(--oro), 0 6px 0 var(--c3), 0 18px 30px rgba(0, 0, 0, .5); }
.tab { background-color: #0c1020; box-shadow: 0 18px 50px rgba(0, 0, 0, .6), inset 0 0 0 1px rgba(226, 194, 117, .35); }
.ficha img, .jg img, .mj img, .espera img, .rv img, .pd img, .lista img, .fila img, .av img, .flota { background: #0d1016; object-fit: cover; }
.ficha img { border: 2px solid var(--oro); } .ficha.yo img { border-color: #fff; box-shadow: 0 0 0 3px rgba(226, 194, 117, .7), 0 5px 0 rgba(0, 0, 0, .35), 0 8px 14px rgba(0, 0, 0, .5); }
.jg img, .rv img, .pd img { border: 2px solid var(--oro); } .flota { border: 2px solid var(--oro); }
.espera img { border: 3px solid var(--oro); box-shadow: 0 0 0 6px rgba(226, 194, 117, .16), 0 14px 30px rgba(0, 0, 0, .6); }
.av.on { border-color: var(--oro); } .mj.turno { border-color: var(--oro); background: rgba(226, 194, 117, .14); } .jg.yo { border-color: var(--oro); background: rgba(226, 194, 117, .1); }
.cuenta .num { text-shadow: 0 3px 0 #064d2c; } .pasos li::before, .ficha.turno::after, .rv .pt.g, .fx.pts, .pd .base { color: #1d1503; }
.fx.menos { background: #3b4257; } .rv.x .res { background: #3b4257; }
.logo { font-style: normal; }
.ficha { width: 8.6%; }
@media (max-width: 520px) { .ficha { width: 10%; } }
.av { opacity: .9; }

/* ── Dado de colores en 3D: dos caras azules, dos amarillas y dos rojas (sin números) ── */
.dado3 { --t: 76px; --fx: -20deg; --fy: 28deg; display: inline-block; flex: 0 0 auto; width: var(--t); height: var(--t); perspective: 700px; filter: drop-shadow(0 14px 12px rgba(0, 0, 0, .55)); }
.dado3.a { --fx: -14deg; --fy: 14deg; } .dado3.m { --fx: -14deg; --fy: -76deg; } .dado3.r { --fx: -76deg; --fy: 0deg; }
.cubo { position: relative; display: block; width: 100%; height: 100%; transform-style: preserve-3d; transform: rotateX(var(--fx)) rotateY(var(--fy)); }
.cubo i { position: absolute; inset: 0; border-radius: 16%; background: linear-gradient(145deg, var(--k1), var(--k2)); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .38), inset 0 0 calc(var(--t) / 4) rgba(0, 0, 0, .35); backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.cubo i:nth-child(1), .cubo i:nth-child(2) { --k1: #4a86ff; --k2: #162f86; } .cubo i:nth-child(3), .cubo i:nth-child(4) { --k1: #f8dd8a; --k2: #c08a24; } .cubo i:nth-child(5), .cubo i:nth-child(6) { --k1: #ee5878; --k2: #8c1535; }
.cubo i:nth-child(1) { transform: translateZ(calc(var(--t) / 2)); } .cubo i:nth-child(2) { transform: rotateY(180deg) translateZ(calc(var(--t) / 2)); }
.cubo i:nth-child(3) { transform: rotateY(90deg) translateZ(calc(var(--t) / 2)); } .cubo i:nth-child(4) { transform: rotateY(-90deg) translateZ(calc(var(--t) / 2)); }
.cubo i:nth-child(5) { transform: rotateX(90deg) translateZ(calc(var(--t) / 2)); } .cubo i:nth-child(6) { transform: rotateX(-90deg) translateZ(calc(var(--t) / 2)); }
.dado3:not(.a):not(.m):not(.r) .cubo { animation: giro 7s linear infinite; }
.dado3.gira .cubo { animation: giro .55s linear infinite !important; }
.dado3.rueda .cubo { animation: cae 1.15s cubic-bezier(.2, .7, .25, 1); }
.dado3.rueda + div { animation: aparece .4s ease 1.05s both; }
@keyframes giro { from { transform: rotateX(-20deg) rotateY(0); } 50% { transform: rotateX(200deg) rotateY(180deg); } to { transform: rotateX(340deg) rotateY(360deg); } }
@keyframes cae { from { transform: rotateX(calc(var(--fx) - 720deg)) rotateY(calc(var(--fy) + 540deg)) scale3d(.55, .55, .55); } }
.tirar .dado3 { --t: 124px; }

/* ── Página de presentación ── */
.port { max-width: 1160px; margin: 0 auto; padding: 0 20px 30px; }
.p-nav { display: flex; align-items: center; gap: 8px; padding: 16px 0; }
.p-nav .sp { flex: 1; }
.p-hero { display: grid; gap: 34px; align-items: center; padding: 26px 0 46px; }
@media (min-width: 900px) { .p-hero { grid-template-columns: 1fr 1.08fr; padding: 54px 0 76px; } }
.p-sobre { color: var(--oro); font-weight: 600; font-size: 14.5px; letter-spacing: 1.6px; text-transform: uppercase; }
.p-hero h1 { font-family: var(--titulo); font-weight: 800; font-size: clamp(38px, 7.4vw, 66px); line-height: 1.04; margin: 12px 0 16px; text-wrap: balance; }
.p-sub { font-size: clamp(17px, 2.4vw, 20px); line-height: 1.45; color: rgba(255, 255, 255, .8); max-width: 520px; }
.p-sub b { color: #fff; }
.p-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 14px; }
.p-nota { color: var(--gris); font-size: 15px; }
.p-vis { position: relative; padding: 0 0 6% 0; }
.p-pc { width: 100%; height: auto; border-radius: 16px; border: 1px solid var(--linea); box-shadow: 0 30px 80px rgba(0, 0, 0, .7), 0 0 0 6px rgba(255, 255, 255, .03); }
.p-cel { position: absolute; right: -2%; bottom: 0; width: 25%; height: auto; border-radius: 18px; border: 3px solid #1c2130; box-shadow: 0 24px 50px rgba(0, 0, 0, .75); }
.p-sec { padding: 46px 0; border-top: 1px solid rgba(255, 255, 255, .07); }
.p-sec > h2 { font-family: var(--titulo); font-weight: 800; font-size: clamp(27px, 4.6vw, 38px); text-align: center; margin-bottom: 28px; }
.p-pasos { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.p-pasos li, .p-datos > div { background: var(--vidrio); border: 1px solid var(--linea); border-radius: 20px; padding: 20px; }
.p-pasos .n { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(#f3d98c, #c9973a); color: #1d1503; font-family: var(--titulo); font-weight: 800; font-size: 19px; margin-bottom: 12px; }
.p-pasos h3, .p-datos h3 { font-size: 18.5px; font-weight: 600; margin-bottom: 6px; }
.p-pasos p, .p-datos p { color: var(--gris); font-size: 16px; line-height: 1.42; }
.p-cartas { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-bottom: 18px; }
.p-cartas .carta { padding: 20px 20px 26px; min-height: 170px; } .p-cartas .carta p { font-size: 20px; line-height: 1.25; }
.p-cartas .carta:nth-child(1) { transform: rotate(-1.5deg); } .p-cartas .carta:nth-child(3) { transform: rotate(1.5deg); }
.p-datos { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.p-fichas { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 30px 0 12px; }
.p-fichas img { width: 68px; height: 68px; border-radius: 50%; border: 2px solid var(--oro); background: #0d1016; }
.p-jugar { display: grid; justify-items: center; }
.p-jugar .tarjeta { width: 100%; max-width: 460px; display: grid; gap: 16px; }
.p-faq { max-width: 760px; margin: 0 auto; }
.p-faq details { border-bottom: 1px solid rgba(255, 255, 255, .1); padding: 16px 0; }
.p-faq summary { cursor: pointer; font-weight: 600; font-size: 18px; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.p-faq summary::after { content: "+"; color: var(--oro); font-size: 22px; line-height: 1; } .p-faq details[open] summary::after { content: "−"; }
.p-faq summary::-webkit-details-marker { display: none; }
.p-faq details p { color: var(--gris); margin-top: 10px; line-height: 1.45; }
.p-pie { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 26px 0 10px; border-top: 1px solid rgba(255, 255, 255, .07); color: var(--gris); font-size: 15px; }
@media (max-width: 560px) { .p-nav .link { display: none; } .p-cta .btn { flex: 1 1 100%; } }

/* ── Tablero «Vuelta al mundo»: mapa nocturno, ruta numerada y fichas como alfileres de mapa ── */
.tab { background: #070b18 url(/img/mundo.webp) center/cover; }
.tab::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(4, 7, 16, .12), rgba(4, 7, 16, .5)); pointer-events: none; }
.tab-svg, .tab-fichas, .tab-fx { z-index: 1; }
.tab-svg .ruta { animation: ruta 1.6s linear infinite; }
@keyframes ruta { to { stroke-dashoffset: -14; } }
.tab-svg .halo { animation: halo 1.8s ease-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes halo { from { opacity: .9; transform: scale(.7); } to { opacity: 0; transform: scale(1.25); } }
.ficha { width: 7.4%; transform: translate(-50%, -118%); filter: drop-shadow(0 6px 5px rgba(0, 0, 0, .6)); }
.ficha::before { content: ""; position: absolute; left: 50%; top: 88%; width: 34%; aspect-ratio: 1; background: var(--oro); transform: translateX(-50%) rotate(45deg); border-radius: 0 0 22% 0; z-index: -1; }
.ficha img { box-shadow: none; border: 2.5px solid var(--oro); position: relative; }
.ficha.yo::before { background: #fff; } .ficha.yo img { border-color: #fff; box-shadow: 0 0 0 3px rgba(226, 194, 117, .85); }
.ficha.salta { animation: brinco .28s ease-out; } .ficha.salta img { animation: none; }
@keyframes brinco { 0%, 100% { transform: translate(-50%, -118%); } 45% { transform: translate(-50%, -170%) scale(1.1); } }
.ficha span { top: auto; bottom: 108%; font-size: clamp(8px, 1.2vw, 13px); background: rgba(6, 9, 18, .88); border: 1px solid var(--linea); }
.ficha.turno::after { right: -16%; top: -14%; }
.ficha.senal { animation: senal .55s ease-in-out 4; z-index: 9999 !important; } .ficha.senal span { display: block !important; }
@keyframes senal { 0%, 100% { transform: translate(-50%, -118%) scale(1); } 50% { transform: translate(-50%, -150%) scale(1.45); } }
.mj { cursor: pointer; } .mj i small { font-family: "Outfit", sans-serif; font-weight: 500; font-size: 12px; color: var(--gris); }
@media (max-width: 520px) { .ficha { width: 9%; } }
.logo .l2 { padding: 0 .3em .06em; margin-left: .04em; }
