/* DERRAPE · interfaz */
:root {
  --fondo: #07080c;
  --tinta: #f4f2ec;
  --tenue: rgba(244, 242, 236, 0.62);
  --vidrio: rgba(12, 14, 22, 0.58);
  --linea: rgba(255, 255, 255, 0.12);
  --acento: #ff3b1f;
  --acento2: #ffcf3a;
  --display: 'Unbounded', 'Saira', system-ui, sans-serif;
  --hud: 'Saira', system-ui, sans-serif;
  --sl: env(safe-area-inset-left, 0px);
  --sr: env(safe-area-inset-right, 0px);
  --st: env(safe-area-inset-top, 0px);
  --sb: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--fondo); color: var(--tinta); overflow: hidden; overscroll-behavior: none; touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; font-family: var(--hud); }
body { position: fixed; inset: 0; }
canvas#lienzo { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; display: block; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
svg { width: 1em; height: 1em; fill: currentColor; }

.pantalla { position: fixed; inset: 0; opacity: 0; pointer-events: none; transition: opacity 0.35s ease; z-index: 10; }
.pantalla.visible { opacity: 1; pointer-events: auto; }
.pantalla:not(.visible) * { pointer-events: none !important; }
.capa { z-index: 40; background: rgba(4, 5, 8, 0.55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: grid; place-items: center; }

.panel { background: var(--vidrio); border: 1px solid var(--linea); border-radius: 18px; backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35); }

/* logo */
.logo { position: relative; display: inline-block; line-height: 0.9; }
.logo-txt { font-family: var(--display); font-weight: 900; font-size: 46px; letter-spacing: -0.02em; display: inline-block; transform: skewX(-12deg); background: linear-gradient(180deg, #ffffff 0%, #ffffff 52%, #c9ccd6 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.logo-barra { position: absolute; left: 4%; right: -6%; bottom: -10px; height: 5px; background: linear-gradient(90deg, transparent, var(--acento) 18%, var(--acento2) 70%, transparent); transform: skewX(-30deg); border-radius: 3px; }
.logo.grande .logo-txt { font-size: clamp(44px, 9vw, 92px); }
.logo.grande .logo-barra { height: 7px; bottom: -14px; }

/* botones */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: space-between; gap: 18px; min-width: 210px; height: 50px; padding: 0 22px; border-radius: 12px; background: rgba(255, 255, 255, 0.07); border: 1px solid var(--linea); font-family: var(--hud); font-style: italic; font-weight: 800; font-stretch: 80%; font-size: 19px; letter-spacing: 0.04em; transition: transform 0.12s ease, background 0.2s ease; }
.btn:active { transform: scale(0.97); }
.btn.primario { background: linear-gradient(100deg, var(--acento), #ff6a2a); border-color: transparent; color: #fff; box-shadow: 0 10px 30px rgba(255, 59, 31, 0.35); }
.btn.primario svg { width: 20px; height: 20px; }
.btn.ancho { width: 100%; justify-content: center; }
.btn.mini { min-width: 0; height: 36px; font-size: 14px; padding: 0 14px; }
.btn:disabled { opacity: 0.45; }
.icono { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, 0.08); border: 1px solid var(--linea); }
.icono svg { width: 20px; height: 20px; }
.icono.grande { width: 56px; height: 56px; }
.icono.grande svg { width: 26px; height: 26px; }
.volver { position: absolute; top: calc(16px + var(--st)); left: calc(18px + var(--sl)); width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, 0.08); border: 1px solid var(--linea); z-index: 2; }
.volver svg { width: 20px; height: 20px; transform: scaleX(-1); }
.sec-titulo { position: absolute; top: calc(18px + var(--st)); left: 0; right: 0; margin: 0; text-align: center; font-family: var(--display); font-weight: 700; font-size: 20px; letter-spacing: 0.02em; }

.barra-sup { position: absolute; top: calc(16px + var(--st)); right: calc(18px + var(--sr)); display: flex; gap: 10px; align-items: center; }
.saldo { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px 0 12px; border-radius: 22px; background: rgba(255, 255, 255, 0.08); border: 1px solid var(--linea); font-style: italic; font-weight: 800; font-size: 18px; }
.saldo svg { width: 20px; height: 20px; color: #3fe3ff; filter: drop-shadow(0 0 6px rgba(63, 227, 255, 0.7)); }

/* carga */
#carga { background: radial-gradient(120% 90% at 50% 40%, #151826 0%, #07080c 70%); display: grid; place-items: center; z-index: 60; }
.carga-centro { display: grid; justify-items: center; gap: 30px; }
.barra { width: min(320px, 60vw); height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.barra i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--acento), var(--acento2)); transition: width 0.25s ease; }
.carga-txt { margin: -14px 0 0; font-style: italic; font-weight: 600; font-size: 14px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--tenue); }
.guia { position: absolute; left: 50%; bottom: calc(14px + var(--sb)); transform: translateX(-50%); display: none; flex-direction: column; gap: 6px; align-items: center; max-width: calc(100vw - 32px); padding: 10px 16px; border-radius: 14px; background: rgba(255, 255, 255, 0.06); border: 1px solid var(--linea); font-size: 12.5px; color: var(--tenue); text-align: center; }
.guia b { color: var(--tinta); font-weight: 700; margin-right: 6px; }
.guia ol { display: none; margin: 0; padding: 0; list-style: none; gap: 6px 14px; flex-wrap: wrap; justify-content: center; counter-reset: paso; }
.guia li { counter-increment: paso; }
.guia li::before { content: counter(paso); display: inline-grid; place-items: center; width: 18px; height: 18px; margin-right: 6px; border-radius: 50%; background: var(--acento); color: #fff; font-size: 11px; font-weight: 800; }
.guia em { font-style: normal; color: var(--tinta); font-weight: 700; }
body.ofrecer-instalar .guia { display: flex; }
body.es-ios .guia ol.ios, body.es-android .guia ol.android { display: flex; }

/* título */
#titulo { background: linear-gradient(90deg, rgba(7, 8, 12, 0.72) 0%, rgba(7, 8, 12, 0.15) 45%, rgba(7, 8, 12, 0) 60%, rgba(7, 8, 12, 0.35) 100%); }
.titulo-izq { position: absolute; left: calc(5vw + var(--sl)); top: 50%; transform: translateY(-62%); }
.lema { margin: 30px 0 0; font-style: italic; font-weight: 600; font-stretch: 85%; font-size: 18px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--tenue); }
.menu { position: absolute; right: calc(5vw + var(--sr)); bottom: calc(9vh + var(--sb)); display: grid; gap: 10px; }
.toca { position: absolute; left: 0; right: 0; bottom: calc(5vh + var(--sb)); margin: 0; text-align: center; font-style: italic; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; font-size: 14px; color: var(--tinta); animation: latido 1.6s ease-in-out infinite; display: none; }
#titulo.esperando .toca { display: block; }
#titulo.esperando .menu { display: none; }
@keyframes latido { 50% { opacity: 0.35; } }

/* garaje */
#garaje { background: linear-gradient(270deg, rgba(7, 8, 12, 0.78) 0%, rgba(7, 8, 12, 0.2) 40%, rgba(7, 8, 12, 0) 60%); }
.ficha { position: absolute; right: calc(4vw + var(--sr)); top: 50%; transform: translateY(-50%); width: min(330px, 40vw); padding: 22px 22px 18px; }
.ficha-tipo { margin: 0; font-style: italic; font-weight: 700; font-size: 12px; letter-spacing: 0.22em; color: var(--acento2); }
.ficha h2 { margin: 4px 0 2px; font-family: var(--display); font-weight: 900; font-size: 34px; letter-spacing: -0.01em; transform: skewX(-8deg); transform-origin: left; }
.ficha-lema { margin: 0 0 14px; color: var(--tenue); font-size: 14px; }
.stats { display: grid; gap: 9px; margin-bottom: 16px; }
.stat { display: grid; grid-template-columns: 96px 1fr; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; color: var(--tenue); }
.stat i { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.stat b { display: block; height: 100%; width: 0; border-radius: 3px; background: linear-gradient(90deg, var(--acento), var(--acento2)); transition: width 0.4s cubic-bezier(0.2, 0.8, 0.2, 1); }
.ficha-nota { margin: 10px 0 0; min-height: 16px; font-size: 12px; text-align: center; color: var(--tenue); }
.garaje-nav { position: absolute; left: calc(4vw + var(--sl)); right: calc(min(330px, 40vw) + 8vw + var(--sr)); top: 50%; display: flex; justify-content: space-between; transform: translateY(-50%); pointer-events: none; }
.garaje-nav button { pointer-events: auto; }
.puntos { position: absolute; left: 0; right: calc(min(330px, 40vw) + 4vw); bottom: calc(18px + var(--sb)); display: flex; justify-content: center; gap: 8px; }
.puntos i { width: 8px; height: 8px; border-radius: 4px; background: rgba(255, 255, 255, 0.25); transition: width 0.25s ease, background 0.25s ease; }
.puntos i.activo { width: 24px; background: var(--tinta); }
.btn .candado { width: 16px; height: 16px; }

/* mundos */
#mundos { background: radial-gradient(120% 100% at 50% 30%, rgba(14, 16, 26, 0.75), rgba(7, 8, 12, 0.94)); }
.cartas { position: absolute; left: calc(4vw + var(--sl)); right: calc(4vw + var(--sr)); top: calc(66px + var(--st)); bottom: calc(18px + var(--sb)); display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.carta { position: relative; border-radius: 16px; overflow: hidden; border: 1px solid var(--linea); background: #111 center/cover no-repeat; text-align: left; display: flex; flex-direction: column; justify-content: flex-end; padding: 16px; transition: transform 0.2s ease; isolation: isolate; }
.carta::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0.85) 100%); }
.carta:active { transform: scale(0.98); }
.carta .num { position: absolute; top: 14px; left: 16px; font-style: italic; font-weight: 800; font-size: 13px; letter-spacing: 0.18em; color: var(--c); }
.carta h3 { margin: 0 0 4px; font-family: var(--display); font-weight: 900; font-size: clamp(18px, 2.6vw, 26px); transform: skewX(-8deg); transform-origin: left; }
.carta p { margin: 0; font-size: 13px; color: var(--tenue); }
.carta .marca { display: flex; gap: 12px; margin-top: 10px; font-size: 12px; font-weight: 700; color: var(--tinta); }
.carta .marca span { display: inline-flex; align-items: center; gap: 5px; }
.carta .marca svg { width: 14px; height: 14px; color: var(--acento2); }
.carta .linea-c { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--c); }

/* ayuda */
#comojugar { background: rgba(7, 8, 12, 0.82); display: grid; place-items: center; }
.ayuda { width: min(860px, 88vw); padding: 22px 26px; }
.ayuda h2 { margin: 0 0 14px; font-family: var(--display); font-size: 22px; }
.ayuda-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 22px; }
.ayuda-grid b { display: block; font-style: italic; font-weight: 800; font-size: 15px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--acento2); margin-bottom: 4px; }
.ayuda-grid p { margin: 0; font-size: 13.5px; line-height: 1.4; color: var(--tenue); }
.ayuda-grid em { font-style: normal; color: var(--tinta); font-weight: 700; }

/* HUD */
.hud { font-style: italic; font-stretch: 78%; z-index: 20; }
.hud-pos { position: absolute; left: calc(18px + var(--sl)); top: calc(8px + var(--st)); display: flex; align-items: flex-start; line-height: 0.85; text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5); }
.hud-pos b { font-weight: 900; font-size: 74px; letter-spacing: -0.04em; }
.hud-pos #h-pos-suf { font-weight: 800; font-size: 30px; margin-top: 4px; }
.hud-pos small { font-weight: 700; font-size: 22px; color: var(--tenue); align-self: flex-end; margin: 0 0 8px 2px; }
.hud-vuelta { position: absolute; left: calc(20px + var(--sl)); top: calc(78px + var(--st)); font-weight: 700; font-size: 15px; letter-spacing: 0.08em; color: var(--tenue); }
.hud-vuelta b { color: var(--tinta); font-size: 18px; }
.hud-tiempo { position: absolute; left: calc(20px + var(--sl)); top: calc(100px + var(--st)); font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; color: var(--tenue); }
.hud-pausa { position: absolute; top: calc(12px + var(--st)); right: calc(150px + var(--sr)); width: 40px; height: 40px; }
.hud-poder { position: absolute; left: 50%; top: calc(10px + var(--st)); width: 64px; height: 64px; margin-left: -32px; border-radius: 16px; background: rgba(12, 14, 22, 0.32); border: 1.5px dashed rgba(255, 255, 255, 0.22); display: grid; place-items: center; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.hud-poder .poder-ico { width: 38px; height: 38px; opacity: 0; transition: opacity 0.15s ease; }
.hud-poder.lleno .poder-ico { opacity: 1; }
.hud-poder.lleno, .hud-poder.ruleta { background: var(--vidrio); border: 1.5px solid currentColor; box-shadow: 0 0 18px currentColor; }
.hud-poder.ruleta .poder-ico { opacity: 1; animation: ruleta 0.12s linear infinite; }
@keyframes ruleta { 50% { transform: translateY(-3px) scale(0.92); opacity: 0.6; } }
.hud-mapa { position: absolute; right: calc(14px + var(--sr)); top: calc(8px + var(--st)); width: 124px; height: 124px; }
.hud-mapa canvas { width: 100%; height: 100%; }
.hud-gemas { position: absolute; right: calc(20px + var(--sr)); top: calc(136px + var(--st)); display: flex; align-items: center; gap: 6px; font-weight: 800; font-size: 20px; }
.hud-gemas svg { width: 18px; height: 18px; color: #3fe3ff; filter: drop-shadow(0 0 6px rgba(63, 227, 255, 0.8)); }
.hud-gemas small { color: var(--tenue); font-size: 14px; }
.hud-gemas.lleno b { color: #3fe3ff; }
.hud-vel { position: absolute; left: 50%; bottom: calc(28px + var(--sb)); transform: translateX(-50%); display: flex; align-items: baseline; gap: 6px; font-variant-numeric: tabular-nums; text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5); }
.hud-vel b { font-weight: 900; font-size: 38px; }
.hud-vel small { font-weight: 700; font-size: 13px; color: var(--tenue); }
.hud-cometa { position: absolute; left: 50%; bottom: calc(12px + var(--sb)); width: 190px; margin-left: -95px; display: flex; align-items: center; gap: 8px; }
.hud-cometa svg { width: 18px; height: 18px; color: var(--tenue); }
.hud-cometa i { flex: 1; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.14); overflow: hidden; }
.hud-cometa i b { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #7c5cff, #ff2bd6, #ffcf3a); border-radius: 3px; }
.hud-cometa.lleno svg { color: #ffcf3a; filter: drop-shadow(0 0 8px #ffcf3a); }

.zona-giro { position: absolute; left: 0; top: 30%; bottom: 0; width: 52%; }
.pista-giro { position: absolute; left: calc(40px + var(--sl)); bottom: calc(30px + var(--sb)); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 700; color: rgba(255, 255, 255, 0.55); transition: opacity 0.6s ease; }
.zona-giro.usada .pista-giro { opacity: 0; }
.perilla { position: absolute; width: 0; height: 0; opacity: 0; transition: opacity 0.15s ease; pointer-events: none; }
.perilla.visible { opacity: 1; }
.perilla::before { content: ''; position: absolute; left: -64px; top: -6px; width: 128px; height: 12px; border-radius: 6px; background: rgba(255, 255, 255, 0.14); border: 1px solid rgba(255, 255, 255, 0.2); }
.perilla i { position: absolute; left: -22px; top: -22px; width: 44px; height: 44px; border-radius: 50%; background: rgba(255, 255, 255, 0.85); box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35); transform: translateX(var(--dx, 0)); }

.boton-derrape { position: absolute; right: calc(22px + var(--sr)); bottom: calc(22px + var(--sb)); width: 112px; height: 112px; border-radius: 50%; background: radial-gradient(circle at 50% 35%, rgba(255, 90, 50, 0.95), rgba(214, 30, 10, 0.92)); border: 2px solid rgba(255, 255, 255, 0.3); box-shadow: 0 10px 30px rgba(255, 59, 31, 0.35), inset 0 -6px 14px rgba(0, 0, 0, 0.25); display: grid; place-items: center; font-weight: 900; font-style: italic; font-size: 17px; letter-spacing: 0.04em; transition: transform 0.08s ease; }
.boton-derrape.pulsado { transform: scale(0.92); background: radial-gradient(circle at 50% 35%, #ff7a50, #e0300f); }
.boton-derrape.n1 { box-shadow: 0 0 0 4px #3fb6ff, 0 0 30px #3fb6ff; }
.boton-derrape.n2 { box-shadow: 0 0 0 4px #ff9a1f, 0 0 30px #ff9a1f; }
.boton-derrape.n3 { box-shadow: 0 0 0 4px #d65bff, 0 0 34px #d65bff; }
.boton-poder { position: absolute; right: calc(146px + var(--sr)); bottom: calc(40px + var(--sb)); width: 76px; height: 76px; border-radius: 50%; background: var(--vidrio); border: 2px solid rgba(255, 255, 255, 0.22); display: grid; place-items: center; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); transition: transform 0.08s ease, opacity 0.2s ease; opacity: 0.45; }
.boton-poder svg { width: 34px; height: 34px; opacity: 0; }
.boton-poder.lleno { opacity: 1; border-color: var(--pc, #fff); box-shadow: 0 0 22px var(--pc, transparent); }
.boton-poder.lleno svg { opacity: 1; color: var(--pc, #fff); }
.boton-poder.pulsado { transform: scale(0.9); }
.boton-cometa { position: absolute; right: calc(22px + var(--sr)); bottom: calc(146px + var(--sb)); height: 44px; padding: 0 16px; border-radius: 22px; display: flex; align-items: center; gap: 8px; font-weight: 900; font-size: 15px; letter-spacing: 0.06em; color: #1a0f00; background: linear-gradient(90deg, #ffcf3a, #ff8a2a); box-shadow: 0 0 26px rgba(255, 207, 58, 0.7); transform: scale(0); transition: transform 0.25s cubic-bezier(0.3, 1.6, 0.5, 1); }
.boton-cometa svg { width: 20px; height: 20px; }
.boton-cometa.visible { transform: scale(1); animation: brilla 1s ease-in-out infinite; }
@keyframes brilla { 50% { box-shadow: 0 0 40px rgba(255, 207, 58, 1); } }
.contra { position: absolute; left: 50%; top: 34%; transform: translateX(-50%); padding: 10px 18px; border-radius: 10px; background: rgba(214, 30, 10, 0.85); font-weight: 900; font-size: 20px; letter-spacing: 0.08em; opacity: 0; transition: opacity 0.2s ease; }
.contra.visible { opacity: 1; animation: latido 0.6s ease-in-out infinite; }

.lineas { position: fixed; inset: -10%; z-index: 15; pointer-events: none; opacity: 0; background: repeating-conic-gradient(from 0deg at 50% 52%, rgba(255, 255, 255, 0) 0deg 4deg, rgba(255, 255, 255, 0.5) 4.4deg, rgba(255, 255, 255, 0) 5deg 9deg); -webkit-mask-image: radial-gradient(circle at 50% 52%, transparent 34%, #000 78%); mask-image: radial-gradient(circle at 50% 52%, transparent 34%, #000 78%); animation: giraLineas 0.35s steps(3) infinite; }
@keyframes giraLineas { 33% { transform: rotate(1.3deg) scale(1.02); } 66% { transform: rotate(-1deg) scale(1.01); } }
.flash { position: fixed; inset: 0; z-index: 16; pointer-events: none; opacity: 0; background: var(--fc, #fff); mix-blend-mode: screen; }
.flash.activo { animation: flash 0.5s ease-out; }
@keyframes flash { 0% { opacity: 0.7; } 100% { opacity: 0; } }
.cuenta { position: fixed; left: 50%; top: 42%; z-index: 30; transform: translate(-50%, -50%); font-style: italic; font-weight: 900; font-stretch: 80%; font-size: 120px; line-height: 1; pointer-events: none; text-shadow: 0 6px 30px rgba(0, 0, 0, 0.45); opacity: 0; }
.cuenta.activo { animation: cuenta 0.85s cubic-bezier(0.2, 0.9, 0.3, 1) forwards; }
.cuenta.ya { color: #3dffb0; font-size: 140px; }
@keyframes cuenta { 0% { opacity: 0; transform: translate(-50%, -50%) scale(1.8); } 20% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -50%) scale(0.9); } }
.aviso { position: fixed; left: 50%; top: 28%; z-index: 30; transform: translate(-50%, -50%) skewX(-10deg); font-style: italic; font-weight: 900; font-stretch: 80%; font-size: 40px; letter-spacing: 0.04em; pointer-events: none; color: var(--ac, #fff); text-shadow: 0 0 24px var(--ac, #fff), 0 4px 18px rgba(0, 0, 0, 0.5); opacity: 0; white-space: nowrap; }
.aviso.activo { animation: aviso var(--dur, 1.1s) ease-out forwards; }
@keyframes aviso { 0% { opacity: 0; transform: translate(-50%, -50%) skewX(-10deg) scale(0.6); } 15% { opacity: 1; transform: translate(-50%, -50%) skewX(-10deg) scale(1.08); } 25% { transform: translate(-50%, -50%) skewX(-10deg) scale(1); } 75% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -60%) skewX(-10deg) scale(1); } }
.titular { position: fixed; left: calc(6vw + var(--sl)); bottom: calc(14vh + var(--sb)); z-index: 30; pointer-events: none; opacity: 0; display: grid; gap: 4px; }
.titular small { font-style: italic; font-weight: 700; font-size: 14px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--acento2); }
.titular b { font-family: var(--display); font-weight: 900; font-size: clamp(34px, 7vw, 64px); transform: skewX(-10deg); transform-origin: left; text-shadow: 0 6px 30px rgba(0, 0, 0, 0.5); }
.titular.activo { animation: titular 3.2s ease forwards; }
@keyframes titular { 0% { opacity: 0; transform: translateX(-30px); } 15% { opacity: 1; transform: none; } 80% { opacity: 1; } 100% { opacity: 0; } }

.consejo { position: fixed; left: 50%; top: calc(84px + var(--st)); z-index: 30; transform: translateX(-50%); max-width: 70vw; padding: 9px 16px; border-radius: 12px; background: rgba(8, 9, 14, 0.72); border: 1px solid var(--linea); font-weight: 700; font-size: 14px; letter-spacing: 0.02em; text-align: center; pointer-events: none; opacity: 0; transition: opacity 0.3s ease; }
.consejo.visible { opacity: 1; }
.consejo em { font-style: normal; color: var(--acento2); }

/* pausa y resultados */
.menu-pausa { width: min(320px, 80vw); padding: 22px; display: grid; gap: 10px; }
.menu-pausa h2 { margin: 0 0 6px; font-family: var(--display); font-size: 22px; text-align: center; }
.resultados { width: min(560px, 88vw); max-height: 92vh; padding: 18px 22px; display: grid; gap: 10px; }
.res-sup { margin: 0; font-style: italic; font-weight: 700; font-size: 12px; letter-spacing: 0.22em; color: var(--acento2); }
.resultados h2 { margin: 0; font-family: var(--display); font-size: 26px; transform: skewX(-8deg); transform-origin: left; }
.tabla { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; font-style: italic; font-stretch: 85%; }
.tabla li { display: grid; grid-template-columns: 34px 10px 1fr auto auto; gap: 10px; align-items: center; height: 30px; padding: 0 12px; border-radius: 8px; background: rgba(255, 255, 255, 0.04); font-weight: 700; font-size: 15px; }
.tabla li.yo { background: linear-gradient(90deg, rgba(255, 59, 31, 0.35), rgba(255, 59, 31, 0.08)); border: 1px solid rgba(255, 90, 60, 0.5); }
.tabla .p { font-weight: 900; font-size: 18px; }
.tabla .c { width: 10px; height: 18px; border-radius: 3px; }
.tabla .t { font-variant-numeric: tabular-nums; color: var(--tenue); }
.tabla .g { font-size: 12px; color: var(--tenue); }
.premio { display: flex; align-items: center; gap: 8px; font-style: italic; font-weight: 800; font-size: 20px; }
.premio svg { width: 20px; height: 20px; color: #3fe3ff; filter: drop-shadow(0 0 6px rgba(63, 227, 255, 0.7)); }
.premio span { font-weight: 600; font-size: 13px; color: var(--tenue); }
.res-botones { display: grid; grid-template-columns: auto auto 1fr; gap: 8px; }
.res-botones .btn { min-width: 0; justify-content: center; height: 46px; font-size: 16px; }

/* celular en vertical */
.girar { position: fixed; inset: 0; z-index: 100; display: none; place-items: center; align-content: center; gap: 12px; background: var(--fondo); text-align: center; }
.girar p { margin: 18px 0 0; font-family: var(--display); font-weight: 800; font-size: 22px; }
.girar small { color: var(--tenue); font-size: 14px; }
.girar-cel { width: 54px; height: 96px; border: 3px solid var(--tinta); border-radius: 12px; animation: girarCel 2s ease-in-out infinite; }
@keyframes girarCel { 0%, 20% { transform: rotate(0); } 50%, 80% { transform: rotate(-90deg); } 100% { transform: rotate(0); } }
@media (orientation: portrait) and (max-width: 900px) { body.movil .girar { display: grid; } }

/* pantallas bajas (Safari con barras) */
@media (max-height: 430px) {
  .hud-pos b { font-size: 60px; }
  .hud-vuelta { top: calc(64px + var(--st)); }
  .hud-tiempo { top: calc(84px + var(--st)); }
  .hud-mapa { width: 100px; height: 100px; }
  .hud-gemas { top: calc(110px + var(--st)); font-size: 17px; }
  .boton-derrape { width: 98px; height: 98px; }
  .boton-poder { right: calc(128px + var(--sr)); width: 66px; height: 66px; }
  .boton-cometa { bottom: calc(128px + var(--sb)); }
  .cartas { gap: 10px; }
  .carta { padding: 12px; }
  .carta p { display: none; }
  .ficha { padding: 16px 18px 14px; }
  .ficha h2 { font-size: 28px; }
  .stats { gap: 6px; margin-bottom: 10px; }
  .tabla li { height: 23px; font-size: 13px; }
  .tabla .g { display: none; }
  .tabla li { grid-template-columns: 28px 10px 1fr auto; }
  .res-botones .btn { height: 40px; }
  .premio { font-size: 17px; }
  .resultados { gap: 6px; padding: 14px 18px; }
  .resultados h2 { font-size: 22px; }
  .ayuda-grid { gap: 10px 18px; }
  .ayuda-grid p { font-size: 12px; }
  .menu .btn { height: 44px; }
}
