/* ==========================================================
   Pantallas de juego (dentro del tótem) — unidades cqw
   Los colores y la tipografía vienen de la marca de cada demo
   (variables --g-* que pone js/games.js).
   ========================================================== */
.scr {
  --g-bg: #F1E978; --g-fg: #17160F; --g-line: #17160F;
  --g-btn: #17160F; --g-btn-fg: #F1E978;
  --g-acc: #F1E978; --g-acc-fg: #17160F;
  --g-card: #FFFFFF; --g-card-fg: #17160F;
  --g-dark: #17160F; --g-dark-fg: #F1E978;
  --g-rays: rgba(255, 255, 255, .3);
  --g-head: var(--font-chunk, 'Arial Narrow', sans-serif);
  --g-red: #E5383B; --g-blue: #0057FF;
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  background: var(--g-bg); color: var(--g-fg);
  font-family: var(--font, sans-serif); font-size: 4.2cqw; line-height: 1.3;
  overflow: hidden; overflow: clip;
  user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent;
}
.scr button { font-family: inherit; color: inherit; cursor: pointer; }
.scr-rays { position: absolute; inset: -60%; z-index: 0; background: repeating-conic-gradient(var(--g-rays) 0 7deg, transparent 7deg 18deg); animation: spin 50s linear infinite; pointer-events: none; }
.scr > *:not(.scr-rays) { position: relative; z-index: 1; }

/* ----- Botones y piezas comunes ----- */
.scr-btn {
  border: .6cqw solid var(--g-line); background: var(--g-btn); color: var(--g-btn-fg) !important;
  font-weight: 800; font-size: 4.2cqw; letter-spacing: .04em;
  padding: 3cqw 8cqw; border-radius: 99px;
  box-shadow: 0 1cqw 0 color-mix(in srgb, var(--g-line) 60%, transparent);
  transition: transform .2s cubic-bezier(.34, 1.56, .64, 1), box-shadow .2s;
}
.scr-btn:active { transform: translateY(1cqw); box-shadow: none; }
.scr-btn.alt { background: var(--g-card); color: var(--g-card-fg) !important; }
.scr-btn[disabled] { opacity: .4; pointer-events: none; }
.g-big { font-size: 5cqw; padding: 3.4cqw 12cqw; }
.g-icon { flex: none; width: 9cqw; height: 9cqw; border-radius: 50%; border: .5cqw solid var(--g-line); background: var(--g-card); color: var(--g-card-fg) !important; font-size: 3.8cqw; display: grid; place-items: center; padding: 0; line-height: 1; }
.g-chip { border: .5cqw solid var(--g-line); background: var(--g-card); color: var(--g-card-fg) !important; border-radius: 99px; padding: 1.6cqw 4cqw; font-weight: 800; font-size: 3.4cqw; }

/* ----- Cabecera con el logo de la marca ----- */
.g-top { display: flex; align-items: center; justify-content: space-between; gap: 2cqw; padding: 4cqw 4.5cqw 1cqw; }
.g-logo { display: inline-flex; align-items: center; gap: 1.6cqw; font-family: var(--g-head); font-size: 5cqw; line-height: 1; letter-spacing: .01em; }
.g-logo i { font-style: normal; display: grid; place-items: center; width: 8cqw; height: 8cqw; border-radius: 50%; background: var(--g-card); color: var(--g-card-fg); font-size: 4.4cqw; border: .4cqw solid var(--g-line); }

/* ----- Inicio ----- */
.g-intro-body { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; align-items: center; justify-content: safe center; gap: 3.4cqw; padding: 2cqw 7cqw; text-align: center; }
.g-cat { font-size: 2.8cqw; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; opacity: .7; }
.g-title { margin: 0; font-family: var(--g-head); font-weight: 800; font-size: 11cqw; line-height: .95; text-transform: uppercase; text-align: center; }
.g-title span { display: inline-block; background: var(--g-dark); color: var(--g-dark-fg); padding: .02em .18em .06em; margin-top: .1em; border-radius: 2cqw; transform: rotate(-2deg); }
.g-how { list-style: none; counter-reset: how; padding: 0; margin: 0; width: 100%; display: grid; gap: 1.8cqw; text-align: left; }
.g-how li { counter-increment: how; display: flex; gap: 2.6cqw; align-items: flex-start; background: var(--g-card); color: var(--g-card-fg); border-radius: 3cqw; padding: 2.4cqw 3cqw; font-size: 3.5cqw; font-weight: 600; box-shadow: 0 .8cqw 0 color-mix(in srgb, var(--g-line) 25%, transparent); }
.g-how li::before { content: counter(how); flex: none; width: 5.6cqw; height: 5.6cqw; border-radius: 50%; background: var(--g-dark); color: var(--g-dark-fg); display: grid; place-items: center; font-weight: 900; font-size: 3cqw; }
.g-box { width: 100%; background: var(--g-card); color: var(--g-card-fg); border: .5cqw solid var(--g-line); border-radius: 4cqw; padding: 3cqw; }
.g-box-t { font-weight: 900; font-size: 3.4cqw; margin-bottom: 1.6cqw; }
.g-prizes { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.4cqw; }
.g-prizes span { display: inline-flex; align-items: center; gap: 1cqw; background: var(--g-acc); color: var(--g-acc-fg); border-radius: 99px; padding: .8cqw 2.4cqw; font-size: 3cqw; font-weight: 700; }
.g-prizes small { background: var(--g-dark); color: var(--g-dark-fg); border-radius: 99px; padding: 0 1.4cqw; font-size: 2.4cqw; font-weight: 800; }
.g-prizes .out { opacity: .4; text-decoration: line-through; }
.g-mini { font-size: 2.8cqw; margin-top: 1.6cqw; opacity: .8; }
.g-link { border: 0; background: none; text-decoration: underline; font-size: inherit; padding: 0; }
.g-board { list-style: none; padding: 0; margin: 0; display: grid; gap: 1cqw; }
.g-board li { display: flex; justify-content: space-between; gap: 2cqw; font-size: 3.4cqw; font-weight: 700; }
.g-foot { display: flex; justify-content: center; padding: 3cqw 6cqw 6cqw; }
.g-foot-2 { flex-direction: column; align-items: stretch; gap: 2.2cqw; padding-top: 2cqw; }
.g-foot-2 .scr-btn { font-size: 3.8cqw; padding: 2.6cqw 3cqw; }

/* ----- Cuenta atrás ----- */
.g-count { position: absolute !important; inset: 0; z-index: 30 !important; display: grid; place-items: center; background: color-mix(in srgb, var(--g-dark) 88%, transparent); }
.g-count b { font-family: var(--g-head); font-weight: 800; font-size: 32cqw; color: var(--g-dark-fg); line-height: 1; animation: countPop .6s cubic-bezier(.34, 1.56, .64, 1); }
@keyframes countPop { from { transform: scale(.3); opacity: 0; } }

/* ----- Partida ----- */
.g-hud { display: grid; grid-template-columns: auto 1fr 1fr auto; align-items: center; gap: 2.4cqw; padding: 4cqw 4.5cqw 2cqw; }
.g-stat { display: flex; flex-direction: column; line-height: 1; }
.g-stat small { font-size: 2.4cqw; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; opacity: .65; }
.g-stat b { font-family: var(--g-head); font-weight: 800; font-size: 7cqw; margin-top: .6cqw; }
.g-stat b .dim { opacity: .2; }
.g-stat-r { text-align: right; }
.g-stat.hide { visibility: hidden; }
.g-stat b.bump { animation: bump .3s cubic-bezier(.34, 1.56, .64, 1); }
@keyframes bump { 50% { transform: scale(1.25); } }
.g-bar { height: 1.6cqw; margin: 0 4.5cqw; border-radius: 99px; background: color-mix(in srgb, var(--g-fg) 15%, transparent); overflow: hidden; opacity: 0; }
.g-bar.on { opacity: 1; }
.g-bar span { display: block; height: 100%; background: var(--g-fg); transform-origin: left; border-radius: 99px; }
.g-bar.warn span { background: var(--g-red); }
.g-arena { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3cqw; padding: 2cqw 4cqw 5cqw; position: relative; }
.g-float { position: absolute; z-index: 20; transform: translate(-50%, -50%); font-family: var(--g-head); font-weight: 800; font-size: 6cqw; white-space: nowrap; pointer-events: none; color: var(--g-dark-fg); background: var(--g-dark); padding: 0 2cqw; border-radius: 2cqw; animation: floatUp .8s ease-out forwards; }
.g-float.neg { background: var(--g-red); color: #fff; }
@keyframes floatUp { to { transform: translate(-50%, -160%); opacity: 0; } }
.g-hint { font-size: 3.8cqw; font-weight: 800; text-align: center; min-height: 5cqw; }
.shake { animation: gShake .3s; }
@keyframes gShake { 25% { transform: translateX(-2cqw); } 75% { transform: translateX(2cqw); } }

/* ----- Resultado ----- */
.g-res-body { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; align-items: center; justify-content: safe center; gap: 2.6cqw; padding: 2cqw 6cqw; text-align: center; }
.g-burst { flex: none; width: 26cqw; height: 26cqw; display: grid; place-items: center; clip-path: var(--burst); background: var(--g-dark); font-size: 11cqw; animation: spin 14s linear infinite; }
.g-burst > span { animation: spin 14s linear infinite reverse; }
.g-burst.lose { background: var(--g-card); }
.g-ticket { width: 92%; display: grid; gap: 1.2cqw; justify-items: center; background: var(--g-card); color: var(--g-card-fg); border: .6cqw dashed var(--g-line); border-radius: 4cqw; padding: 3.4cqw; }
.g-ticket small { font-size: 2.8cqw; font-weight: 700; opacity: .75; }
.g-ticket b { font-family: var(--g-head); font-weight: 800; font-size: 8.4cqw; line-height: 1; text-transform: uppercase; }
.g-code { font-family: ui-monospace, Menlo, monospace; font-weight: 800; font-size: 5cqw; letter-spacing: .12em; background: var(--g-dark); color: var(--g-dark-fg); padding: 1.2cqw 3.4cqw; border-radius: 2cqw; }
.g-score { display: flex; flex-direction: column; align-items: center; line-height: .9; }
.g-score b { font-family: var(--g-head); font-weight: 800; font-size: 22cqw; }
.g-score small { font-weight: 800; font-size: 3cqw; letter-spacing: .14em; text-transform: uppercase; }
.g-record { background: var(--g-acc); color: var(--g-acc-fg); font-weight: 800; font-size: 3.4cqw; padding: 1cqw 3.4cqw; border-radius: 99px; animation: bump .5s 2; }
.g-msg { font-size: 3.8cqw; font-weight: 600; }
.g-save { display: flex; gap: 2cqw; width: 100%; }
.g-save input { flex: 1; min-width: 0; font: inherit; font-size: 3.8cqw; font-weight: 700; padding: 2.2cqw 3cqw; border: .5cqw solid var(--g-line); border-radius: 99px; background: var(--g-card); color: var(--g-card-fg); }
.g-save input:focus { outline: .6cqw solid var(--g-acc); outline-offset: .4cqw; }
.g-save .scr-btn { padding: 2.2cqw 4cqw; font-size: 3.4cqw; }
.g-saved { font-weight: 800; font-size: 3.6cqw; width: 100%; }
.g-board-full { width: 100%; }
.g-board-full li { align-items: center; background: var(--g-card); color: var(--g-card-fg); border-radius: 2.4cqw; padding: 1.4cqw 2.6cqw; }
.g-board-full li i { font-style: normal; width: 5cqw; height: 5cqw; border-radius: 50%; display: grid; place-items: center; background: var(--g-dark); color: var(--g-dark-fg); font-size: 2.6cqw; }
.g-board-full li span { flex: 1; text-align: left; }
.g-board-full li.me { background: var(--g-acc); color: var(--g-acc-fg); }

/* ----- Ruleta ----- */
.wheel-wrap { position: relative; width: 78cqw; aspect-ratio: 1; touch-action: none; cursor: grab; }
.wheel { width: 100%; height: 100%; filter: drop-shadow(0 2cqw 2cqw rgba(0, 0, 0, .25)); }
.wheel text { font-family: var(--font, sans-serif); font-weight: 800; font-size: 8px; }
.wheel-pin { position: absolute; left: 50%; top: -3cqw; width: 9cqw; height: 12cqw; transform: translateX(-50%); z-index: 2; filter: drop-shadow(0 1cqw 1cqw rgba(0, 0, 0, .3)); }
.wheel-pin.tick { animation: tick .12s; }
@keyframes tick { 50% { transform: translateX(-50%) rotate(-14deg); } }
.wheel-hub { position: absolute; inset: 41%; clip-path: var(--burst); background: var(--g-dark); display: grid; place-items: center; }
.wheel-hub::after { content: ""; width: 55%; height: 55%; border-radius: 50%; background: var(--g-acc); }
.wheel .bulb { fill: var(--g-acc); }
.wheel .bulb.on { fill: #fff; }

/* ----- Rasca y gana ----- */
.scratch { position: relative; width: 82cqw; aspect-ratio: 1.3; border-radius: 4cqw; overflow: hidden; border: .8cqw solid var(--g-line); background: var(--g-card); box-shadow: 1.5cqw 1.5cqw 0 var(--g-line); }
.scratch-cells { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(2, 1fr); gap: 1.4cqw; padding: 2cqw; background: var(--g-card); color: var(--g-card-fg); }
.sc-cell { display: grid; place-items: center; align-content: center; gap: .6cqw; border-radius: 2.4cqw; border: .4cqw dashed color-mix(in srgb, var(--g-card-fg) 30%, transparent); transition: background .3s, transform .4s cubic-bezier(.34, 1.56, .64, 1); text-align: center; }
.sc-cell b { font-size: 9cqw; line-height: 1; }
.sc-cell small { font-size: 2.4cqw; font-weight: 800; line-height: 1.1; }
.sc-cell.hit { background: var(--g-acc); color: var(--g-acc-fg); border-style: solid; border-color: var(--g-line); transform: scale(1.06); }
.scratch canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: crosshair; transition: opacity .6s; }
.scratch-meter { width: 60cqw; height: 2.2cqw; border-radius: 99px; background: color-mix(in srgb, var(--g-fg) 18%, transparent); overflow: hidden; }
.scratch-meter span { display: block; height: 100%; width: 0; background: var(--g-fg); transition: width .2s; }

/* ----- Descubre y gana (cajas que se mezclan) ----- */
.shell { position: relative; width: 92cqw; height: 50cqw; margin-top: 6cqw; }
.gift { position: absolute; bottom: 0; width: 25cqw; height: 34cqw; border: 0; background: none; padding: 0; }
.gift:not([disabled]):hover { transform: translateY(-2cqw); }
.gift .g-box { position: absolute; left: 0; right: 0; bottom: 0; height: 20cqw; background: var(--g-dark); border-radius: 1.5cqw; border: .5cqw solid var(--g-line); }
.gift .g-box::before, .gift .g-lid::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 4cqw; margin-left: -2cqw; background: var(--g-dark-fg); }
.gift .g-lid { position: absolute; left: -2cqw; right: -2cqw; bottom: 19cqw; height: 6cqw; background: var(--g-dark); filter: brightness(.85); border-radius: 1.5cqw; border: .5cqw solid var(--g-line); transition: transform .6s cubic-bezier(.34, 1.56, .64, 1); transform-origin: 20% 100%; }
.gift .g-bow { position: absolute; left: 50%; bottom: 24.5cqw; width: 12cqw; height: 6cqw; margin-left: -6cqw; transition: transform .6s cubic-bezier(.34, 1.56, .64, 1); }
.gift .g-bow::before, .gift .g-bow::after { content: ""; position: absolute; top: 0; width: 6cqw; height: 6cqw; border: 1.4cqw solid var(--g-dark-fg); border-radius: 50% 50% 0 50%; }
.gift .g-bow::before { left: 0; transform: rotate(10deg); }
.gift .g-bow::after { right: 0; transform: scaleX(-1) rotate(10deg); }
.gift .g-prize { position: absolute; left: 50%; bottom: 6cqw; z-index: 2; font-size: 10cqw; transform: translate(-50%, 0) scale(.3); opacity: 0; transition: transform .6s cubic-bezier(.34, 1.56, .64, 1) .1s, opacity .3s .1s; }
.gift.open .g-lid { transform: translate(-3cqw, -12cqw) rotate(-35deg); }
.gift.open .g-bow { transform: translate(-3cqw, -15cqw) rotate(-35deg); }
.gift.open .g-prize { opacity: 1; transform: translate(-50%, -17cqw) scale(1); }
.gift[disabled] { cursor: default; }

/* ----- Memoria ----- */
.mem-grid { display: grid; grid-template-columns: repeat(var(--cols, 3), 1fr); gap: 2.2cqw; width: calc(var(--cols, 3) * 21cqw); max-width: 90cqw; perspective: 600px; }
.mem { position: relative; aspect-ratio: .88; border: 0; padding: 0; background: none; transform-style: preserve-3d; transition: transform .45s cubic-bezier(.16, 1, .3, 1); }
.mem.flip, .mem.done { transform: rotateY(180deg); }
.mem .f { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 2.6cqw; backface-visibility: hidden; -webkit-backface-visibility: hidden; border: .5cqw solid var(--g-line); }
.mem .back { background: var(--g-dark); color: var(--g-dark-fg); font-family: var(--g-head); font-size: 8cqw; background-image: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, .18) 0 18%, transparent 19%); }
.mem .front { background: var(--g-card); transform: rotateY(180deg); font-size: 8cqw; }
.mem.done .front { background: var(--g-acc); animation: popc .5s cubic-bezier(.34, 1.56, .64, 1); }
@keyframes popc { 50% { transform: rotateY(180deg) scale(1.12); } }

/* ----- Quiz ----- */
.quiz { width: 100%; padding: 0 2cqw; display: flex; flex-direction: column; gap: 2.6cqw; }
.quiz-streak { min-height: 4cqw; text-align: center; font-weight: 800; font-size: 3.2cqw; color: var(--g-acc); }
.quiz-q { font-family: var(--g-head); font-weight: 800; font-size: 7cqw; line-height: 1.05; text-align: center; min-height: 24cqw; display: grid; place-items: center; }
.quiz-q.in { animation: qIn .4s cubic-bezier(.16, 1, .3, 1); }
@keyframes qIn { from { opacity: 0; transform: translateY(3cqw); } }
.quiz-opts { display: grid; gap: 2.2cqw; }
.quiz-opt { border: .5cqw solid var(--g-line); background: var(--g-card); color: var(--g-card-fg) !important; border-radius: 3cqw; padding: 2.6cqw 3.4cqw; font-weight: 700; font-size: 3.9cqw; text-align: left; display: flex; gap: 3cqw; align-items: center; transition: transform .2s, background .2s, opacity .3s; }
.quiz-opt b { display: grid; place-items: center; flex: none; width: 6.6cqw; height: 6.6cqw; border-radius: 50%; background: var(--g-dark); color: var(--g-dark-fg); font-size: 3.2cqw; }
.quiz-opt:hover { transform: translateX(1.4cqw); }
.quiz-opt.ok { background: var(--g-acc); color: var(--g-acc-fg) !important; }
.quiz-opt.bad { background: var(--g-red); color: #fff !important; }
.quiz-opt.gone { opacity: .15; }
.quiz-5050 { align-self: center; border: .5cqw solid var(--g-line); background: var(--g-btn); color: var(--g-btn-fg) !important; border-radius: 99px; padding: 1.6cqw 5cqw; font-weight: 900; font-size: 3.4cqw; }
.quiz-5050.used { opacity: .3; }

/* ----- Tap Tap ----- */
.tap-arena { position: relative; flex: 1; width: 100%; border-radius: 4cqw; background: color-mix(in srgb, var(--g-card) 14%, transparent); border: .5cqw dashed color-mix(in srgb, var(--g-fg) 35%, transparent); touch-action: manipulation; }
.tap-t { position: absolute; border: 0; padding: 0; background: none; display: grid; place-items: center; line-height: 1; animation: tIn .25s cubic-bezier(.34, 1.56, .64, 1); filter: drop-shadow(0 1cqw 0 rgba(0, 0, 0, .3)); }
.tap-t.pop { animation: tPop .2s forwards; }
.tap-t.fade { animation: tFade .2s forwards; }
@keyframes tIn { from { transform: scale(0); } }
@keyframes tPop { to { transform: scale(1.6); opacity: 0; } }
@keyframes tFade { to { transform: scale(.4); opacity: 0; } }

/* ----- Lluvia ----- */
.rain-arena { position: relative; flex: 1; width: 100%; touch-action: none; border-radius: 4cqw; background: linear-gradient(color-mix(in srgb, var(--g-card) 8%, transparent), color-mix(in srgb, var(--g-card) 40%, transparent)); }
.rain-arena canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

/* ----- Gusta o no gusta ----- */
.swipe-stack { position: relative; width: 66cqw; height: 80cqw; }
.swipe-card { position: absolute; inset: 0; background: var(--g-card); color: var(--g-card-fg); border: .8cqw solid var(--g-line); border-radius: 6cqw; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4cqw; box-shadow: 0 2cqw 0 var(--g-line); touch-action: none; cursor: grab; transition: transform .45s cubic-bezier(.16, 1, .3, 1), opacity .45s; }
.swipe-card .s-ico { width: 30cqw; height: 30cqw; border-radius: 50%; display: grid; place-items: center; background: var(--g-acc); border: .6cqw solid var(--g-line); font-size: 15cqw; }
.swipe-card h5 { margin: 0; font-family: var(--g-head); font-weight: 800; font-size: 7.4cqw; text-align: center; padding: 0 4cqw; line-height: 1.05; }
.swipe-card .stamp { position: absolute; top: 6cqw; padding: 1cqw 3cqw; border: .8cqw solid var(--g-line); border-radius: 2cqw; font-weight: 900; font-size: 5cqw; opacity: 0; }
.swipe-card .stamp.like { left: 5cqw; transform: rotate(-14deg); background: var(--g-acc); color: var(--g-acc-fg); }
.swipe-card .stamp.nope { right: 5cqw; transform: rotate(14deg); background: var(--g-card); }
.swipe-card.dragging { transition: none; cursor: grabbing; }
.swipe-btns { display: flex; gap: 8cqw; margin-top: 3cqw; }
.swipe-btn { width: 16cqw; height: 16cqw; border-radius: 50%; border: .8cqw solid var(--g-line); background: var(--g-card); color: var(--g-card-fg) !important; font-size: 7cqw; font-weight: 900; display: grid; place-items: center; transition: transform .2s; }
.swipe-btn.yes { background: var(--g-btn); color: var(--g-btn-fg) !important; }
.swipe-btn:active { transform: scale(.88); }
.stats { width: 100%; display: grid; gap: 1.8cqw; text-align: left; background: var(--g-card); color: var(--g-card-fg); border-radius: 4cqw; padding: 3cqw; }
.stat-row { display: grid; grid-template-columns: 1fr auto; gap: .8cqw 2cqw; align-items: center; font-size: 3.3cqw; font-weight: 700; }
.stat-row i { font-style: normal; color: var(--g-red); }
.stat-row .sbar { grid-column: 1 / -1; height: 2.2cqw; border-radius: 99px; background: color-mix(in srgb, var(--g-card-fg) 12%, transparent); overflow: hidden; }
.stat-row .sbar span { display: block; height: 100%; background: var(--g-dark); width: 0; transition: width 1s cubic-bezier(.16, 1, .3, 1); }

/* ----- Rompecabezas ----- */
.pz { position: relative; display: grid; grid-template-columns: repeat(var(--n, 3), 1fr); gap: .7cqw; width: 84cqw; aspect-ratio: 1; padding: .7cqw; background: var(--g-dark); border-radius: 3cqw; transition: gap .4s, padding .4s; }
.pz-p { aspect-ratio: 1; border: 0; padding: 0; border-radius: 1cqw; background-repeat: no-repeat; transition: transform .2s, outline-color .2s; outline: .9cqw solid transparent; outline-offset: -.9cqw; }
.pz-p.sel { outline-color: var(--g-acc); transform: scale(.92); }
.pz.solved { gap: 0; padding: 0; }
.pz.solved .pz-p { border-radius: 0; }
.pz.peek::after { content: ""; position: absolute; inset: 0; z-index: 3; border-radius: 3cqw; background: var(--img) center / cover; }

/* ----- Sopa de letras ----- */
.ws-words { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.4cqw; }
.ws-words span { padding: .8cqw 2.4cqw; border-radius: 99px; background: var(--g-card); color: var(--g-card-fg); border: .4cqw solid var(--g-line); font-weight: 800; font-size: 3cqw; transition: background .3s; }
.ws-words span.done { background: var(--g-dark); color: var(--g-dark-fg); text-decoration: line-through; }
.ws { display: grid; grid-template-columns: repeat(var(--n, 9), 1fr); width: 88cqw; aspect-ratio: 1; background: var(--g-card); color: var(--g-card-fg); border: .6cqw solid var(--g-line); border-radius: 3cqw; padding: 1.2cqw; touch-action: none; }
.ws span { display: grid; place-items: center; font-family: var(--g-head); font-weight: 800; font-size: 5.4cqw; border-radius: 1.6cqw; transition: background .15s, color .15s; }
.ws span.found { background: var(--g-acc); color: var(--g-acc-fg); }
.ws span.sel { background: var(--g-dark); color: var(--g-dark-fg); }

/* ----- La torre ----- */
.tower-arena { position: relative; flex: 1; width: 100%; border-radius: 4cqw; background: linear-gradient(color-mix(in srgb, var(--g-card) 50%, transparent), transparent); touch-action: none; cursor: pointer; }
.tower-arena canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.tower-tip { position: absolute; left: 0; right: 0; top: 4cqw; text-align: center; font-weight: 800; font-size: 3.6cqw; transition: opacity .4s; pointer-events: none; }

/* ----- Letras locas ----- */
.lt { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 5cqw; }
.lt-hint { text-align: center; font-weight: 700; font-size: 3.8cqw; background: var(--g-card); color: var(--g-card-fg); border-radius: 3cqw; padding: 2cqw 4cqw; }
.lt-slots { display: flex; gap: 1.4cqw; }
.lt-slots span { width: 8.6cqw; height: 11cqw; display: grid; place-items: center; border-bottom: .9cqw solid var(--g-fg); font-family: var(--g-head); font-weight: 800; font-size: 8cqw; cursor: pointer; }
.lt-slots.ok span { color: var(--g-dark); border-color: var(--g-dark); }
.lt-slots.bad { animation: gShake .3s 2; }
.lt-slots.bad span { color: var(--g-red); border-color: var(--g-red); }
.lt-tiles { display: flex; flex-wrap: wrap; justify-content: center; gap: 2cqw; max-width: 84cqw; }
.lt-tile { width: 12cqw; height: 12cqw; border-radius: 2.6cqw; border: .6cqw solid var(--g-line); background: var(--g-card); color: var(--g-card-fg) !important; font-family: var(--g-head); font-weight: 800; font-size: 7cqw; box-shadow: 0 1cqw 0 var(--g-line); transition: transform .2s, opacity .2s; padding: 0; }
.lt-tile:active { transform: translateY(1cqw); box-shadow: none; }
.lt-tile[disabled] { opacity: .2; pointer-events: none; }

/* ==========================================================
   Fotos reales y pantallas limpias
   ========================================================== */
.scr.has-photo {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--g-bg) 10%, transparent) 0%, color-mix(in srgb, var(--g-bg) 25%, transparent) 38%, color-mix(in srgb, var(--g-bg) 85%, transparent) 64%, var(--g-bg) 86%),
    var(--g-photo, none) center / cover no-repeat,
    var(--g-bg);
}
.scr.has-photo .scr-rays { display: none; }
.g-logo i { font-family: var(--g-head); font-size: 3.1cqw; letter-spacing: 0; width: 8.4cqw; height: 8.4cqw; background: var(--g-dark); color: var(--g-dark-fg); border-color: var(--g-line); }
.g-logo { text-shadow: 0 .4cqw 2cqw color-mix(in srgb, var(--g-bg) 70%, transparent); }
.g-intro .g-intro-body { justify-content: flex-end; gap: 4cqw; padding-bottom: 2cqw; }
.g-intro .g-title { font-size: 13cqw; text-shadow: 0 .6cqw 3cqw color-mix(in srgb, var(--g-bg) 60%, transparent); }
.g-how1 { max-width: 86%; background: var(--g-card); color: var(--g-card-fg); border: .5cqw solid var(--g-line); border-radius: 99px; padding: 2.2cqw 4.4cqw; font-size: 3.8cqw; font-weight: 700; line-height: 1.25; box-shadow: 0 1cqw 0 color-mix(in srgb, var(--g-line) 40%, transparent); }
.g-intro .g-go { font-size: 5cqw; padding: 3.6cqw 12cqw; }

.g-prize-photo { flex: none; width: 40cqw; aspect-ratio: 1; border-radius: 50%; overflow: hidden; border: 1.2cqw solid var(--g-card); box-shadow: 0 0 0 .6cqw var(--g-line), 0 2cqw 0 var(--g-line); animation: prizeIn .7s cubic-bezier(.34, 1.56, .64, 1); }
.g-prize-photo img, .sc-cell img, .gift .g-prize img, .mem .front img, .tap-t img, .s-photo img, .stat-row img { width: 100%; height: 100%; object-fit: cover; display: block; }
@keyframes prizeIn { from { transform: scale(.3) rotate(-20deg); opacity: 0; } }

.sc-cell img { width: 62%; height: auto; aspect-ratio: 1; border-radius: 50%; border: .5cqw solid var(--g-line); }
.sc-cell { gap: 1cqw; padding: 1cqw; }

.gift .g-prize { width: 16cqw; height: 16cqw; border-radius: 50%; overflow: hidden; border: .7cqw solid var(--g-card); box-shadow: 0 0 0 .5cqw var(--g-line); font-size: 0; }
.gift .g-prize.empty { overflow: visible; border: 0; box-shadow: none; display: grid; place-items: center; }
.gift .g-prize.empty em { font-style: normal; font-weight: 800; font-size: 3.2cqw; background: var(--g-card); color: var(--g-card-fg); padding: .6cqw 2cqw; border-radius: 99px; }

.mem .front { padding: 0; overflow: hidden; }
.mem .front img { border-radius: 2cqw; }
.mem.done .front img { opacity: .9; }

.tap-t { border-radius: 50%; overflow: hidden; border: .9cqw solid var(--g-card); box-shadow: 0 0 0 .5cqw var(--g-line), 0 1.2cqw 0 var(--g-line); filter: none; }
.tap-t.gold { border-color: #FFD400; }
.tap-t.bomb { border-color: var(--g-red); overflow: visible; }
.tap-t.bomb img { border-radius: 50%; }
.tap-t.bomb::after { content: "✕"; position: absolute; right: -1cqw; top: -1cqw; width: 6cqw; height: 6cqw; border-radius: 50%; background: var(--g-red); color: #fff; font-weight: 900; font-size: 3.4cqw; display: grid; place-items: center; }

.swipe-card { justify-content: flex-start; gap: 0; overflow: hidden; }
.s-photo { display: block; width: 100%; height: 66%; flex: none; }
.swipe-card h5 { flex: 1; display: grid; place-items: center; padding: 2cqw 4cqw; font-size: 7cqw; }
.swipe-card .stamp { z-index: 2; }
.stat-row span { display: inline-flex; align-items: center; gap: 2cqw; }
.stat-row img { width: 7cqw; height: 7cqw; border-radius: 50%; flex: none; }

/* ==========================================================
   Pulido: transiciones, inicio animado y premios con brillo
   ========================================================== */
/* cada pantalla entra con un pequeño zoom */
.scr { animation: scrIn .45s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes scrIn { from { opacity: 0; transform: scale(.96); } }

/* logo de la marca como insignia */
.g-logo { padding: 1cqw 3cqw 1cqw 1cqw; border-radius: 99px; background: color-mix(in srgb, var(--g-card) 88%, transparent); color: var(--g-card-fg); font-size: 4.2cqw; box-shadow: 0 .8cqw 2.4cqw rgba(0, 0, 0, .15); }
.g-logo i { background: var(--g-dark); color: var(--g-dark-fg); border: 0; }

/* inicio: los elementos aparecen escalonados y el botón "respira" */
.g-intro .g-title, .g-intro .g-how1, .g-intro .g-teaser, .g-intro .g-best, .g-intro .g-go { animation: gUp .6s cubic-bezier(.2, .8, .2, 1) both; }
.g-intro .g-how1 { animation-delay: .1s; }
.g-intro .g-teaser, .g-intro .g-best { animation-delay: .2s; }
.g-intro .g-go { animation: gUp .6s cubic-bezier(.2, .8, .2, 1) .3s both, goPulse 2s ease-in-out 1s infinite; }
@keyframes gUp { from { opacity: 0; transform: translateY(4cqw); } }
@keyframes goPulse { 0%, 100% { box-shadow: 0 1cqw 0 color-mix(in srgb, var(--g-line) 60%, transparent), 0 0 0 0 color-mix(in srgb, var(--g-btn) 55%, transparent); } 50% { box-shadow: 0 1cqw 0 color-mix(in srgb, var(--g-line) 60%, transparent), 0 0 0 3.4cqw color-mix(in srgb, var(--g-btn) 0%, transparent); } }
.g-title span { animation: tagPop .7s cubic-bezier(.34, 1.56, .64, 1) .15s both; }
@keyframes tagPop { from { transform: rotate(-2deg) scale(.6); opacity: 0; } }

/* lo que se puede ganar */
.g-teaser { display: grid; justify-items: center; gap: 1.6cqw; }
.g-teaser small { font-size: 2.8cqw; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; opacity: .85; }
.g-teaser-row { display: flex; }
.g-teaser-row span { width: 13cqw; height: 13cqw; border-radius: 50%; overflow: hidden; border: .8cqw solid var(--g-card); margin-left: -2.6cqw; box-shadow: 0 1cqw 2cqw rgba(0, 0, 0, .2); animation: bobT 3s ease-in-out infinite; }
.g-teaser-row span:first-child { margin-left: 0; }
.g-teaser-row span:nth-child(2) { animation-delay: -.7s; } .g-teaser-row span:nth-child(3) { animation-delay: -1.4s; } .g-teaser-row span:nth-child(4) { animation-delay: -2.1s; }
.g-teaser-row img { width: 100%; height: 100%; object-fit: cover; display: block; }
@keyframes bobT { 50% { transform: translateY(-1.2cqw); } }
.g-best { font-size: 3.2cqw; }

/* cuenta atrás con anillo */
.g-count b { position: relative; }
.g-count b::after { content: ''; position: absolute; left: 50%; top: 50%; width: 40cqw; height: 40cqw; margin: -20cqw 0 0 -20cqw; border-radius: 50%; border: 1cqw solid var(--g-dark-fg); opacity: 0; animation: ring .65s ease-out; }
.g-count b.pop::after { animation: ring .65s ease-out; }
@keyframes ring { from { transform: scale(.4); opacity: .8; } to { transform: scale(1.3); opacity: 0; } }

/* premio ganado con rayos girando detrás */
.g-prize-wrap { position: relative; display: grid; place-items: center; width: 56cqw; height: 46cqw; }
.g-prize-rays { position: absolute; width: 80cqw; height: 80cqw; border-radius: 50%; background: repeating-conic-gradient(color-mix(in srgb, var(--g-acc) 55%, transparent) 0 10deg, transparent 10deg 24deg); -webkit-mask-image: radial-gradient(closest-side, #000 35%, transparent); mask-image: radial-gradient(closest-side, #000 35%, transparent); animation: spin 12s linear infinite; }
.g-prize-wrap .g-prize-photo { position: relative; }
.g-ticket { animation: gUp .6s cubic-bezier(.2, .8, .2, 1) .25s both; }
.g-score b { animation: tagPop .6s cubic-bezier(.34, 1.56, .64, 1) both; }

/* botones con respuesta al toque */
.scr-btn:hover { filter: brightness(1.06); }
.g-icon:active, .g-chip:active { transform: scale(.92); }

/* ----- Desliza y combina ----- */
.m3 { position: relative; width: 88cqw; aspect-ratio: 1; flex: none; border-radius: 4cqw; background: color-mix(in srgb, var(--g-card) 82%, transparent); border: .6cqw solid var(--g-line); box-shadow: 0 1.4cqw 0 var(--g-line); overflow: hidden; touch-action: none; cursor: pointer; }
.m3-t { position: absolute; left: 0; top: 0; width: calc(100% / var(--n, 7)); aspect-ratio: 1; display: grid; place-items: center; isolation: isolate; font-size: 7.4cqw; line-height: 1; transform: translate(calc(var(--x) * 100%), calc(var(--y) * 100%)); transition: transform .24s cubic-bezier(.3, .7, .4, 1.15); }
.m3-t::before { content: ""; position: absolute; inset: .7cqw; z-index: -1; border-radius: 2.4cqw; background: var(--c); border: .4cqw solid color-mix(in srgb, var(--g-line) 55%, transparent); box-shadow: inset 0 -.9cqw 0 rgba(0, 0, 0, .12); transition: transform .2s, box-shadow .2s; }
.m3-t.sel::before { box-shadow: 0 0 0 .9cqw var(--g-acc), inset 0 -.9cqw 0 rgba(0, 0, 0, .12); transform: scale(.9); }
.m3-t.hint { animation: m3Hint .8s ease-in-out infinite; }
@keyframes m3Hint { 50% { filter: brightness(1.15) drop-shadow(0 0 1.6cqw var(--g-acc)); } }
.m3-t.pop { animation: m3Pop .26s forwards; }
@keyframes m3Pop { to { opacity: 0; filter: brightness(2); scale: 1.5; } }

/* ----- Objetos ocultos ----- */
.ho { position: relative; flex: 1; min-height: 0; width: 100%; border-radius: 4cqw; border: .6cqw solid var(--g-line); background: var(--g-bg) center / cover no-repeat; overflow: hidden; touch-action: manipulation; }
.ho::before { content: ""; position: absolute; inset: 0; background: color-mix(in srgb, var(--g-bg) 18%, transparent); pointer-events: none; }
.ho-i { position: absolute; border: 0; padding: 0; background: none; line-height: 1; transform: translate(-50%, -50%) rotate(var(--r, 0deg)); filter: drop-shadow(0 .4cqw .4cqw rgba(0, 0, 0, .25)); transition: transform .3s cubic-bezier(.34, 1.56, .64, 1), opacity .3s; }
.ho-i.got { z-index: 20 !important; transform: translate(-50%, -50%) scale(1.5); pointer-events: none; }
.ho-i.got::after { content: ""; position: absolute; inset: -30%; border-radius: 50%; border: .8cqw solid var(--g-acc); }
.ho-i.miss { animation: hoMiss .35s; }
@keyframes hoMiss { 25% { transform: translate(-60%, -50%) rotate(var(--r)); } 75% { transform: translate(-40%, -50%) rotate(var(--r)); } }
.ho-i.ping { z-index: 15 !important; }
.ho-i.ping::after { content: ""; position: absolute; inset: -60%; border-radius: 50%; border: .8cqw solid var(--g-acc); animation: hoPing .9s ease-out infinite; }
@keyframes hoPing { from { transform: scale(1.6); opacity: 0; } 60% { opacity: 1; } to { transform: scale(.8); opacity: 0; } }
.ho-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.4cqw; flex: none; }
.ho-list span { display: inline-flex; align-items: center; gap: 1cqw; padding: .8cqw 2.6cqw .8cqw 1.2cqw; border-radius: 99px; background: var(--g-card); color: var(--g-card-fg); border: .4cqw solid var(--g-line); font-weight: 800; font-size: 3cqw; transition: background .3s, color .3s; }
.ho-list b { font-size: 4.6cqw; line-height: 1; }
.ho-list span.done { background: var(--g-dark); color: var(--g-dark-fg); text-decoration: line-through; }
.ho-help { flex: none; padding: 1.2cqw 3.6cqw; font-size: 3cqw; }
.ho-help.used { opacity: .35; }
.scr .g-arena:has(.ho) { gap: 2cqw; padding-bottom: 4cqw; }

/* ----- Test de personalidad ----- */
.pt { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 3cqw; }
.pt-q { font-family: var(--g-head); font-weight: 800; font-size: 7.6cqw; line-height: 1.08; text-align: center; min-height: 18cqw; display: grid; place-items: center; padding: 0 2cqw; }
.pt-q.in { animation: qIn .4s cubic-bezier(.16, 1, .3, 1); }
.pt-opts { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 2.6cqw; }
.pt-opt { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.6cqw; aspect-ratio: 1.05; padding: 3cqw 2cqw; border: .6cqw solid var(--g-line); border-radius: 4cqw; background: var(--g-card); color: var(--g-card-fg) !important; box-shadow: 0 1.2cqw 0 var(--g-line); animation: gUp .45s cubic-bezier(.2, .8, .2, 1) var(--d, 0ms) both; transition: transform .2s cubic-bezier(.34, 1.56, .64, 1), background .2s; }
.pt-opt span { font-size: 12cqw; line-height: 1; }
.pt-opt b { font-size: 3.7cqw; font-weight: 800; line-height: 1.15; text-align: center; }
.pt-opt:active { transform: translateY(1cqw); box-shadow: 0 .2cqw 0 var(--g-line); }
.pt-opt.on { background: var(--g-acc); color: var(--g-acc-fg) !important; transform: scale(1.05); }
.pt-res { display: grid; justify-items: center; gap: 1.4cqw; }
.pt-res .g-prize-photo { width: 34cqw; }
.pt-res .g-title { font-size: 11cqw; }
.pt-tag { background: var(--g-dark); color: var(--g-dark-fg); font-weight: 800; font-size: 3.2cqw; padding: .8cqw 3cqw; border-radius: 99px; }
.pt-res ~ .stats { gap: 1.2cqw; padding: 2.4cqw 3cqw; }
