* { box-sizing: border-box; margin: 0; padding: 0; }
:root { --sena: #39a900; --sena-d: #2a7d00; --sena-l: #7bdc3a; --gold: #ffd23f; --ink: #08130a; }
html, body { height: 100%; overflow: hidden; font-family: "Trebuchet MS", "Segoe UI", sans-serif; color: #fff; background: #0b1a10; }

#game { position: fixed; inset: 0; background: linear-gradient(180deg, #4a8fe0 0%, #8cc4f5 100%); }
#game canvas { display: block; width: 100%; height: 100%; }

/* ================= HUD ================= */
:root { --sa-l: 0px; --sa-r: 0px; --sa-t: 0px; --sa-b: 0px; }   /* zona de la cámara frontal (la rellena la app de Android) */
#hud {
  position: fixed; top: 0; left: 0; right: 0; display: flex; justify-content: space-around;
  padding: 12px calc(20px + var(--sa-r)) 12px calc(20px + var(--sa-l)); pointer-events: none; text-shadow: 2px 2px 0 #000a; font-weight: 800; transition: opacity .4s;
}
body.menu #hud { opacity: 0; }
#hud div { display: flex; flex-direction: column; align-items: center; min-width: 90px; }
#hud small { font-size: 12px; letter-spacing: 2px; opacity: .9; }
#hud span { font-size: 24px; letter-spacing: 2px; }

/* ================= Logo ================= */
.logo { position: relative; display: inline-block; line-height: .85; font-weight: 900; font-style: italic; transform: rotate(-4deg); }
.logo-top, .logo-bottom { display: block; letter-spacing: 6px; -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; }
.logo-top {
  font-size: 92px; color: var(--sena);
  text-shadow: 0 6px 0 var(--sena-d), 0 10px 0 var(--ink), 0 14px 22px #0008;
}
.logo-bottom {
  font-size: 104px; color: #fff; margin-left: 70px;
  text-shadow: 0 6px 0 #c9d9c0, 0 11px 0 var(--ink), 0 16px 24px #0008;
}
#overlay .logo { animation: logoIn .9s cubic-bezier(.2, 1.6, .4, 1) both, float 4s ease-in-out 1s infinite; }
.shine {
  position: absolute; inset: -10% -20%; pointer-events: none;
  background: linear-gradient(105deg, transparent 40%, #ffffffb0 50%, transparent 60%);
  mix-blend-mode: overlay; transform: translateX(-120%); animation: shine 3.6s ease-in-out 1.2s infinite;
}
@keyframes logoIn { 0% { transform: rotate(-4deg) scale(.2) translateY(-200px); opacity: 0; } 100% { transform: rotate(-4deg) scale(1); opacity: 1; } }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }
@keyframes shine { 0%, 60% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }

/* ================= Menú ================= */
#overlay {
  position: fixed; inset: 0; display: none; z-index: 5;
  background:
    radial-gradient(ellipse at 75% 55%, transparent 0%, transparent 35%, #0006 80%),
    linear-gradient(90deg, #04120acc 0%, #04120a99 38%, transparent 62%);
}
#overlay.show { display: block; animation: fadeIn .5s both; }
@keyframes fadeIn { from { opacity: 0; } }
.rays {
  position: absolute; right: -30%; top: -60%; width: 120vmax; height: 120vmax; pointer-events: none; opacity: .18;
  background: repeating-conic-gradient(from 0deg, #fff 0deg 6deg, transparent 6deg 18deg);
  mask-image: radial-gradient(circle, #000 0%, transparent 60%); -webkit-mask-image: radial-gradient(circle, #000 0%, transparent 60%);
  animation: spin 60s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.menu-col {
  position: absolute; left: max(5vw, calc(var(--sa-l) + 14px)); top: 50%; transform: translateY(-52%);
  display: flex; flex-direction: column; align-items: flex-start; gap: 16px; width: min(560px, 90vw);
}
.subtitle {
  font-size: 15px; letter-spacing: 3px; font-weight: 800; color: #e3ffd0; text-transform: uppercase;
  background: #0007; border-left: 4px solid var(--sena); padding: 6px 12px; margin-top: 6px;
  animation: slideIn .6s .5s both;
}
@keyframes slideIn { from { transform: translateX(-40px); opacity: 0; } }
.status:empty { display: none; }
.status {
  font-size: 18px; font-weight: 800; background: #000a; border: 2px solid var(--gold); color: #fff;
  padding: 8px 14px; border-radius: 8px; line-height: 1.5;
}
.status b { color: var(--gold); }

.panel {
  width: 100%; background: linear-gradient(180deg, #0d2a14ee, #071a0cee); border: 3px solid var(--sena);
  border-radius: 14px; padding: 12px 14px 14px; box-shadow: 0 8px 0 var(--ink), 0 16px 30px #0009;
  animation: slideIn .6s .7s both;
}
.panel-title { font-size: 13px; font-weight: 900; letter-spacing: 4px; color: var(--sena-l); margin-bottom: 10px; }
.roster { display: grid; grid-template-columns: repeat(7, 1fr); gap: 7px; }
.card {
  position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; cursor: pointer; padding: 0;
  border: 3px solid #ffffff30; background: radial-gradient(circle at 50% 35%, #3f6e4a, #13251a);
  transition: transform .15s, border-color .15s, box-shadow .15s; filter: saturate(.75) brightness(.85);
}
.card img { width: 100%; height: 100%; object-fit: cover; display: block; transform: scale(1.15) translateY(4%); }
.card:hover { transform: translateY(-3px); filter: none; }
.card.on {
  border-color: var(--gold); transform: translateY(-4px) scale(1.08); filter: none; z-index: 1;
  box-shadow: 0 0 0 2px var(--ink), 0 0 18px var(--gold);
  background: radial-gradient(circle at 50% 35%, #8be04e, #2a7d00);
}
.card.on::after {
  content: "P1"; position: absolute; top: 2px; left: 4px; font-size: 10px; font-weight: 900; color: var(--ink);
  background: var(--gold); border-radius: 4px; padding: 0 4px;
}
.selected { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }
.selected button {
  width: 42px; height: 42px; flex: none; border-radius: 50%; border: 3px solid #fff; background: var(--sena);
  color: #fff; font-size: 16px; cursor: pointer; box-shadow: 0 4px 0 var(--ink);
}
.selected button:hover { background: var(--sena-l); }
.selected button:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.sel-text { text-align: center; flex: 1; }
#charName {
  font-size: 40px; font-weight: 900; letter-spacing: 4px; font-style: italic; line-height: 1;
  -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; text-shadow: 0 4px 0 var(--sena-d), 0 7px 0 var(--ink);
  transition: opacity .2s;
}
#charName.loading { opacity: .4; }
#charName.pop { animation: pop .35s cubic-bezier(.2, 1.8, .4, 1); }
@keyframes pop { from { transform: scale(.6); } }
.role { font-size: 12px; letter-spacing: 3px; color: var(--sena-l); font-weight: 800; margin-top: 4px; }

#startBtn {
  align-self: stretch; padding: 16px 0; font: 900 30px "Trebuchet MS", sans-serif; letter-spacing: 6px; font-style: italic;
  color: var(--ink); background: linear-gradient(180deg, #ffe680, var(--gold) 55%, #e0a800); cursor: pointer;
  border: 4px solid var(--ink); border-radius: 14px; box-shadow: 0 8px 0 var(--ink), 0 0 30px #ffd23f80;
  animation: slideIn .6s .9s both, pulse 1.3s ease-in-out 1.5s infinite;
}
#startBtn:hover { filter: brightness(1.08); }
#startBtn:active { transform: translateY(6px); box-shadow: 0 2px 0 var(--ink); }
@keyframes pulse { 0%, 100% { box-shadow: 0 8px 0 var(--ink), 0 0 18px #ffd23f60; } 50% { box-shadow: 0 8px 0 var(--ink), 0 0 42px #ffd23fd0; } }
.hint { font-size: 13px; color: #d7e9d0; letter-spacing: 1px; }

kbd {
  display: inline-block; min-width: 26px; padding: 2px 7px; margin: 0 2px; text-align: center; font: 800 12px "Segoe UI", sans-serif;
  color: var(--ink); background: linear-gradient(180deg, #fff, #d8e2d4); border: 2px solid var(--ink); border-radius: 6px;
  box-shadow: 0 3px 0 var(--ink);
}
.controls {
  position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px;
  padding: 12px 16px 14px; font-size: 13px; color: #e8f5e0; background: linear-gradient(0deg, #000c, transparent);
}
.controls b { color: var(--gold); }

/* ================= Mapa del mundo ================= */
body.map #hud { opacity: 0; }
#mapTop, #mapInfo { position: fixed; z-index: 4; display: none; }
body.map #mapTop, body.map #mapInfo { display: flex; }
#mapTop {
  top: 14px; left: 14px; align-items: center; gap: 14px; padding: 6px 16px 6px 6px; font-weight: 800; font-size: 15px;
  background: #0b1f4ae6; border: 3px solid #fff; border-radius: 12px; box-shadow: 0 5px 0 var(--ink); letter-spacing: 1px;
}
#mapTop img { width: 46px; height: 46px; border-radius: 8px; background: radial-gradient(circle at 50% 35%, #8be04e, #2a7d00); object-fit: cover; }
#mapTop b { color: var(--gold); }
#mapTop .sep { width: 2px; align-self: stretch; background: #fff4; }
#mapInfo {
  left: 50%; bottom: 16px; transform: translateX(-50%); flex-direction: column; align-items: center; gap: 6px;
  padding: 10px 22px; background: #0b1f4ae6; border: 3px solid #fff; border-radius: 12px; box-shadow: 0 5px 0 var(--ink);
}
#mapNode { font-size: 22px; font-weight: 900; letter-spacing: 2px; font-style: italic; }
#mapNode .ok { color: var(--sena-l); } #mapNode .lock { color: #ff8a8a; } #mapNode .go { color: var(--gold); }
#mapInfo .mk { font-size: 12px; color: #d8e4ff; }

/* Cartel tipo "WORLD 1 / MARIO x 5" */
#mapBanner {
  position: fixed; left: 50%; top: 42%; z-index: 7; min-width: min(560px, 90vw); padding: 26px 40px 24px;
  transform: translate(-50%, -50%) scale(.6); opacity: 0; pointer-events: none; text-align: center;
  background: #1d4fd8; border: 6px solid #fff; border-radius: 6px; box-shadow: 0 0 0 6px #0b1a3a, 0 18px 40px #000a;
  font-family: "Courier New", monospace; font-weight: 900; letter-spacing: 4px; transition: opacity .25s, transform .3s cubic-bezier(.2, 1.6, .4, 1);
}
#mapBanner.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.mb-world { font-size: 38px; text-shadow: 3px 3px 0 #0b1a3a; }
.mb-name { font-size: 18px; color: var(--gold); margin: 8px 0 14px; letter-spacing: 2px; }
.mb-name:empty { display: none; }
.mb-row { display: flex; align-items: center; justify-content: center; gap: 22px; font-size: 34px; text-shadow: 3px 3px 0 #0b1a3a; }
.mb-row img { width: 64px; height: 64px; object-fit: cover; image-rendering: auto; border-radius: 8px; background: #3f6fe8; }

/* ================= Jefe ================= */
#bossBar {
  position: fixed; top: 70px; left: 50%; transform: translateX(-50%); z-index: 4; display: none; align-items: center; gap: 12px;
  padding: 6px 14px; background: #1a0505d9; border: 3px solid #ff4a3a; border-radius: 10px; font-weight: 900; letter-spacing: 2px;
  box-shadow: 0 4px 0 var(--ink), 0 0 20px #ff3a2a80;
}
#bossBar.on { display: flex; }
#bossBar .bb { width: 260px; height: 16px; border: 2px solid #fff; border-radius: 8px; background: #000a; overflow: hidden; }
#bossFill { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #ff2a2a, #ffb02a); transition: width .3s; }

/* ================= Gloria ================= */
#glory {
  position: fixed; inset: 0; z-index: 9; display: none; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at center, #0000 0%, #000b 75%);
}
#glory.show { display: flex; animation: fadeIn .6s both; }
.g-rays {
  position: absolute; left: 50%; top: 50%; width: 160vmax; height: 160vmax; margin: -80vmax 0 0 -80vmax; pointer-events: none; opacity: .28;
  background: repeating-conic-gradient(from 0deg, #ffd23f 0deg 7deg, transparent 7deg 20deg);
  mask-image: radial-gradient(circle, #000 0%, transparent 55%); -webkit-mask-image: radial-gradient(circle, #000 0%, transparent 55%);
  animation: spin 30s linear infinite;
}
#confetti { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
#confetti i { position: absolute; top: -20px; width: 10px; height: 16px; border-radius: 2px; animation: fall linear infinite; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }
.g-card {
  position: relative; text-align: center; padding: 26px 46px 30px; min-width: min(560px, 92vw);
  background: linear-gradient(180deg, #0d2a14f2, #061309f2); border: 4px solid var(--gold); border-radius: 18px;
  box-shadow: 0 10px 0 var(--ink), 0 0 60px #ffd23f90; animation: gloryIn .8s cubic-bezier(.2, 1.6, .4, 1) both;
}
@keyframes gloryIn { from { transform: scale(.3) rotate(-8deg); opacity: 0; } }
.g-trophy { font-size: 90px; line-height: 1; filter: drop-shadow(0 6px 0 #000) drop-shadow(0 0 20px #ffd23f); animation: float 2.4s ease-in-out infinite; }
.g-title {
  font-size: 46px; font-weight: 900; font-style: italic; letter-spacing: 2px; margin-top: 8px; color: var(--gold);
  -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; text-shadow: 0 5px 0 #a86f00, 0 9px 0 var(--ink);
}
.g-sub { font-size: 16px; letter-spacing: 2px; color: #d7f5c6; margin: 6px 0 14px; font-weight: 800; }
.g-who { display: flex; align-items: center; justify-content: center; gap: 12px; font-size: 24px; letter-spacing: 3px; margin-bottom: 12px; }
.g-who img { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; border: 3px solid var(--gold); background: radial-gradient(circle at 50% 35%, #8be04e, #2a7d00); }
.g-stats { display: flex; justify-content: center; gap: 14px; }
.g-stats div { background: #0006; border: 2px solid #fff4; border-radius: 10px; padding: 8px 16px; min-width: 110px; }
.g-stats small { display: block; font-size: 11px; letter-spacing: 2px; color: var(--sena-l); font-weight: 900; }
.g-stats b { font-size: 26px; }
.g-bonus { margin: 14px 0 18px; font-weight: 900; letter-spacing: 3px; color: var(--ink); background: var(--gold); display: inline-block; padding: 6px 16px; border-radius: 8px; animation: pop .5s .6s both; }
#gBtn {
  display: block; width: 100%; padding: 14px 0; font: 900 26px "Trebuchet MS", sans-serif; letter-spacing: 5px; font-style: italic;
  color: var(--ink); background: linear-gradient(180deg, #ffe680, var(--gold) 55%, #e0a800); border: 4px solid var(--ink); border-radius: 14px;
  box-shadow: 0 7px 0 var(--ink); cursor: pointer; animation: pulse 1.3s ease-in-out infinite;
}

/* ================= Transición ================= */
#wipe {
  position: fixed; left: 50%; top: 50%; width: 10px; height: 10px; margin: -5px; border-radius: 50%; z-index: 8;
  background: var(--sena); pointer-events: none; transform: scale(0); box-shadow: 0 0 0 30px #fff;
}
#wipe.on { animation: wipeIn .45s ease-in forwards; }
#wipe.off { animation: wipeOut .55s ease-out forwards; }
@keyframes wipeIn { from { transform: scale(0); } to { transform: scale(400); } }
@keyframes wipeOut { from { transform: scale(400); } to { transform: scale(0); } }

/* ================= Toast ================= */
#toast {
  position: fixed; left: 0; right: 0; top: 28%; text-align: center; font-size: 56px; font-weight: 900; font-style: italic;
  color: #fff; -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill;
  text-shadow: 0 5px 0 var(--sena-d), 0 9px 0 var(--ink); opacity: 0; transition: opacity .25s; pointer-events: none; z-index: 6;
}
#toast.show { opacity: 1; }

/* ================= Carga ================= */
#loading {
  position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 30px;
  background: radial-gradient(ellipse at center, #17401f, #050d07); z-index: 10; transition: opacity .6s;
}
#loading.done { opacity: 0; pointer-events: none; }
#loading .logo { transform: rotate(-4deg) scale(.8); }
.load-bar { width: min(420px, 80vw); height: 18px; border: 3px solid #fff; border-radius: 10px; background: #0008; overflow: hidden; }
#loadBar { height: 100%; width: 0; background: repeating-linear-gradient(45deg, var(--sena) 0 14px, var(--sena-l) 14px 28px); transition: width .3s; }
#loadText { font-size: 14px; letter-spacing: 3px; color: #cfe8c4; }

@media (max-width: 800px) {
  .logo-top { font-size: 56px; } .logo-bottom { font-size: 64px; margin-left: 40px; }
  #charName { font-size: 28px; }
  .controls { display: none; }
}

/* ================= Celular ================= */
#touch, #rotate { display: none; }
body.touch { touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
body.touch #touch { display: block; position: fixed; inset: 0; z-index: 11; pointer-events: none; }
body.touch #touch > * { pointer-events: auto; }
#tPad {
  position: absolute; left: max(18px, env(safe-area-inset-left)); bottom: 18px; width: 150px; height: 150px; border-radius: 50%;
  background: radial-gradient(circle, #ffffff22 0%, #ffffff10 60%, #0000 70%); border: 3px solid #ffffff55; touch-action: none;
}
#tPad .arr { position: absolute; font-size: 20px; color: #ffffffb0; text-shadow: 0 2px 0 #0008; pointer-events: none; }
#tPad .l { left: 10px; top: 50%; transform: translateY(-50%); } #tPad .r { right: 10px; top: 50%; transform: translateY(-50%); }
#tPad .u { top: 8px; left: 50%; transform: translateX(-50%); } #tPad .d { bottom: 8px; left: 50%; transform: translateX(-50%); }
#tKnob {
  position: absolute; left: 50%; top: 50%; width: 62px; height: 62px; margin: -31px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 40% 35%, #8be04e, #2a7d00); border: 3px solid #fff; box-shadow: 0 4px 0 #0008; transition: transform .05s;
}
#tBtns { position: absolute; right: max(18px, env(safe-area-inset-right)); bottom: 18px; width: 210px; height: 160px; pointer-events: none; }
#tBtns .tb { pointer-events: auto; }
.tb {
  position: absolute; border-radius: 50%; border: 3px solid #fff; color: #fff; font: 900 26px "Trebuchet MS", sans-serif;
  display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; touch-action: none;
  box-shadow: 0 5px 0 #0009; opacity: .88;
}
.tb small { font-size: 9px; letter-spacing: 1px; margin-top: 2px; }
.tb.on { transform: translateY(4px) scale(.94); box-shadow: 0 1px 0 #0009; opacity: 1; }
.tb-a { right: 0; bottom: 6px; width: 84px; height: 84px; background: radial-gradient(circle at 40% 35%, #8be04e, #2a7d00); }
.tb-b { right: 96px; bottom: 0; width: 62px; height: 62px; font-size: 20px; background: radial-gradient(circle at 40% 35%, #ffe680, #c98a00); color: #08130a; }
.tb-j { right: 70px; bottom: 82px; width: 60px; height: 60px; font-size: 26px; background: radial-gradient(circle at 40% 35%, #ff8a8a, #b0201a); }
#tTop { position: absolute; top: 10px; right: max(12px, env(safe-area-inset-right), var(--sa-r)); display: flex; gap: 8px; }
.ts { width: 40px; height: 40px; border-radius: 10px; border: 2px solid #fff; background: #0008; color: #fff; font-size: 16px; touch-action: none; }
/* en el menú se usa la pantalla táctil normal (tarjetas y botón JUGAR) */
body.touch.menu #tPad, body.touch.menu #tBtns, body.touch.menu .ts[data-key] { display: none; }
body.touch.map .tb-b, body.touch.map .tb-j { display: none; }
body.touch .controls, body.touch .hint, body.touch #mapInfo .mk { display: none; }

#rotate {
  position: fixed; inset: 0; z-index: 20; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center;
  background: radial-gradient(ellipse at center, #17401f, #050d07); font-size: 22px;
}
#rotate span { font-size: 14px; color: #cfe8c4; }
#rotate .phone { font-size: 70px; animation: turn 1.6s ease-in-out infinite; }
@keyframes turn { 0%, 30% { transform: rotate(0); } 60%, 100% { transform: rotate(-90deg); } }
@media (orientation: portrait) { body.touch #rotate { display: flex; } }

/* pantallas bajitas (celular horizontal) */
@media (max-height: 520px) {
  .logo-top { font-size: 46px; -webkit-text-stroke-width: 2px; } .logo-bottom { font-size: 52px; margin-left: 34px; }
  .menu-col { gap: 7px; width: min(440px, 58vw); left: 3vw; }
  .subtitle { font-size: 11px; padding: 3px 8px; margin-top: 0; }
  .panel { padding: 7px 9px 9px; } .panel-title { font-size: 10px; margin-bottom: 5px; }
  .roster { gap: 4px; } .selected { margin-top: 6px; } .selected button { width: 32px; height: 32px; font-size: 12px; }
  #charName { font-size: 24px; } .role { font-size: 9px; }
  #startBtn { padding: 8px 0; font-size: 20px; border-width: 3px; }
  .status { font-size: 12px; padding: 4px 8px; }
  #hud { padding: 4px 10px; } #hud small { font-size: 9px; } #hud span { font-size: 16px; } #hud div { min-width: 60px; }
  body.touch #hud { right: 160px; }
  #toast { font-size: 30px; top: 22%; }
  #mapTop { top: 8px; left: 8px; font-size: 12px; padding: 4px 10px 4px 4px; } #mapTop img { width: 34px; height: 34px; }
  #mapInfo { bottom: 8px; padding: 6px 14px; } #mapNode { font-size: 15px; }
  body.touch #mapInfo { bottom: auto; top: 58px; }
  #mapBanner { padding: 14px 22px; } .mb-world { font-size: 24px; } .mb-row { font-size: 22px; } .mb-row img { width: 42px; height: 42px; }
  .g-card { padding: 12px 22px 14px; } .g-trophy { font-size: 46px; } .g-title { font-size: 26px; }
  .g-sub { font-size: 11px; margin: 3px 0 6px; } .g-who { font-size: 16px; margin-bottom: 6px; } .g-who img { width: 38px; height: 38px; }
  .g-stats div { padding: 4px 10px; min-width: 80px; } .g-stats b { font-size: 18px; } .g-bonus { margin: 7px 0 9px; font-size: 12px; }
  #gBtn { padding: 8px 0; font-size: 18px; }
  #bossBar { top: 44px; } #bossBar .bb { width: 160px; }
  #tPad { width: 128px; height: 128px; bottom: 12px; } #tKnob { width: 52px; height: 52px; margin: -26px; }
  #tBtns { bottom: 10px; transform: scale(.88); transform-origin: right bottom; }
}

/* ================= Ajustes de controles ================= */
/* posiciones personalizadas: cada control se centra en (--x, --y) en % de la pantalla y se escala con --s */
body.touch #tBtns { inset: 0; width: auto; height: auto; transform: none; }
body.touch #tPad, body.touch .tb {
  left: var(--x); top: var(--y); right: auto; bottom: auto; margin: 0;
  transform: translate(-50%, -50%) scale(var(--s, 1)); opacity: var(--op, .88);
}
body.touch .tb.on { transform: translate(-50%, -50%) scale(calc(var(--s, 1) * .92)); opacity: 1; box-shadow: 0 1px 0 #0009; }
.ts#tGear { font-size: 20px; }
body.touch.menu #tTop .ts#tGear { display: block; }

#tSettings {
  position: fixed; inset: 0; z-index: 30; display: none; align-items: center; justify-content: center;
  background: #000b; padding: 10px;
}
#tSettings.show { display: flex; }
.ts-card {
  width: min(440px, 94vw); max-height: 94vh; overflow-y: auto; padding: 14px 18px 16px; border-radius: 16px;
  background: linear-gradient(180deg, #0d2a14f5, #061309f5); border: 3px solid var(--sena); box-shadow: 0 8px 0 var(--ink);
  display: flex; flex-direction: column; gap: 9px; font-weight: 800;
}
.ts-title { font-size: 18px; letter-spacing: 2px; color: var(--gold); text-align: center; }
.ts-card label { display: flex; flex-wrap: wrap; justify-content: space-between; font-size: 13px; gap: 4px; }
.ts-card label b { color: var(--sena-l); }
.ts-card input[type=range] { width: 100%; accent-color: var(--sena); height: 22px; }
.ts-card label.chk { justify-content: flex-start; align-items: center; gap: 10px; }
.ts-card input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--sena); }
.ts-row { display: flex; gap: 10px; }
.ts-row button {
  flex: 1; padding: 10px 0; border-radius: 10px; border: 3px solid var(--ink); font: 900 14px "Trebuchet MS", sans-serif;
  background: #d8e2d4; color: var(--ink); box-shadow: 0 4px 0 var(--ink); letter-spacing: 1px;
}
.ts-row button.big { background: linear-gradient(180deg, #8be04e, #2a7d00); color: #fff; font-size: 15px; }
.ts-row button.ok { background: linear-gradient(180deg, #ffe680, var(--gold) 55%, #e0a800); }
.ts-row button:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }

/* modo mover: los controles muestran un marco y se arrastran */
#tEditBar {
  position: fixed; top: 8px; left: 50%; transform: translateX(-50%); z-index: 31; display: none; align-items: center; gap: 12px;
  padding: 6px 8px 6px 14px; background: #0b1f4af0; border: 3px solid #fff; border-radius: 12px; font-weight: 800; font-size: 13px;
}
#tEditBar button { padding: 8px 14px; border-radius: 8px; border: 3px solid var(--ink); background: var(--gold); font: 900 13px sans-serif; }
body.tedit #tEditBar { display: flex; }
body.tedit #touch { z-index: 29; }
body.tedit #tPad, body.tedit .tb { outline: 3px dashed var(--gold); outline-offset: 6px; opacity: 1; animation: wiggle .5s ease-in-out infinite alternate; }
body.tedit #tPad.drag, body.tedit .tb.drag { outline-color: #fff; animation: none; }
body.tedit #tTop { display: none; }
body.tedit::before { content: ""; position: fixed; inset: 0; background: #0006; z-index: 28; }
@keyframes wiggle { from { rotate: -1.5deg; } to { rotate: 1.5deg; } }
/* en el menú también se pueden mover (se muestran mientras se edita) */
body.touch.menu.tedit #tPad, body.touch.menu.tedit #tBtns { display: block; }
body.touch.map.tedit .tb-b, body.touch.map.tedit .tb-j { display: flex; }

body.touch #hud { right: 160px; }
/* el contenedor de botones ocupa toda la pantalla: no debe tapar la cruceta */
body.touch #touch > #tBtns { pointer-events: none; }

/* ================= Poderes ================= */
.cpow { font-size: 12px; font-weight: 900; margin-top: 4px; color: var(--gold); letter-spacing: 1px; }
.cpow small { display: block; font-size: 10px; color: #d7f5c6; letter-spacing: 0; font-weight: 700; margin-top: 2px; }
#powerHud {
  position: fixed; left: 16px; bottom: 16px; z-index: 4; display: flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px;
  background: #0009; border: 2px solid #fff6; border-radius: 40px; font-weight: 900; pointer-events: none; transition: opacity .3s;
}
body.menu #powerHud, body.map #powerHud, body.touch #powerHud { opacity: 0; }
.ph-ring {
  width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; font-size: 24px;
  background: conic-gradient(var(--pc, #ffd23f) calc(var(--p, 100) * 1%), #ffffff22 0); position: relative;
}
.ph-ring::before { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: #0b1a10; }
.ph-ring span { position: relative; font-size: 22px; font-family: monospace; font-weight: 900; }
#powerHud.ready .ph-ring { box-shadow: 0 0 18px var(--pc); animation: pulse2 1s ease-in-out infinite; }
@keyframes pulse2 { 50% { transform: scale(1.08); } }
.ph-txt b { display: block; font-size: 14px; letter-spacing: 1px; color: var(--pc, #ffd23f); }
.ph-txt small { font-size: 11px; color: #e8f5e0; }

#powerFlash { position: fixed; inset: 0; z-index: 5; pointer-events: none; opacity: 0;
  background: radial-gradient(circle at 50% 62%, var(--pc, #fff) 0%, transparent 62%); mix-blend-mode: screen; }
#powerFlash.on { animation: pflash .55s ease-out; }
@keyframes pflash { 0% { opacity: .95; } 100% { opacity: 0; } }
#powerBanner {
  position: fixed; left: 50%; top: 20%; z-index: 7; display: flex; align-items: center; gap: 14px; pointer-events: none;
  padding: 8px 60px; opacity: 0; transform: translate(-50%, -50%);
  background: linear-gradient(90deg, transparent, var(--pc, #ffd23f) 22%, var(--pc, #ffd23f) 78%, transparent);
  font: italic 900 36px "Trebuchet MS", sans-serif; letter-spacing: 3px; color: #fff; white-space: nowrap;
  -webkit-text-stroke: 2px #08130a; paint-order: stroke fill; text-shadow: 0 4px 0 #08130a;
}
#powerBanner #pbIcon { font-size: 40px; font-family: monospace; }
#powerBanner.show { animation: pban 1.3s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes pban {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.3) skewX(-20deg); }
  14% { opacity: 1; transform: translate(-50%, -50%) scale(1.18) skewX(-8deg); }
  24% { transform: translate(-50%, -50%) scale(1) skewX(-8deg); }
  78% { opacity: 1; transform: translate(-50%, -50%) scale(1) skewX(-8deg); }
  100% { opacity: 0; transform: translate(-50%, -80%) scale(1.05) skewX(-8deg); }
}
#sprintFx {
  position: fixed; inset: 0; z-index: 3; pointer-events: none; display: none; justify-content: space-around; align-items: flex-start;
  padding-top: 70px; box-shadow: inset 0 0 140px #39d98acc; background: linear-gradient(180deg, #39d98a22, transparent 40%);
}
#sprintFx.on { display: flex; animation: fadeIn .3s; }
#sprintFx span { font: 900 18px monospace; letter-spacing: 4px; color: #39d98a99; border-bottom: 3px solid #39d98a66; padding: 0 30px 4px; }
#sprintFx b { position: absolute; left: 50%; top: 110px; transform: translateX(-50%); font: 900 48px monospace; color: #ffffffcc; text-shadow: 0 0 20px #39d98a; }
/* botón de poder (celular) */
.tb-p { width: 66px; height: 66px; font-size: 24px; color: #fff;
  background: radial-gradient(circle at 50% 50%, #0b1a10 58%, transparent 60%), conic-gradient(var(--pc, #ffd23f) calc(var(--p, 100) * 1%), #ffffff33 0); }
.tb-p span { font-family: monospace; font-weight: 900; }
.tb-p.ready { box-shadow: 0 0 18px var(--pc), 0 5px 0 #0009; }
body.touch.map .tb-p { display: none; }
body.touch.map.tedit .tb-p { display: flex; }
@media (max-height: 520px) {
  #powerBanner { font-size: 22px; padding: 6px 40px; } #powerBanner #pbIcon { font-size: 26px; }
  #sprintFx { padding-top: 46px; } #sprintFx span { font-size: 12px; } #sprintFx b { top: 70px; font-size: 30px; }
  .cpow { font-size: 10px; margin-top: 2px; } .cpow small { display: none; }
}

/* poder bloqueado (misión pendiente) */
#powerHud.locked .ph-ring { filter: grayscale(1); opacity: .8; }
.cpow .ok { color: var(--sena-l); }

/* ================= Cuenta y amigos ================= */
.chip {
  position: fixed; top: 12px; right: 14px; z-index: 6; display: none; padding: 8px 16px; border-radius: 22px; cursor: pointer;
  border: 3px solid var(--sena); background: #0b1f10e6; color: #fff; font: 800 14px "Trebuchet MS", sans-serif; box-shadow: 0 4px 0 var(--ink);
}
body.menu .chip { display: block; }
body.touch.menu .chip { right: 66px; }
.chip:hover { background: var(--sena-d); }
.chip.alert::after { content: "!"; margin-left: 8px; padding: 0 7px; border-radius: 10px; background: #ff4a4a; font-weight: 900; }
#acctModal { position: fixed; inset: 0; z-index: 40; display: none; align-items: center; justify-content: center; background: #000b; padding: 10px; }
#acctModal.show { display: flex; }
.acct-card {
  position: relative; width: min(440px, 96vw); max-height: 94vh; overflow-y: auto; padding: 16px 18px 14px; border-radius: 16px;
  background: linear-gradient(180deg, #0d2a14f8, #061309f8); border: 3px solid var(--sena); box-shadow: 0 8px 0 var(--ink);
}
.acct-x { position: absolute; top: 6px; right: 10px; font-size: 28px; background: none; border: 0; color: #fff; cursor: pointer; line-height: 1; }
.acct-title { font-size: 18px; font-weight: 900; letter-spacing: 2px; color: var(--gold); text-align: center; }
.acct-sub { text-align: center; font-size: 12px; color: #cfe8c4; margin: 4px 0 12px; }
.tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.tabs button { flex: 1; padding: 8px 0; border: 2px solid #ffffff44; border-radius: 10px; background: #0006; color: #fff; font: 800 14px "Trebuchet MS", sans-serif; cursor: pointer; }
.tabs button.on { background: var(--sena); border-color: #fff; }
#acctForm { display: flex; flex-direction: column; gap: 9px; }
#acctForm label, .acct-card label { font-size: 12px; font-weight: 800; letter-spacing: 1px; color: var(--sena-l); display: flex; flex-direction: column; gap: 4px; }
.acct-card input[type=text], .acct-card input[type=password] {
  padding: 10px 12px; border-radius: 10px; border: 2px solid #ffffff55; background: #04100a; color: #fff; font-size: 16px; font-family: inherit;
}
.acct-card input:focus { outline: none; border-color: var(--gold); }
.hint2 { font-size: 11px; color: #d7e9d0; min-height: 14px; }
.go { padding: 12px 0; border-radius: 12px; border: 3px solid var(--ink); font: 900 18px "Trebuchet MS", sans-serif; letter-spacing: 3px; cursor: pointer;
  background: linear-gradient(180deg, #ffe680, var(--gold) 55%, #e0a800); color: var(--ink); box-shadow: 0 5px 0 var(--ink); }
.go:disabled { opacity: .6; }
#acctMsg { min-height: 18px; margin-top: 8px; font-size: 13px; font-weight: 800; color: #ff9a9a; text-align: center; }
#acctMsg.good { color: var(--sena-l); }
.me { display: flex; flex-direction: column; gap: 8px; background: #0006; border: 2px solid #ffffff22; border-radius: 12px; padding: 10px 12px; margin-bottom: 10px; }
.me small { display: block; font-size: 10px; letter-spacing: 1px; color: var(--sena-l); font-weight: 900; }
.me b { font-size: 20px; } .me .code { font-family: monospace; color: var(--gold); letter-spacing: 2px; margin-right: 8px; }
.ptitle { font-size: 11px; letter-spacing: 2px; font-weight: 900; color: var(--sena-l); margin: 12px 0 6px; text-transform: uppercase; }
.srow { display: flex; gap: 8px; } .srow input { flex: 1; min-width: 0; }
.prow { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 10px; background: #ffffff0d; margin-bottom: 5px; }
.pdot { width: 10px; height: 10px; border-radius: 50%; background: #888; flex: none; } .pdot.on { background: #39d98a; box-shadow: 0 0 8px #39d98a; }
.pinfo { flex: 1; min-width: 0; } .pinfo b { display: block; font-size: 15px; } .pinfo small { color: #bcd6b4; font-size: 11px; }
.pact { display: flex; gap: 6px; } .pempty { font-size: 12px; color: #bcd6b4; padding: 6px 2px; }
.mini { padding: 6px 11px; border-radius: 8px; border: 2px solid var(--ink); background: #d8e2d4; color: var(--ink); font: 800 12px "Trebuchet MS", sans-serif; cursor: pointer; }
.mini.ok { background: var(--sena-l); } .mini.danger { background: #ff9a9a; }
.acct-foot { display: flex; justify-content: space-between; margin-top: 14px; padding-top: 10px; border-top: 1px solid #ffffff22; }
@media (max-height: 520px) {
  .chip { top: 8px; padding: 5px 12px; font-size: 12px; } .acct-card { padding: 10px 14px; } .acct-sub { margin-bottom: 6px; }
  .go { padding: 8px 0; font-size: 15px; }
}

.gbtn { width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 11px 0; border-radius: 12px; border: 3px solid var(--ink);
  background: #fff; color: #222; font: 800 15px "Trebuchet MS", sans-serif; cursor: pointer; box-shadow: 0 4px 0 var(--ink); margin-bottom: 4px; }
.gbtn:disabled { opacity: .6; }
.or { display: flex; align-items: center; gap: 10px; margin: 10px 0 10px; font-size: 11px; color: #bcd6b4; letter-spacing: 1px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: #ffffff33; }
.me > div { display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }

/* ================= Sin emojis: iconos propios ================= */
.ico { vertical-align: -3px; }
#tPad .arr { width: 0; height: 0; font-size: 0; border: 8px solid transparent; }
#tPad .l { border-right: 11px solid #ffffffb0; border-left: 0; } #tPad .r { border-left: 11px solid #ffffffb0; border-right: 0; }
#tPad .u { border-bottom: 11px solid #ffffffb0; border-top: 0; } #tPad .d { border-top: 11px solid #ffffffb0; border-bottom: 0; }
#rotate .phone { width: 44px; height: 76px; border: 5px solid #fff; border-radius: 10px; position: relative; font-size: 0; }
#rotate .phone::after { content: ""; position: absolute; left: 50%; bottom: 5px; width: 14px; height: 3px; margin-left: -7px; border-radius: 2px; background: #fff; }
.g-trophy { color: var(--gold); }
.ph-ring span { display: grid; place-items: center; } .ph-ring svg { display: block; }
#powerBanner #pbIcon { display: flex; }
.tb-p span { display: block; line-height: 0; }
.selected button svg, #startBtn svg { display: block; } #startBtn { display: flex; align-items: center; justify-content: center; gap: 12px; }
.selected button { display: grid; place-items: center; }

/* ================= Retos, seguridad y recuperación ================= */
.linkbtn { background: none; border: 0; color: var(--sena-l); font: 700 13px "Trebuchet MS", sans-serif; text-decoration: underline; cursor: pointer; padding: 8px 0 0; align-self: center; }
#acctMain { display: flex; flex-direction: column; }
#acctRecover { display: flex; flex-direction: column; gap: 9px; } #acctRecover[hidden], [hidden] { display: none !important; }
.rc-title { font-size: 16px; font-weight: 900; letter-spacing: 1px; color: var(--gold); text-align: center; }
.go.small { padding: 9px 0; font-size: 15px; letter-spacing: 2px; }
.bigcode { font: 900 30px monospace; letter-spacing: 3px; text-align: center; color: var(--gold); background: #04100a; border: 2px dashed var(--gold); border-radius: 12px; padding: 16px 6px; margin: 12px 0; user-select: all; }
.subtabs { display: flex; gap: 6px; margin: 4px 0 10px; }
.subtabs button { flex: 1; padding: 8px 0; border: 2px solid #ffffff33; border-radius: 10px; background: #0006; color: #fff; font: 800 13px "Trebuchet MS", sans-serif; cursor: pointer; }
.subtabs button.on { background: var(--sena); border-color: #fff; }
.subtabs i { font-style: normal; display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 4px; border-radius: 9px; background: #ff4a4a; font-size: 11px; line-height: 18px; }
.alertbox { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; padding: 8px 10px; border-radius: 10px; border: 2px solid var(--gold); background: #ffd23f22; font-size: 12px; font-weight: 800; }
.acct-card select { width: 100%; padding: 9px 10px; border-radius: 10px; border: 2px solid #ffffff55; background: #04100a; color: #fff; font-size: 14px; font-family: inherit; }
#chForm { display: flex; flex-direction: column; gap: 8px; margin-bottom: 6px; }
.prow.col { flex-direction: column; align-items: stretch; gap: 4px; }
.prow.in { display: flex; align-items: center; gap: 10px; background: none; padding: 0; margin: 0; }
.cstatus { font-size: 12px; font-weight: 800; color: #d7e9d0; padding-left: 2px; }
.cstatus.win { color: var(--sena-l); } .cstatus.lose { color: #ff9a9a; }
@media (max-height: 520px) { .bigcode { font-size: 22px; padding: 10px 4px; margin: 6px 0; } .subtabs button { padding: 5px 0; } }

body.touch.menu .chip { right: 108px; }

/* ================= Pantallas completas: entrada, perfil y llave ================= */
.screen { position: fixed; inset: 0; z-index: 9; display: none; overflow: hidden; background: #04120a; }
.screen.show { display: block; animation: fadeIn .45s both; }
#codeScreen.show { display: flex; align-items: center; justify-content: center; }
.bgimg { position: absolute; inset: -4%; background-size: cover; background-position: center; filter: blur(3px) brightness(.78) saturate(1.3); animation: drift 45s ease-in-out infinite alternate; }
@keyframes drift { from { transform: scale(1.04) translateX(-1.5%); } to { transform: scale(1.1) translateX(1.5%); } }
.bgshade { position: absolute; inset: 0; background: radial-gradient(ellipse at 35% 45%, #0000 0%, #020a05aa 90%), linear-gradient(180deg, #02100a44, #02100a99); }
body.acct-open .chip, body.acct-open #tTop { display: none !important; }
.msg { min-height: 20px; margin-top: 8px; font-size: 13px; font-weight: 800; color: #ff9a9a; text-align: center; }
.msg.good { color: var(--sena-l); }

/* monedas decorativas que suben */
.coinfx { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.coinfx i { position: absolute; bottom: -50px; left: var(--x); width: var(--s); height: var(--s); border-radius: 50%; opacity: 0;
  background: radial-gradient(circle at 35% 30%, #fff3b0, #ffd23f 45%, #c98a00); border: 2px solid #7a5200; animation: coinrise var(--t) linear var(--d) infinite; }
@keyframes coinrise { 0% { transform: translateY(0) rotateY(0); opacity: 0; } 10%, 85% { opacity: .75; } 100% { transform: translateY(-115vh) rotateY(900deg); opacity: 0; } }

/* ---- Entrada ---- */
.checking-txt { display: none; position: absolute; inset: 0; z-index: 2; align-items: center; justify-content: center; gap: 14px; font-weight: 800; letter-spacing: 2px; color: #cfe8c4; }
.screen.checking .checking-txt { display: flex; } .screen.checking .auth-wrap { opacity: 0; pointer-events: none; }
.spin { width: 22px; height: 22px; border-radius: 50%; border: 3px solid #ffffff40; border-top-color: var(--gold); animation: spin 0.9s linear infinite; }
.auth-wrap { position: relative; height: 100%; display: flex; align-items: center; justify-content: center; gap: clamp(24px, 7vw, 110px); padding: 20px 5vw; transition: opacity .3s; }
.auth-hero { flex: 0 1 480px; }
.logo.big .logo-top { font-size: clamp(64px, 11vw, 120px); } .logo.big .logo-bottom { font-size: clamp(72px, 12.5vw, 136px); margin-left: clamp(40px, 7vw, 90px); }
.logo.big { animation: logoIn .9s cubic-bezier(.2, 1.6, .4, 1) both, float 4s ease-in-out 1s infinite; }
.hero-sub { margin: 22px 0 18px; font-size: 15px; letter-spacing: 3px; font-weight: 800; text-transform: uppercase; color: #e3ffd0; border-left: 4px solid var(--sena); padding: 4px 12px; background: #0006; display: inline-block; }
.feats { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.feats li { display: flex; align-items: center; gap: 14px; }
.feats svg { flex: none; padding: 9px; box-sizing: content-box; border-radius: 12px; background: #39a90033; border: 2px solid var(--sena); color: var(--sena-l); }
.feats b { display: block; font-size: 15px; } .feats small { color: #bcd6b4; font-size: 12px; }
.auth-card { flex: 0 0 auto; width: min(410px, 92vw); max-height: 94vh; overflow-y: auto; padding: 20px 22px 16px; border-radius: 20px; position: relative;
  background: linear-gradient(180deg, #0d2a14f2, #061309f5); border: 3px solid var(--sena); box-shadow: 0 10px 0 var(--ink), 0 24px 60px #000a; animation: slideIn .6s .25s both; }
.auth-card .tabs { margin-bottom: 12px; } .auth-card .gbtn { margin-bottom: 0; }
#acctMain { display: flex; flex-direction: column; } .auth-card form { display: flex; flex-direction: column; gap: 10px; }
.auth-card label, .ppanel label { font-size: 12px; font-weight: 800; letter-spacing: 1px; color: var(--sena-l); display: flex; flex-direction: column; gap: 4px; }
.auth-card input[type=text], .auth-card input[type=password], .ppanel input[type=text] { padding: 11px 13px; border-radius: 11px; border: 2px solid #ffffff55; background: #04100a; color: #fff; font-size: 16px; font-family: inherit; width: 100%; }
.auth-card input:focus, .ppanel input:focus, .ppanel select:focus { outline: none; border-color: var(--gold); }
.guest { padding: 11px 0; border-radius: 12px; border: 2px solid #ffffff77; background: #ffffff10; color: #fff; font: 800 15px "Trebuchet MS", sans-serif; cursor: pointer; letter-spacing: 1px; }
.guest:hover { background: #ffffff22; }
.guest-note { text-align: center; font-size: 11px; color: #bcd6b4; margin-top: 6px; }
#acctRecover { display: flex; flex-direction: column; gap: 10px; }

/* ---- Llave de recuperación ---- */
.code-card { position: relative; width: min(580px, 94vw); padding: 26px 28px 20px; text-align: center; border-radius: 22px;
  background: linear-gradient(180deg, #0d2a14f5, #061309f8); border: 3px solid var(--gold); box-shadow: 0 10px 0 var(--ink), 0 0 70px #ffd23f55; animation: gloryIn .7s cubic-bezier(.2, 1.4, .4, 1) both; }
.keyico { color: var(--gold); display: flex; justify-content: center; filter: drop-shadow(0 4px 0 #000) drop-shadow(0 0 16px #ffd23f99); }
.code-title { margin-top: 6px; font-size: 24px; font-weight: 900; font-style: italic; letter-spacing: 2px; color: var(--gold); -webkit-text-stroke: 1.5px var(--ink); paint-order: stroke fill; text-shadow: 0 4px 0 #a86f00; }
.code-sub { margin: 8px auto 16px; max-width: 440px; font-size: 13px; color: #d7f5c6; line-height: 1.45; }
.codeboxes { display: flex; gap: 10px; justify-content: center; margin-bottom: 14px; }
.codeboxes span { font: 900 clamp(22px, 5vw, 40px) monospace; letter-spacing: 3px; padding: 14px 14px; border-radius: 12px; background: #04100a; border: 3px solid var(--gold); color: var(--gold); text-shadow: 0 0 16px #ffd23f88; user-select: all; }
.code-actions { display: flex; gap: 10px; justify-content: center; margin-bottom: 14px; }
.chk2 { flex-direction: row !important; align-items: center; justify-content: center; gap: 10px !important; font-size: 13px !important; letter-spacing: 0 !important; color: #fff !important; margin-bottom: 12px; cursor: pointer; display: flex; }
.chk2 input { width: 20px; height: 20px; accent-color: var(--sena); }
.code-card .go { width: 100%; } .go:disabled { opacity: .4; cursor: not-allowed; }

/* ---- Perfil ---- */
.prof-top { position: relative; height: 60px; display: flex; align-items: center; justify-content: space-between; padding: 0 4vw; }
.prof-top > * { flex: 1; } .prof-spacer { visibility: hidden; }
.prof-title { text-align: center; font-size: 22px; font-weight: 900; font-style: italic; letter-spacing: 6px; color: #fff; -webkit-text-stroke: 1.5px var(--ink); paint-order: stroke fill; text-shadow: 0 3px 0 var(--sena-d); }
.backbtn { flex: 0 0 auto !important; display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px 8px 10px; border-radius: 22px; border: 3px solid var(--sena); background: #0b1f10e6; color: #fff; font: 800 14px "Trebuchet MS", sans-serif; cursor: pointer; box-shadow: 0 4px 0 var(--ink); }
.backbtn:hover { background: var(--sena-d); }
.prof-wrap { position: absolute; top: 60px; bottom: 0; left: 0; right: 0; display: grid; grid-template-columns: minmax(230px, 310px) 1fr; gap: 22px; padding: 6px 4vw 22px; }
.pcard { overflow-y: auto; padding: 18px 18px 16px; border-radius: 20px; text-align: center; background: linear-gradient(180deg, #0d2a14f2, #061309f5); border: 3px solid var(--sena); box-shadow: 0 8px 0 var(--ink), 0 20px 50px #000a; animation: slideIn .5s both; }
.pframe { position: relative; width: min(190px, 60%); aspect-ratio: 1; margin: 0 auto 12px; border-radius: 22px; overflow: hidden; border: 4px solid var(--gold);
  background: radial-gradient(circle at 50% 35%, #8be04e, #2a7d00); box-shadow: 0 0 0 3px var(--ink), 0 0 30px #ffd23f66; }
.pframe img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.15) translateY(4%); display: block; }
.pbadge { position: absolute; left: 6px; bottom: 6px; padding: 2px 9px; border-radius: 8px; background: var(--gold); color: var(--ink); font: 900 11px "Trebuchet MS", sans-serif; letter-spacing: 1px; }
.pname { font-size: 26px; font-weight: 900; font-style: italic; letter-spacing: 1px; word-break: break-all; -webkit-text-stroke: 1.5px var(--ink); paint-order: stroke fill; text-shadow: 0 3px 0 var(--sena-d); }
.pid { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 8px 0 4px; flex-wrap: wrap; }
.pid small { font-size: 10px; letter-spacing: 2px; color: var(--sena-l); font-weight: 900; }
.pid b { font: 900 19px monospace; letter-spacing: 2px; color: var(--gold); }
.pchar { font-size: 12px; color: #bcd6b4; margin-bottom: 12px; letter-spacing: 1px; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.stats div { padding: 10px 6px; border-radius: 12px; background: #0006; border: 2px solid #ffffff1f; }
.stats b { display: block; font-size: 22px; color: var(--gold); } .stats small { font-size: 10px; letter-spacing: 1px; color: #bcd6b4; text-transform: uppercase; font-weight: 800; }
.ppanel { display: flex; flex-direction: column; min-height: 0; padding: 14px 16px 10px; border-radius: 20px; background: linear-gradient(180deg, #0b2012ee, #061309f2); border: 3px solid #ffffff2a; box-shadow: 0 8px 0 var(--ink), 0 20px 50px #000a; animation: slideIn .5s .1s both; }
.ppanel .subtabs { margin: 0 0 12px; } .ppanel .subtabs button { padding: 11px 0; font-size: 14px; }
.pbody { flex: 1; min-height: 0; overflow-y: auto; padding-right: 4px; }
.ppanel .srow { margin-bottom: 4px; } .ppanel .ptitle { margin-top: 16px; }
.frow { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-bottom: 10px; }
.ppanel select { width: 100%; padding: 10px 11px; border-radius: 10px; border: 2px solid #ffffff55; background: #04100a; color: #fff; font-size: 14px; font-family: inherit; }
.ppanel .prow { padding: 10px 12px; } .ppanel .pinfo b { font-size: 16px; }
.mini.big { padding: 9px 16px; font-size: 14px; }
.ppanel .acct-foot { border: 0; margin-top: 4px; padding-top: 0; justify-content: flex-start; gap: 10px; }
.ppanel .alertbox { margin-bottom: 10px; }

@media (max-width: 860px) { .auth-hero { display: none; } .prof-wrap { grid-template-columns: 1fr; overflow-y: auto; } .pcard { overflow: visible; } }
@media (max-height: 520px) {
  .auth-wrap { gap: 3vw; padding: 8px 3vw; } .auth-hero { flex-basis: 300px; }
  .logo.big .logo-top { font-size: 52px; } .logo.big .logo-bottom { font-size: 60px; margin-left: 40px; }
  .hero-sub { margin: 10px 0 8px; font-size: 11px; letter-spacing: 2px; } .feats { gap: 6px; } .feats small { display: none; } .feats b { font-size: 12px; }
  .feats svg { width: 18px; height: 18px; padding: 6px; } .auth-card { padding: 12px 16px 10px; } .auth-card .tabs { margin-bottom: 8px; }
  .auth-card form, #acctRecover { gap: 6px; } .auth-card input[type=text], .auth-card input[type=password] { padding: 7px 10px; font-size: 14px; }
  .auth-card label { font-size: 10px; gap: 2px; } .hint2 { min-height: 0; } .guest { padding: 8px 0; font-size: 13px; } .guest-note { font-size: 10px; margin-top: 3px; }
  .or { margin: 6px 0; } .go { padding: 9px 0; font-size: 15px; } .gbtn { padding: 8px 0; font-size: 13px; }
  .code-card { padding: 12px 18px 10px; } .keyico svg { width: 34px; height: 34px; } .code-title { font-size: 17px; } .code-sub { font-size: 11px; margin: 4px auto 8px; }
  .codeboxes { margin-bottom: 8px; } .codeboxes span { padding: 8px 10px; font-size: 22px; } .code-actions { margin-bottom: 8px; } .chk2 { margin-bottom: 8px; font-size: 12px !important; }
  .prof-top { height: 44px; } .prof-title { font-size: 16px; letter-spacing: 4px; } .backbtn { padding: 5px 12px 5px 6px; font-size: 12px; }
  .prof-wrap { top: 44px; gap: 12px; padding: 4px 3vw 10px; grid-template-columns: 200px 1fr; }
  .pcard { padding: 10px 10px 8px; } .pframe { width: 78px; margin-bottom: 6px; border-width: 3px; } .pname { font-size: 18px; } .pid b { font-size: 14px; } .pchar { margin-bottom: 6px; font-size: 10px; }
  .stats { gap: 5px; } .stats div { padding: 5px 2px; } .stats b { font-size: 15px; } .stats small { font-size: 8px; }
  .ppanel { padding: 8px 10px 6px; } .ppanel .subtabs { margin-bottom: 8px; } .ppanel .subtabs button { padding: 7px 0; font-size: 12px; }
  .ppanel .prow { padding: 6px 8px; } .ppanel .pinfo b { font-size: 13px; }
}
@media (max-height: 520px) and (max-width: 860px) { .prof-wrap { grid-template-columns: 170px 1fr; overflow: hidden; } .pcard { overflow-y: auto; } }

.ppower { margin-top: 12px; padding: 10px 10px 9px; border-radius: 12px; background: #0006; border: 2px solid #ffffff1f; text-align: left; }
.ppower small { display: block; font-size: 10px; letter-spacing: 2px; font-weight: 900; color: var(--sena-l); margin-bottom: 4px; }
.ppower b { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--gold); } .ppower span { display: block; margin-top: 3px; font-size: 11px; color: #d7e9d0; line-height: 1.35; }
@media (max-height: 520px) { .ppower { display: none; } }

/* ---- celular horizontal: la tarjeta de entrada en dos columnas para que quepa todo ---- */
@media (max-height: 520px) {
  .auth-card { width: min(640px, 96vw); padding: 10px 14px 8px; }
  #acctMain { display: grid; grid-template-columns: 1fr 1fr; grid-template-areas: "tabs tabs" "google guest" "form form" "forgot note"; column-gap: 12px; row-gap: 6px; align-items: center; }
  #acctMain .tabs { grid-area: tabs; margin: 0; } #acctMain .gbtn { grid-area: google; } #acctMain .guest { grid-area: guest; }
  #acctMain form { grid-area: form; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; align-items: end; }
  #acctMain form .hint2 { grid-column: 1 / -1; font-size: 10px; } #acctMain form .go { grid-column: 1 / -1; }
  #acctMain .linkbtn { grid-area: forgot; justify-self: start; padding: 0; } #acctMain .guest-note { grid-area: note; margin: 0; text-align: right; }
  #acctMain .or { display: none; }
  #acctRecover { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px 10px; align-items: end; }
  #acctRecover .rc-title, #acctRecover .hint2, #acctRecover .go, #acctRecover .linkbtn { grid-column: 1 / -1; } #acctRecover .linkbtn { padding: 0; }
  .msg { min-height: 14px; margin-top: 4px; font-size: 11px; }
  .pcard .pchar, .pid small { display: none; } .pframe { width: 64px; } .pid { margin: 4px 0; flex-wrap: nowrap; gap: 6px; } .pid .mini { padding: 2px 8px; font-size: 10px; }
  .pname { font-size: 16px; } .pcard .mini#meRename { margin-bottom: 4px; }
}

/* ================= Multijugador ================= */
.playrow { display: flex; gap: 10px; align-self: stretch; }
.playrow #startBtn { flex: 1.4; }
#mpBtn {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 0 10px; cursor: pointer;
  font: 900 20px "Trebuchet MS", sans-serif; font-style: italic; letter-spacing: 2px; color: #fff;
  background: linear-gradient(180deg, #5fd62a, var(--sena) 55%, var(--sena-d)); border: 4px solid var(--ink); border-radius: 14px;
  box-shadow: 0 8px 0 var(--ink); animation: slideIn .6s 1s both;
}
#mpBtn:hover { filter: brightness(1.1); } #mpBtn:active { transform: translateY(6px); box-shadow: 0 2px 0 var(--ink); }
#mpBtn svg { flex: none; }

.mp-wrap { position: absolute; top: 60px; bottom: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: center; gap: 24px; padding: 10px 4vw 30px; flex-wrap: wrap; }
.mp-card { width: min(380px, 92vw); padding: 22px 22px 20px; border-radius: 20px; background: linear-gradient(180deg, #0d2a14f2, #061309f5); border: 3px solid var(--sena);
  box-shadow: 0 10px 0 var(--ink), 0 24px 60px #000a; animation: slideIn .5s both; display: flex; flex-direction: column; gap: 12px; }
.mp-card:nth-child(2) { animation-delay: .1s; }
.mp-h { font-size: 22px; font-weight: 900; font-style: italic; letter-spacing: 1px; color: var(--gold); -webkit-text-stroke: 1px var(--ink); paint-order: stroke fill; }
.mp-p { font-size: 13px; color: #d7e9d0; line-height: 1.45; }
.mp-card input[type=text] { padding: 11px 13px; border-radius: 11px; border: 2px solid #ffffff55; background: #04100a; color: #fff; font: 900 20px monospace; letter-spacing: 4px; text-transform: uppercase; width: 100%; min-width: 0; }
.mp-card input:focus { outline: none; border-color: var(--gold); }

.rtable { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.rtable .rh, .rtable .rr { display: grid; grid-template-columns: 1.6fr 1fr .8fr .6fr; gap: 6px; padding: 6px 8px; border-radius: 8px; }
.rtable .rh { font-size: 10px; letter-spacing: 1px; font-weight: 900; color: var(--sena-l); }
.rtable .rr { background: #ffffff0d; } .rtable .rr.first { background: #ffd23f33; border: 1px solid var(--gold); font-weight: 900; }

#mpCount { position: fixed; inset: 0; z-index: 12; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; pointer-events: none;
  background: radial-gradient(ellipse at center, #0008, #000c); }
#mpCount[hidden] { display: none; }
#mpCountN { font: italic 900 160px "Trebuchet MS", sans-serif; color: var(--gold); -webkit-text-stroke: 4px var(--ink); paint-order: stroke fill; text-shadow: 0 10px 0 #a86f00; animation: pop .5s infinite; }
#mpCountTxt { font-weight: 900; letter-spacing: 4px; font-size: 18px; text-transform: uppercase; }
#inviteBox { position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 45; display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 16px;
  border-radius: 14px; background: #0b1f10f2; border: 3px solid var(--gold); box-shadow: 0 6px 0 var(--ink), 0 0 30px #ffd23f66; animation: slideIn .4s both; }
#inviteBox[hidden] { display: none; }
.inv-txt { font-size: 14px; font-weight: 800; } .inv-txt b { color: var(--gold); }

@media (max-height: 520px) {
  #mpBtn { font-size: 15px; border-width: 3px; } #mpBtn svg { width: 18px; height: 18px; }
  .mp-wrap { top: 44px; gap: 12px; } .mp-card { padding: 12px 14px; gap: 7px; } .mp-h { font-size: 17px; } .mp-p { font-size: 11px; }
  #mpCountN { font-size: 100px; } #inviteBox { top: 6px; padding: 6px 8px 6px 12px; } .inv-txt { font-size: 12px; }
}

/* ================= Chat, revivir y carrera ================= */
#chatBtn { position: fixed; left: 14px; top: 70px; z-index: 6; display: none; align-items: center; gap: 6px; padding: 7px 12px 7px 9px; border-radius: 22px;
  border: 3px solid var(--sena); background: #0b1f10e6; color: #fff; font: 800 14px "Trebuchet MS", sans-serif; cursor: pointer; box-shadow: 0 4px 0 var(--ink); }
#chatBtn kbd { font-size: 10px; padding: 0 5px; min-width: 0; }
body.mplevel:not(.menu):not(.map) #chatBtn { display: flex; }
body.touch #chatBtn kbd { display: none; }
#chatLog { position: fixed; left: 14px; top: 116px; z-index: 6; width: min(340px, 60vw); display: none; flex-direction: column; gap: 4px; pointer-events: none; }
body.mplevel:not(.menu):not(.map) #chatLog { display: flex; }
#chatLog .cl { padding: 5px 10px; border-radius: 10px; background: #000a; font-size: 13px; font-weight: 700; display: flex; align-items: center; gap: 6px; animation: slideIn .25s both; transition: opacity .6s; overflow-wrap: anywhere; }
#chatLog .cl b { color: var(--gold); flex: none; } #chatLog .cl img { width: 26px; height: 26px; } #chatLog .cl.old { opacity: 0; }
#chatPanel { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 15; width: min(560px, 94vw); padding: 12px; border-radius: 18px;
  background: linear-gradient(180deg, #0d2a14f5, #061309f8); border: 3px solid var(--sena); box-shadow: 0 8px 0 var(--ink), 0 20px 50px #000a; animation: slideIn .25s both; }
#chatPanel[hidden] { display: none; }
.cp-faces, .lc-faces { display: grid; grid-template-columns: repeat(9, 1fr); gap: 6px; margin-bottom: 10px; }
.cp-faces button, .lc-faces button { aspect-ratio: 1; padding: 4px; border-radius: 12px; border: 2px solid #ffffff2a; background: #0006; cursor: pointer; transition: transform .1s; }
.cp-faces button:hover, .lc-faces button:hover { transform: scale(1.12); border-color: var(--gold); }
.cp-faces img, .lc-faces img { width: 100%; height: 100%; display: block; }
.cp-quick { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.cp-quick button { padding: 7px 12px; border-radius: 16px; border: 2px solid #ffffff44; background: #ffffff12; color: #fff; font: 800 13px "Trebuchet MS", sans-serif; cursor: pointer; }
.cp-quick button:hover { background: var(--sena); border-color: #fff; }
.cp-row { display: flex; gap: 8px; }
.cp-row input { flex: 1; min-width: 0; padding: 9px 12px; border-radius: 10px; border: 2px solid #ffffff55; background: #04100a; color: #fff; font-size: 15px; font-family: inherit; }
.cp-row input:focus { outline: none; border-color: var(--gold); }
#ghostMsg { position: fixed; left: 50%; top: 34%; transform: translateX(-50%); z-index: 6; padding: 10px 20px; border-radius: 14px; background: #082a3acc; border: 3px solid #9af0ff;
  color: #dffaff; font: 900 18px "Trebuchet MS", sans-serif; letter-spacing: 1px; box-shadow: 0 0 30px #9af0ff66; animation: pulse2 1.4s ease-in-out infinite; pointer-events: none; }
#ghostMsg[hidden] { display: none; }
#raceHud { position: fixed; right: 14px; top: 64px; z-index: 6; width: 220px; display: flex; flex-direction: column; gap: 5px; pointer-events: none; }
#raceHud[hidden] { display: none; }
#raceHud .rrow { position: relative; display: flex; align-items: center; gap: 8px; padding: 5px 10px; border-radius: 10px; background: #000a; font-size: 13px; font-weight: 800; overflow: hidden; }
#raceHud .rrow i { position: absolute; left: 0; bottom: 0; height: 3px; width: var(--w); background: var(--sena-l); transition: width .3s; }
#raceHud .rrow.me { border: 2px solid var(--gold); } #raceHud .rrow.done i { background: var(--gold); } #raceHud .rrow b { color: var(--gold); }
#raceTimer { position: fixed; left: 50%; top: 64px; transform: translateX(-50%); z-index: 6; padding: 6px 16px; border-radius: 12px; background: #3a0a0acc; border: 2px solid #ff6a6a;
  font: 900 15px "Trebuchet MS", sans-serif; letter-spacing: 1px; pointer-events: none; }
#raceTimer[hidden] { display: none; }
body.touch.mplevel #chatBtn { top: 8px; left: 8px; }
body.touch.mplevel #chatLog { top: 54px; }

.rtable .rr.p1 { background: #ffd23f40; border: 1px solid var(--gold); } .rtable .rr.p2 { background: #d8e2ff30; border: 1px solid #d8e2ff; } .rtable .rr.p3 { background: #e0904030; border: 1px solid #e09040; }
@media (max-height: 520px) {
  #chatPanel { bottom: 6px; padding: 8px; } .cp-faces { margin-bottom: 6px; gap: 4px; } .cp-quick { margin-bottom: 6px; } .cp-quick button { padding: 4px 9px; font-size: 11px; }
  #raceHud { top: 54px; width: 170px; } #raceHud .rrow { font-size: 11px; padding: 3px 8px; } #ghostMsg { font-size: 14px; }
}

/* ================= Sala en línea ================= */
.mp-room { position: absolute; top: 60px; bottom: 0; left: 0; right: 0; padding: 4px 3vw 18px; display: flex; flex-direction: column; gap: 12px; }
.room-head { display: flex; align-items: center; gap: 12px; padding: 10px 18px; border-radius: 18px; background: linear-gradient(180deg, #0d2a14f2, #061309f5); border: 3px solid var(--gold); box-shadow: 0 6px 0 var(--ink); }
.room-head > div { flex: 1; min-width: 0; } .room-head small { display: block; font-size: 10px; letter-spacing: 3px; font-weight: 900; color: var(--sena-l); }
.room-head b { font: 900 34px monospace; letter-spacing: 8px; color: var(--gold); text-shadow: 0 0 18px #ffd23f88; }
.room-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 340px); gap: 14px; }
.room-main { min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; padding-bottom: 6px; }
#mpRoom .panel, .room-side { padding: 12px 14px; border-radius: 18px; background: linear-gradient(180deg, #0b2012ee, #061309f2); border: 3px solid #ffffff2a; box-shadow: 0 6px 0 var(--ink); }
#mpRoom .panel[hidden] { display: none; }
.panel-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.panel-h .ptitle, #mpResults .ptitle { margin: 0; } #mpResults .ptitle { margin-bottom: 8px; color: var(--gold); }
.panel-h small { font-size: 12px; font-weight: 700; color: #bcd6b4; text-align: right; }
.slots { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.slot { position: relative; min-width: 0; display: flex; flex-direction: column; align-items: center; padding: 22px 8px 8px; border-radius: 16px; text-align: center;
  background: #ffffff0a; border: 2px solid #ffffff22; animation: pop .35s both; }
.slot.mine { border-color: var(--gold); background: #ffd23f14; }
.slot.empty { border-style: dashed; opacity: .55; }
.sframe { width: min(72px, 64%); aspect-ratio: 1; margin-bottom: 6px; border-radius: 50%; overflow: hidden; background: radial-gradient(circle at 50% 35%, #8be04e, #2a7d00); border: 3px solid #ffffff55; }
.slot.mine .sframe { border-color: var(--gold); }
.slot.empty .sframe { background: #ffffff08; border: 2px dashed #ffffff44; }
.sframe img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.15) translateY(4%); display: block; }
.slot b { display: block; max-width: 100%; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slot small { font-size: 11px; color: #bcd6b4; } .slot small.ingame { color: var(--gold); font-weight: 800; }
.sbadges { position: absolute; top: 6px; left: 6px; right: 6px; display: flex; justify-content: space-between; pointer-events: none; }
.sbadges span { padding: 2px 7px; border-radius: 7px; font: 900 10px "Trebuchet MS", sans-serif; letter-spacing: 1px; }
.sbadges .host { background: var(--gold); color: var(--ink); } .sbadges .you { background: #fff; color: var(--ink); margin-left: auto; }
.modes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.modes button { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 10px; border-radius: 14px; border: 2px solid #ffffff26;
  background: #0005; color: #fff; text-align: left; font-family: inherit; cursor: pointer; transition: transform .12s, border-color .15s, opacity .15s; }
.modes button svg { width: 26px; height: 26px; color: var(--sena-l); }
.modes button b { font-size: 14px; line-height: 1.15; } .modes button small { font-size: 11px; line-height: 1.3; color: #bcd6b4; }
.modes button:not(:disabled):hover { transform: translateY(-2px); border-color: #ffffff66; }
.modes button.on { border-color: var(--gold); background: #ffd23f1f; box-shadow: 0 0 16px #ffd23f40; } .modes button.on svg { color: var(--gold); }
.modes button:disabled { cursor: default; } .modes button:disabled:not(.on) { opacity: .4; }
.gp-foot { display: flex; align-items: flex-end; gap: 12px; margin-top: 10px; }
.gp-foot[hidden], #mpLevelRow[hidden] { display: none; }
.gp-foot .lvl { flex: 1; min-width: 0; }
.gp-foot label { display: block; margin-bottom: 4px; font-size: 11px; font-weight: 900; letter-spacing: 2px; text-transform: uppercase; color: var(--sena-l); }
.gp-foot select { width: 100%; padding: 9px 11px; border-radius: 10px; border: 2px solid #ffffff55; background: #04100a; color: #fff; font-size: 14px; font-family: inherit; }
.gp-foot .go { min-width: 200px; margin-left: auto; padding: 10px 0; }
.mp-wait { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: #0006; font-size: 13px; font-weight: 800; color: #d7e9d0; }
.mp-wait[hidden] { display: none; }
.mode-lbl { margin-top: 10px; padding: 8px 10px; border-radius: 10px; background: #ffd23f1f; border: 2px solid var(--gold); font-size: 13px; font-weight: 800; }
.mode-lbl[hidden] { display: none; }
.room-side { min-height: 0; display: flex; flex-direction: column; padding: 10px 12px 12px; }
.side-tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.side-tabs button { flex: 1; position: relative; padding: 8px; border-radius: 10px; border: 2px solid #ffffff22; background: #0005; color: #d7e9d0; font: 900 13px "Trebuchet MS", sans-serif; letter-spacing: 1px; cursor: pointer; }
.side-tabs button.on { background: var(--sena); border-color: var(--sena-l); color: #fff; }
.side-tabs span { font-size: 11px; color: #39d98a; }
.side-tabs .dot { position: absolute; top: 6px; right: 8px; width: 9px; height: 9px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 8px var(--gold); }
.side-tabs .dot[hidden] { display: none; }
.side-pane { flex: 1; min-height: 0; display: flex; flex-direction: column; } .side-pane[hidden] { display: none; }
.lobby-chat { flex: 1; min-height: 90px; overflow-y: auto; padding: 8px; margin-bottom: 8px; border-radius: 12px; background: #0007; border: 2px solid #ffffff1f; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.lobby-chat .cl { display: flex; align-items: center; gap: 6px; overflow-wrap: anywhere; } .lobby-chat .cl b { color: var(--gold); flex: none; }
.lobby-chat .cl img { width: 26px; height: 26px; } .lobby-chat .empty { margin: auto; color: #bcd6b4; font-size: 12px; text-align: center; }
.lc-faces { gap: 4px; margin-bottom: 8px; } .lc-faces button { padding: 2px; border-radius: 9px; }
#mpFriends { flex: 1; min-height: 0; overflow-y: auto; }
@media (max-width: 900px) {
  .room-body { display: flex; flex-direction: column; overflow-y: auto; } .room-main { flex: none; min-height: auto; overflow: visible; } .room-side { flex: none; height: 400px; }
  .modes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .room-head { flex-wrap: wrap; gap: 8px; padding: 8px 12px; } .room-head > div { flex: 1 1 100%; } .room-head > button { flex: 1; } .room-head b { font-size: 26px; letter-spacing: 5px; }
  .slots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gp-foot { flex-direction: column; align-items: stretch; } .gp-foot .go { min-width: 0; width: 100%; margin-left: 0; }
}
@media (max-height: 520px) {
  .mp-room { top: 44px; gap: 8px; padding: 2px 3vw 8px; } .room-head { padding: 5px 12px; } .room-head b { font-size: 22px; letter-spacing: 5px; }
  .room-body { grid-template-columns: minmax(0, 1fr) 250px; gap: 10px; overflow: hidden; } .room-main { overflow-y: auto; gap: 8px; }
  #mpRoom .panel, .room-side { padding: 8px 10px; } .panel-h { margin-bottom: 6px; }
  .slots { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; } .slot { padding: 20px 4px 6px; } .sframe { width: 46px; margin-bottom: 4px; }
  .slot b { font-size: 12px; } .slot small { font-size: 9px; } .sbadges span { font-size: 8px; padding: 1px 5px; }
  .modes { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; } .modes button { padding: 6px 8px; } .modes button svg { width: 18px; height: 18px; }
  .modes button b { font-size: 12px; } .modes button small { display: none; }
  .gp-foot { margin-top: 8px; } .gp-foot select { padding: 7px; } .gp-foot .go { min-width: 140px; padding: 8px 0; font-size: 15px; }
  .side-tabs button { padding: 5px; font-size: 12px; } .lobby-chat { min-height: 50px; }
}

/* ================= Ajustes: gráficos ================= */
.ts-sec { margin-top: 4px; font-size: 11px; letter-spacing: 2px; font-weight: 900; color: var(--sena-l); }
.gfx { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.gfx button { padding: 9px 4px; border-radius: 10px; border: 2px solid #ffffff33; background: #0006; color: #fff; font: 900 13px "Trebuchet MS", sans-serif; cursor: pointer; }
.gfx button.on { border-color: var(--gold); background: #ffd23f26; color: var(--gold); }
.ts-note { font-size: 12px; font-weight: 700; color: #bcd6b4; min-height: 1.3em; }
body:not(.touch) #tSettings .touch-only { display: none; }
#menuGear { flex: none; width: 58px; display: flex; align-items: center; justify-content: center; border-radius: 14px; border: 3px solid var(--ink); background: #d8e2d4; color: var(--ink); cursor: pointer; box-shadow: 0 6px 0 var(--ink); }
#menuGear svg { width: 26px; height: 26px; }
#menuGear:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--ink); }

/* ================= Menú: Ranking, Tienda, Logros ================= */
.subrow { display: flex; gap: 8px; align-self: stretch; margin-top: 2px; }
.subrow button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 6px; border-radius: 12px; border: 3px solid var(--ink);
  background: #0b1f10e6; color: #fff; font: 900 14px "Trebuchet MS", sans-serif; letter-spacing: 1px; cursor: pointer; box-shadow: 0 4px 0 var(--ink); }
.subrow button svg { color: var(--gold); flex: none; }
.subrow button:hover { background: var(--sena-d); }
.subrow button:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.subrow #menuGear { flex: 0 0 52px; width: auto; background: #d8e2d4; color: var(--ink); box-shadow: 0 4px 0 var(--ink); }
.subrow #menuGear svg { color: var(--ink); width: 22px; height: 22px; }
.ico-w { display: inline-flex; }

/* ---- Ranking ---- */
.rk-wrap { position: absolute; top: 60px; bottom: 0; left: 50%; transform: translateX(-50%); width: min(760px, 94vw); padding-bottom: 18px; display: flex; flex-direction: column; gap: 10px; }
.rk-boards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.rk-boards button, .rk-week button { padding: 10px 6px; border-radius: 12px; border: 2px solid #ffffff26; background: #0b1f10e6; color: #d7e9d0; font: 900 14px "Trebuchet MS", sans-serif; cursor: pointer; }
.rk-boards button.on, .rk-week button.on { background: var(--sena); border-color: var(--sena-l); color: #fff; }
.rk-bar { display: flex; gap: 10px; align-items: center; }
.rk-bar select { flex: 1; min-width: 0; padding: 9px 11px; border-radius: 10px; border: 2px solid #ffffff55; background: #04100a; color: #fff; font: 700 14px "Trebuchet MS", sans-serif; }
.rk-bar select[hidden] { display: none; }
.rk-week { display: flex; gap: 6px; margin-left: auto; } .rk-week button { padding: 8px 12px; font-size: 13px; }
.rk-info { font-size: 12px; font-weight: 700; color: #bcd6b4; }
.rk-list { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding: 10px; border-radius: 18px; background: linear-gradient(180deg, #0b2012ee, #061309f2); border: 3px solid #ffffff2a; box-shadow: 0 6px 0 var(--ink); }
.rk-row { display: grid; grid-template-columns: 44px 44px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 7px 12px; border-radius: 12px; background: #ffffff0d; animation: slideIn .35s both; }
.rk-row.gap { margin-top: 12px; }
.rk-pos { font: 900 20px "Trebuchet MS", sans-serif; text-align: center; color: #d7e9d0; }
.rk-pos.crown { color: var(--gold); filter: drop-shadow(0 0 6px #ffd23f99); }
.rk-face { width: 40px; height: 40px; border-radius: 50%; overflow: hidden; background: radial-gradient(circle at 50% 35%, #8be04e, #2a7d00); border: 2px solid #ffffff55; }
.rk-face img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.15) translateY(4%); }
.rk-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 16px; } .rk-name small { color: var(--gold); font-size: 12px; }
.rk-val { font: 900 16px "Trebuchet MS", sans-serif; color: var(--gold); white-space: nowrap; }
.rk-row.r1 { background: linear-gradient(90deg, #ffd23f40, #ffd23f12); border: 2px solid var(--gold); padding: 10px 12px; }
.rk-row.r1 .rk-face { width: 46px; height: 46px; border-color: var(--gold); box-shadow: 0 0 14px #ffd23f88; } .rk-row.r1 .rk-name { font-size: 18px; }
.rk-row.r2 { border: 2px solid #d8e2ff88; } .rk-row.r2 .rk-pos { color: #d8e2ff; }
.rk-row.r3 { border: 2px solid #e0904088; } .rk-row.r3 .rk-pos { color: #e09040; }
.rk-row.me { outline: 2px dashed #fff; outline-offset: -4px; }
.rk-empty { margin: auto; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 20px; text-align: center; color: #d7e9d0; font-weight: 700; }
.rk-empty b { font-size: 16px; color: #fff; } .rk-empty.wide { grid-column: 1 / -1; margin: 0; background: #ffd23f1a; border: 2px solid var(--gold); border-radius: 12px; }

/* ---- Logros ---- */
.ach-wrap { position: absolute; top: 60px; bottom: 0; left: 50%; transform: translateX(-50%); width: min(980px, 94vw); padding-bottom: 18px; display: flex; flex-direction: column; gap: 12px; }
.ach-head { display: flex; align-items: center; gap: 14px; padding: 10px 16px; border-radius: 16px; background: #0b1f10e6; border: 3px solid var(--gold); }
.ach-head b { font-size: 18px; color: var(--gold); white-space: nowrap; }
.ach-bar { flex: 1; height: 12px; border-radius: 8px; background: #0008; overflow: hidden; } .ach-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--sena-l), var(--gold)); transition: width .6s; }
.ach-grid { flex: 1; min-height: 0; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; align-content: start; padding: 2px; }
.ach { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 16px; background: linear-gradient(180deg, #0b2012ee, #061309f2); border: 2px solid #ffffff22; opacity: .75; animation: pop .3s both; }
.ach.done { opacity: 1; border-color: var(--gold); box-shadow: 0 0 18px #ffd23f33; }
.ach-ico { flex: none; width: 54px; height: 54px; border-radius: 14px; display: flex; align-items: center; justify-content: center; background: #ffffff10; color: #8a9a86; }
.ach.done .ach-ico { background: radial-gradient(circle, #ffd23f55, #ffd23f18); color: var(--gold); }
.ach-txt { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 3px; }
.ach-txt b { font-size: 15px; } .ach-txt small { font-size: 12px; color: #bcd6b4; }
.ach-prog { height: 6px; margin-top: 3px; border-radius: 4px; background: #0008; overflow: hidden; } .ach-prog i { display: block; height: 100%; background: var(--sena-l); }
.ach.done .ach-prog i { background: var(--gold); }
.ach-num { font-size: 11px; font-weight: 900; color: #d7e9d0; } .ach.done .ach-num { color: var(--gold); }

/* ---- Tienda: panel a la izquierda, el instructor se ve a la derecha ---- */
.screen.shop { background: linear-gradient(90deg, #04120af0 0%, #04120acc 36%, transparent 58%); }
body.shop-open .menu-col, body.shop-open .hint, body.shop-open .chip { visibility: hidden; }
.shop-panel { position: absolute; top: 60px; bottom: 16px; left: 4vw; width: min(460px, 52vw); display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 20px;
  background: linear-gradient(180deg, #0d2a14f2, #061309f5); border: 3px solid var(--sena); box-shadow: 0 8px 0 var(--ink), 0 20px 50px #000a; animation: slideIn .4s both; }
.shop-wallet { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 14px; background: #0007; border: 2px solid var(--gold); }
.shop-wallet b { display: block; font-size: 24px; color: var(--gold); line-height: 1; } .shop-wallet small { font-size: 11px; color: #d7e9d0; font-weight: 800; letter-spacing: 1px; }
.coin-ico { width: 34px; height: 34px; flex: none; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff3a8, #ffd23f 45%, #c98a00); border: 3px solid #8a5a00; box-shadow: inset 0 0 0 3px #ffe680; }
.coin-ico.sm { width: 14px; height: 14px; border-width: 2px; box-shadow: none; display: inline-block; }
.shop-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.shop-tabs button { padding: 8px 4px; border-radius: 10px; border: 2px solid #ffffff26; background: #0005; color: #d7e9d0; font: 900 13px "Trebuchet MS", sans-serif; cursor: pointer; }
.shop-tabs button.on { background: var(--sena); border-color: var(--sena-l); color: #fff; }
.shop-grid { flex: 1; min-height: 0; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; align-content: start; }
.item { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px 10px; border-radius: 14px; border: 2px solid #ffffff22; background: #0006; color: #fff; cursor: pointer; font-family: inherit; transition: transform .1s, border-color .15s; }
.item:hover { transform: translateY(-2px); border-color: #ffffff66; }
.item.sel { border-color: var(--gold); background: #ffd23f1c; box-shadow: 0 0 14px #ffd23f44; }
.item.worn::after { content: ""; position: absolute; top: 8px; right: 8px; width: 10px; height: 10px; border-radius: 50%; background: #39d98a; box-shadow: 0 0 8px #39d98a; }
.item-ico { width: 58px; height: 58px; border-radius: 16px; display: flex; align-items: center; justify-content: center; color: var(--tint); background: radial-gradient(circle, #ffffff18, #ffffff05); }
.item b { font-size: 12.5px; text-align: center; line-height: 1.2; }
.item .tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 8px; font: 900 12px "Trebuchet MS", sans-serif; background: #ffffff18; color: #d7e9d0; }
.item .tag.price { color: var(--gold); } .item .tag.poor { color: #ff9a9a; } .item .tag.on { background: #39d98a33; color: #39d98a; }
.shop-foot { display: flex; align-items: center; gap: 10px; padding-top: 8px; border-top: 2px solid #ffffff1a; }
.shop-sel { flex: 1; min-width: 0; } .shop-sel b { display: block; font-size: 16px; } .shop-sel small { font-size: 12px; color: #bcd6b4; }
.shop-foot .go { flex: none; min-width: 170px; padding: 10px 12px; font-size: 15px; letter-spacing: 1px; }
#shopMsg { min-height: 1.2em; }

@media (max-width: 760px) {
  .rk-boards { grid-template-columns: repeat(2, minmax(0, 1fr)); } .rk-bar { flex-wrap: wrap; } .rk-week { margin-left: 0; }
  .shop-panel { left: 3vw; right: 3vw; width: auto; top: 50px; }
  .screen.shop { background: #04120ae0; }
}
@media (max-height: 520px) {
  .subrow button { padding: 5px 4px; font-size: 12px; } .subrow button svg { width: 16px; height: 16px; } .subrow #menuGear { flex-basis: 42px; }
  .rk-wrap, .ach-wrap { top: 44px; gap: 6px; padding-bottom: 8px; }
  .rk-boards button { padding: 6px 4px; font-size: 12px; } .rk-week button { padding: 5px 8px; font-size: 11px; } .rk-bar select { padding: 5px 8px; }
  .rk-info { font-size: 10px; } .rk-row { padding: 4px 10px; grid-template-columns: 34px 32px minmax(0, 1fr) auto; } .rk-face { width: 30px; height: 30px; } .rk-name, .rk-val { font-size: 14px; }
  .rk-row.r1 { padding: 5px 10px; } .rk-row.r1 .rk-face { width: 34px; height: 34px; }
  .ach-head { padding: 5px 12px; } .ach-head b { font-size: 14px; } .ach { padding: 7px; } .ach-ico { width: 40px; height: 40px; }
  .shop-panel { top: 44px; bottom: 6px; padding: 8px; gap: 6px; width: min(420px, 56vw); } .shop-wallet { padding: 4px 10px; } .shop-wallet b { font-size: 18px; } .coin-ico { width: 26px; height: 26px; }
  .shop-tabs button { padding: 5px 2px; font-size: 11px; } .item { padding: 6px 4px; gap: 3px; } .item-ico { width: 40px; height: 40px; } .item-ico svg { width: 26px; height: 26px; }
  .shop-grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); } .shop-foot .go { min-width: 130px; padding: 7px 8px; font-size: 13px; }
}
.slot .champ { display: inline-flex; vertical-align: -2px; margin-right: 4px; color: var(--gold); filter: drop-shadow(0 0 4px #ffd23f); }
/* pantallas medianas (laptops): el menú ahora tiene una fila más, se compacta para que quepa el logo */
@media (min-height: 521px) and (max-height: 820px) {
  .menu-col { gap: 10px; }
  .logo-top { font-size: 72px; } .logo-bottom { font-size: 82px; margin-left: 56px; }
}
@media (max-height: 520px) { .menu-col .subtitle { display: none; } .menu-col { transform: translateY(-50%); } }

/* ================= Editor de niveles ================= */
.screen.editor { background: #071a0e; display: none; flex-direction: column; }
.screen.editor.show { display: flex; }
.ed-top { flex: none; display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: #0b1f10; border-bottom: 3px solid var(--sena); overflow-x: auto; scrollbar-width: thin; }
.ed-top > * { flex: none; }
.ed-top .backbtn { padding: 6px 12px 6px 8px; }
#edTitle { width: 190px; padding: 8px 10px; border-radius: 10px; border: 2px solid #ffffff55; background: #04100a; color: #fff; font: 700 14px "Trebuchet MS", sans-serif; }
#edTitle:focus { outline: none; border-color: var(--gold); }
#edTheme { padding: 8px; border-radius: 10px; border: 2px solid #ffffff55; background: #04100a; color: #fff; font: 700 13px "Trebuchet MS", sans-serif; }
.ed-w { display: flex; align-items: center; gap: 4px; padding: 3px; border-radius: 10px; background: #04100a; border: 2px solid #ffffff33; }
.ed-w button { width: 28px; height: 28px; border-radius: 8px; border: none; background: #ffffff1a; color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.ed-w span { min-width: 34px; text-align: center; font: 900 14px "Trebuchet MS", sans-serif; color: var(--gold); }
.ed-top .mini { display: inline-flex; align-items: center; gap: 4px; }
#edTest { display: inline-flex; align-items: center; gap: 6px; padding: 8px 18px; font-size: 15px; letter-spacing: 2px; margin-left: auto; }
.ed-main { flex: 1; min-height: 0; display: flex; }
.ed-tools { flex: none; width: 112px; overflow-y: auto; padding: 6px; display: grid; grid-template-columns: 1fr 1fr; gap: 5px; align-content: start; background: #0b1f10; border-right: 3px solid #ffffff1a; }
.ed-group { grid-column: 1 / -1; font-size: 10px; font-weight: 900; letter-spacing: 1px; color: var(--sena-l); text-transform: uppercase; margin-top: 4px; }
.ed-tool { aspect-ratio: 1; padding: 3px; border-radius: 10px; border: 2px solid #ffffff22; background: #0006; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.ed-tool canvas { width: 100%; height: 100%; }
.ed-tool.on { border-color: var(--gold); background: #ffd23f26; box-shadow: 0 0 10px #ffd23f55; }
.ed-canvas-wrap { flex: 1; min-width: 0; position: relative; overflow: hidden; display: flex; align-items: flex-end; touch-action: none; }
#edCanvas { display: block; cursor: crosshair; touch-action: none; }
.ed-bottom { flex: none; display: flex; align-items: center; gap: 12px; padding: 6px 12px; background: #0b1f10; border-top: 2px solid #ffffff1a; font-size: 13px; font-weight: 700; color: #d7e9d0; }
#edScroll { flex: 0 0 38%; accent-color: var(--sena); }
#edHint { color: var(--gold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ed-bottom .msg { margin: 0 0 0 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ed-panel { position: absolute; inset: 0; z-index: 3; display: flex; align-items: center; justify-content: center; background: #000b; padding: 12px; }
.ed-panel[hidden] { display: none; }
.ed-panel-card { width: min(760px, 96vw); max-height: 92%; display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 18px; background: linear-gradient(180deg, #0d2a14f5, #061309f5); border: 3px solid var(--sena); box-shadow: 0 8px 0 var(--ink); }
.ed-panel-head { display: flex; align-items: center; justify-content: space-between; } .ed-panel-head b { font-size: 20px; color: var(--gold); }
.ed-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.ed-tabs button { padding: 8px 4px; border-radius: 10px; border: 2px solid #ffffff26; background: #0005; color: #d7e9d0; font: 900 13px "Trebuchet MS", sans-serif; cursor: pointer; }
.ed-tabs button.on { background: var(--sena); border-color: var(--sena-l); color: #fff; }
.ed-list { flex: 1; min-height: 120px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.ed-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: #ffffff0d; }
.ed-face { flex: none; width: 38px; height: 38px; border-radius: 50%; overflow: hidden; background: radial-gradient(circle at 50% 35%, #8be04e, #2a7d00); border: 2px solid #ffffff55; }
.ed-face img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.15) translateY(4%); }
.ed-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.ed-info b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .ed-info small { font-size: 11px; color: #bcd6b4; }
.ed-info code { font: 900 12px monospace; color: var(--gold); letter-spacing: 1px; }
.mini.like { display: inline-flex; align-items: center; gap: 4px; } .mini.like.on { color: #ff5a7a; border-color: #ff5a7a; }
.ed-empty { margin: auto; padding: 20px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; color: #d7e9d0; font-weight: 700; }
body.editing #tTop, body.editing .chip { display: none !important; }
@media (max-width: 760px), (max-height: 520px) {
  .ed-top { padding: 5px 8px; gap: 6px; } #edTitle { width: 140px; padding: 6px 8px; font-size: 13px; } #edTheme { padding: 5px; font-size: 12px; }
  .ed-top .mini { padding: 5px 8px; font-size: 12px; } #edTest { padding: 6px 12px; font-size: 13px; }
  .ed-tools { width: 92px; gap: 4px; padding: 4px; } .ed-group { font-size: 9px; }
  .ed-bottom { padding: 3px 8px; font-size: 11px; } .ed-tabs button { font-size: 11px; padding: 6px 2px; }
}
@media (max-width: 1000px), (max-height: 520px) { #edTest { position: absolute; right: 12px; bottom: 40px; z-index: 2; margin: 0; box-shadow: 0 5px 0 var(--ink), 0 6px 20px #000a; } }

/* ================= Pregunta de programación ================= */
#quiz { position: fixed; inset: 0; z-index: 40; display: none; align-items: center; justify-content: center; padding: 12px; background: radial-gradient(ellipse at center, #0a1f6acc, #000d); }
#quiz.show { display: flex; animation: fadeIn .25s both; }
.qz-card { width: min(640px, 96vw); max-height: 96vh; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 16px 18px; border-radius: 20px;
  background: linear-gradient(180deg, #0f2a7a, #071640); border: 3px solid #7ff0ff; box-shadow: 0 8px 0 var(--ink), 0 0 50px #39e6ff55; animation: pop .3s both; }
.qz-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.qz-badge { padding: 4px 10px; border-radius: 8px; background: #7ff0ff; color: #071640; font: 900 13px "Trebuchet MS", sans-serif; letter-spacing: 2px; }
.qz-topic { font: 900 13px "Trebuchet MS", sans-serif; color: var(--gold); letter-spacing: 1px; }
.qz-time { height: 7px; border-radius: 5px; background: #0006; overflow: hidden; } .qz-time i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #ff5a6a, var(--gold), #39d98a); transition: width .1s linear; }
.qz-q { margin: 2px 0 0; font-size: 19px; font-weight: 800; line-height: 1.35; color: #fff; }
.qz-code { margin: 0; padding: 10px 12px; border-radius: 10px; background: #020814; border: 2px solid #ffffff22; color: #9be7ff; font: 600 14px/1.45 Consolas, "Courier New", monospace; white-space: pre-wrap; }
.qz-code[hidden], .qz-feed[hidden], #qzNext[hidden] { display: none; }
.qz-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.qz-opt { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 2px solid #ffffff33; background: #ffffff10; color: #fff; text-align: left; cursor: pointer; font: 700 15px "Trebuchet MS", sans-serif; transition: transform .1s, border-color .15s; }
.qz-opt b { flex: none; width: 28px; height: 28px; border-radius: 8px; display: flex; align-items: center; justify-content: center; background: #7ff0ff; color: #071640; font-weight: 900; }
.qz-opt span { min-width: 0; overflow-wrap: anywhere; }
.qz-opt:not(:disabled):hover { transform: translateY(-2px); border-color: #7ff0ff; }
.qz-opt.right { border-color: #39d98a; background: #39d98a33; } .qz-opt.right b { background: #39d98a; }
.qz-opt.wrong { border-color: #ff5a6a; background: #ff5a6a33; } .qz-opt.wrong b { background: #ff5a6a; color: #fff; }
.qz-opt:disabled { cursor: default; }
.qz-feed { padding: 10px 12px; border-radius: 12px; display: flex; flex-direction: column; gap: 4px; }
.qz-feed.ok { background: #39d98a26; border: 2px solid #39d98a; } .qz-feed.bad { background: #ff5a6a1f; border: 2px solid #ff5a6a; }
.qz-feed b { font-size: 18px; } .qz-feed.ok b { color: #39d98a; } .qz-feed.bad b { color: #ff9aa4; }
.qz-feed p { margin: 0; font-size: 14px; line-height: 1.4; color: #e6f0ff; } .qz-feed small { font-size: 12px; font-weight: 800; color: var(--gold); }
#qzNext { align-self: center; min-width: 220px; }
body.quiz-open #touch { display: none !important; }
@media (max-height: 520px) {
  .qz-card { padding: 10px 12px; gap: 6px; } .qz-q { font-size: 15px; } .qz-code { font-size: 12px; padding: 6px 8px; }
  .qz-opt { padding: 6px 8px; font-size: 13px; } .qz-opt b { width: 22px; height: 22px; } .qz-feed { padding: 6px 8px; } .qz-feed p { font-size: 12px; } #qzNext { padding: 8px 0; }
}
@media (max-width: 520px) { .qz-opts { grid-template-columns: 1fr; } }

/* ================= Fiesta de minijuegos ================= */
#partyBox { position: fixed; inset: 0; z-index: 14; display: flex; align-items: center; justify-content: center; padding: 12px; pointer-events: none; background: radial-gradient(ellipse at center, #0008, #000b); }
#partyBox[hidden] { display: none; }
.pb-card { width: min(560px, 94vw); display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 20px; border-radius: 20px; text-align: center;
  background: linear-gradient(180deg, #2a1060f2, #120630f5); border: 3px solid #ff7ad9; box-shadow: 0 8px 0 var(--ink), 0 0 50px #ff7ad955; animation: pop .35s both; }
#pbRound { font: 900 13px "Trebuchet MS", sans-serif; letter-spacing: 3px; color: #ff9ae3; }
#pbName { font: italic 900 34px "Trebuchet MS", sans-serif; color: var(--gold); -webkit-text-stroke: 1.5px var(--ink); paint-order: stroke fill; line-height: 1.1; }
#pbRule { margin: 0; font-size: 15px; font-weight: 700; color: #f0e6ff; line-height: 1.4; }
#pbCount { font: italic 900 64px "Trebuchet MS", sans-serif; color: #fff; -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; min-height: 0; }
#pbBody { width: 100%; display: flex; flex-direction: column; gap: 5px; }
.pb-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto auto; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 12px; background: #ffffff12; text-align: left; animation: slideIn .3s both; }
.pb-row img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; background: radial-gradient(circle at 50% 35%, #8be04e, #2a7d00); border: 2px solid #ffffff55; }
.pb-row b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .pb-row span { font-size: 13px; color: #e6dcff; } .pb-row i { font-style: normal; font-weight: 900; color: var(--gold); }
.pb-row.me { outline: 2px dashed #fff; outline-offset: -3px; }
.pb-row.p1 { background: #ffd23f40; border: 2px solid var(--gold); } .pb-row.p2 { background: #d8e2ff2a; border: 2px solid #d8e2ff; } .pb-row.p3 { background: #e090402a; border: 2px solid #e09040; }
.pb-final #pbName { font-size: 30px; }
.revancha { margin-top: 10px; width: 100%; }
#mpRoom .modes { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 900px) { #mpRoom .modes { grid-template-columns: repeat(2, minmax(0, 1fr)); } #mpModeParty { grid-column: 1 / -1; } }
@media (max-height: 520px) { #mpRoom .modes { grid-template-columns: repeat(5, minmax(0, 1fr)); } #mpModeParty { grid-column: auto; } .pb-card { padding: 8px 12px; gap: 4px; } #pbName { font-size: 22px; } #pbRule { font-size: 12px; } #pbCount { font-size: 40px; } .pb-row { padding: 3px 8px; } .pb-row img { width: 26px; height: 26px; } }

/* semáforo de "Luz roja, luz verde" */
#pLight { position: fixed; top: 110px; left: 50%; transform: translateX(-50%); z-index: 6; display: flex; gap: 8px; padding: 8px 12px; border-radius: 18px; background: #111c; border: 3px solid #000; box-shadow: 0 4px 0 var(--ink); pointer-events: none; }
#pLight[hidden] { display: none; }
#pLight i { width: 34px; height: 34px; border-radius: 50%; background: #333; transition: background .15s, box-shadow .15s; }
#pLight.pl-r .r { background: #ff2a2a; box-shadow: 0 0 22px #ff2a2a; } #pLight.pl-y .y { background: #ffd23f; box-shadow: 0 0 22px #ffd23f; } #pLight.pl-g .g { background: #39d98a; box-shadow: 0 0 22px #39d98a; }
@media (max-height: 520px) { #pLight { top: 96px; padding: 5px 8px; } #pLight i { width: 24px; height: 24px; } }

/* gestos en el panel de chat */
.cp-emotes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-bottom: 8px; }
.cp-emotes button { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 4px; border-radius: 10px; border: 2px solid #ff7ad9; background: #ff7ad91f; color: #fff; font: 900 13px "Trebuchet MS", sans-serif; cursor: pointer; }
.cp-emotes button b { width: 20px; height: 20px; border-radius: 6px; background: #ff7ad9; color: #2a1060; display: flex; align-items: center; justify-content: center; font-size: 12px; }
@media (max-height: 520px) { .cp-emotes { margin-bottom: 5px; gap: 4px; } .cp-emotes button { padding: 4px 2px; font-size: 11px; } }

/* ================= Tutorial ================= */
#tuto { position: fixed; top: 112px; left: 50%; transform: translateX(-50%); z-index: 7; width: min(560px, 92vw); display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 10px 16px 12px; border-radius: 16px; background: #0b1f10f0; border: 3px solid var(--gold); box-shadow: 0 6px 0 var(--ink), 0 0 30px #ffd23f44; text-align: center; }
#tuto[hidden] { display: none; }
#tuto.in { animation: pop .35s both; } #tuto.ok { border-color: #39d98a; box-shadow: 0 6px 0 var(--ink), 0 0 30px #39d98a88; }
#tutoStep { font: 900 11px "Trebuchet MS", sans-serif; letter-spacing: 3px; color: var(--gold); }
#tutoText { margin: 0; font-size: 16px; font-weight: 800; line-height: 1.45; color: #fff; }
#tutoText kbd { margin: 0 2px; }
#tutoSkip { padding: 3px 10px; border-radius: 8px; border: 1px solid #ffffff44; background: transparent; color: #bcd6b4; font: 700 11px "Trebuchet MS", sans-serif; cursor: pointer; pointer-events: auto; }
body.touch #tuto { top: 64px; }
@media (max-height: 520px) { #tuto { top: 58px; padding: 6px 12px 8px; } #tutoText { font-size: 13px; } }

/* ================= Perfil de otro jugador ================= */
#playerCard { position: fixed; inset: 0; z-index: 35; display: flex; align-items: center; justify-content: center; padding: 12px; background: #000b; }
#playerCard[hidden] { display: none; }
.pc-card { position: relative; width: min(820px, 96vw); max-height: 94vh; overflow-y: auto; display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 16px; padding: 16px;
  border-radius: 20px; background: linear-gradient(180deg, #0d2a14f5, #061309f5); border: 3px solid var(--sena); box-shadow: 0 8px 0 var(--ink), 0 20px 60px #000c; animation: pop .3s both; }
.pc-x { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border-radius: 10px; border: 2px solid #ffffff33; background: #0006; color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; z-index: 2; }
.pc-left { display: flex; flex-direction: column; gap: 8px; }
#pcView { width: 100%; height: 330px; border-radius: 16px; background: radial-gradient(ellipse at 50% 70%, #2a5a20, #0a1a0c 70%); border: 2px solid #ffffff22; }
.pc-outfit { display: flex; flex-wrap: wrap; gap: 5px; justify-content: center; }
.pc-outfit span { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 8px; background: #ffffff12; font-size: 11px; font-weight: 800; color: #d7e9d0; }
.pc-outfit span svg { color: var(--gold); }
.pc-head { display: flex; align-items: center; gap: 10px; padding-right: 40px; } .pc-head b { display: block; font-size: 24px; } .pc-head small { font-size: 12px; color: #bcd6b4; font-weight: 700; }
.pc-crowns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.pc-crowns span { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 10px; background: #ffd23f26; border: 1px solid var(--gold); color: var(--gold); font: 900 11px "Trebuchet MS", sans-serif; }
.pc-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 10px; }
.pc-stats div { padding: 8px 6px; border-radius: 12px; background: #ffffff0d; text-align: center; } .pc-stats b { display: block; font-size: 18px; color: var(--gold); } .pc-stats small { font-size: 10px; color: #bcd6b4; font-weight: 800; }
.pc-ach { display: flex; flex-wrap: wrap; gap: 6px; }
.pc-ach span { width: 38px; height: 38px; border-radius: 11px; display: flex; align-items: center; justify-content: center; background: #ffffff0d; color: #5a6a56; }
.pc-ach span.on { background: radial-gradient(circle, #ffd23f55, #ffd23f18); color: var(--gold); }
.pc-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.pc-actions small { align-self: center; color: #bcd6b4; font-weight: 800; }
.clickable { cursor: pointer; } .clickable:hover b, .clickable:hover .rk-name { text-decoration: underline; }
@media (max-width: 700px), (max-height: 520px) {
  .pc-card { grid-template-columns: 1fr; } #pcView { height: 220px; }
  .pc-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-height: 520px) { .pc-card { grid-template-columns: 200px minmax(0, 1fr); } #pcView { height: 240px; } .pc-head b { font-size: 18px; } }

/* ropa nueva (modelada en Blender) */
.item.pro { border-color: #ff7ad966; background: linear-gradient(180deg, #ff7ad914, #0006); }
.item.pro::before { content: "NUEVO"; position: absolute; top: 6px; left: 6px; padding: 1px 6px; border-radius: 6px; background: #ff7ad9; color: #2a1060; font: 900 9px "Trebuchet MS", sans-serif; letter-spacing: 1px; }

.item .tag.free { background: #39d98a33; color: #39d98a; }

.ed-row { flex-wrap: wrap; }
.ed-rep { color: #bcd6b4; font-weight: 800; } .ed-hidden { width: 100%; color: #ff9aa4; font-weight: 800; }
.ed-repmenu { width: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 10px; background: #ff5a6a1a; border: 1px solid #ff5a6a66; }
.ed-repmenu b { font-size: 12px; margin-right: 4px; }

/* ================= Misiones del día ================= */
.daily { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border-radius: 16px; background: linear-gradient(180deg, #0f3a1af0, #071a0ef0); border: 3px solid #39d98a; }
.dl-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; } .dl-head b { color: #39d98a; letter-spacing: 2px; font-size: 14px; }
.dl-streak { display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border-radius: 10px; background: #ff7a1a26; color: #ffb070; font-weight: 900; font-size: 13px; }
.dl-head small { margin-left: auto; color: #bcd6b4; font-weight: 700; font-size: 11px; }
.dl-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.dl-m { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: #ffffff0d; border: 2px solid #ffffff1a; }
.dl-m.done { border-color: #39d98a; background: #39d98a1a; }
.dl-ico { flex: none; color: #8fb3a0; } .dl-m.done .dl-ico { color: #39d98a; }
.dl-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; } .dl-txt b { font-size: 13px; line-height: 1.25; } .dl-txt small { font-size: 11px; color: #bcd6b4; font-weight: 800; }
.dl-m.done .ach-prog i { background: #39d98a; }
.dl-coins { flex: none; display: inline-flex; align-items: center; gap: 4px; font: 900 13px "Trebuchet MS", sans-serif; color: var(--gold); }
.dl-chest { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 12px; background: #ffd23f14; border: 2px dashed #ffd23f66; color: var(--gold); }
.dl-chest b { font-size: 13px; color: #fff; } .dl-chest.open { border-style: solid; background: #ffd23f2a; }
.sub-dot { display: inline-block; width: 9px; height: 9px; margin-left: 4px; border-radius: 50%; background: #39d98a; box-shadow: 0 0 8px #39d98a; vertical-align: 2px; }
.sub-dot[hidden] { display: none; }
@media (max-width: 760px) { .dl-list { grid-template-columns: 1fr; } }
@media (max-height: 520px) { .daily { padding: 6px 10px; gap: 5px; } .dl-m { padding: 5px 8px; } .dl-txt b { font-size: 11px; } }

/* ================= Grupos ================= */
.gr-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.gr-item { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 12px; border-radius: 12px; border: 2px solid #ffffff22; background: #ffffff0d; color: #fff; text-align: left; cursor: pointer; font-family: inherit; }
.gr-item:hover { border-color: var(--gold); } .gr-item b { font-size: 16px; } .gr-item small { color: #bcd6b4; font-weight: 700; }
.gr-forms { display: flex; flex-direction: column; gap: 6px; }
.gr-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; } .gr-head b { font-size: 18px; color: var(--gold); } .gr-head code { font: 900 13px monospace; color: #bcd6b4; }
.gr-head #grLeave { margin-left: auto; }
.gr-body { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.gr-col { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.gr-sub { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11px; letter-spacing: 2px; font-weight: 900; color: var(--sena-l); text-transform: uppercase; }
.gr-sub select { padding: 4px 6px; border-radius: 8px; border: 2px solid #ffffff44; background: #04100a; color: #fff; font: 700 12px "Trebuchet MS", sans-serif; letter-spacing: 0; text-transform: none; }
.gr-board { display: flex; flex-direction: column; gap: 4px; max-height: 300px; overflow-y: auto; }
.gr-row { display: grid; grid-template-columns: 28px 12px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 10px; background: #ffffff0d; }
.gr-row b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .gr-row.me { outline: 2px dashed #fff; outline-offset: -3px; }
.gr-row.t1 { background: #ffd23f2a; } .gr-pos { text-align: center; font-weight: 900; color: #d7e9d0; display: flex; justify-content: center; } .gr-row.t1 .gr-pos { color: var(--gold); }
.gr-val { font-weight: 900; color: var(--gold); }
.gr-chat { height: 240px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; padding: 8px; border-radius: 12px; background: #0007; border: 2px solid #ffffff1f; }
.gr-msg { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; font-size: 13px; } .gr-msg b { color: var(--gold); } .gr-msg.mine b { color: #39d98a; }
.gr-msg span { overflow-wrap: anywhere; } .gr-msg small { margin-left: auto; font-size: 10px; color: #8fb3a0; }
@media (max-width: 760px), (max-height: 520px) { .gr-body { grid-template-columns: 1fr; } .gr-chat { height: 160px; } .gr-board { max-height: 180px; } }

#mpRoom .modes { grid-template-columns: repeat(4, minmax(0, 1fr)); }
#mpModeParty { grid-column: auto; }
@media (max-width: 900px) { #mpRoom .modes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-height: 520px) { #mpRoom .modes { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

body.bossfight #raceTimer { top: 118px; }
@media (max-height: 520px) { body.bossfight #raceTimer { top: 96px; } }

/* ================= Pausa y repetición ================= */
#pauseMenu { position: fixed; inset: 0; z-index: 350; display: flex; align-items: center; justify-content: center; background: #000a; padding: 14px; }
#pauseMenu[hidden], #replayBanner[hidden] { display: none; }
.pm-card { width: min(380px, 100%); padding: 18px 20px 14px; border-radius: 18px; background: linear-gradient(180deg, #14361a, #0b1d0a); border: 4px solid var(--sena); box-shadow: 0 0 0 4px var(--ink), 0 20px 50px #000c; display: flex; flex-direction: column; gap: 10px; }
.pm-title { text-align: center; font-size: 26px; font-weight: 900; font-style: italic; letter-spacing: 4px; color: var(--gold); }
.pm-note { text-align: center; font-size: 12px; font-weight: 700; color: #bcd6b4; }
.pm-card label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 800; } .pm-card label b { float: right; color: var(--sena-l); } .pm-card input[type=range] { width: 100%; accent-color: var(--sena); }
.pm-card button { padding: 11px; border-radius: 12px; border: 3px solid var(--ink); font: 900 14px "Trebuchet MS", sans-serif; cursor: pointer; background: #e6efe0; color: var(--ink); box-shadow: 0 4px 0 var(--ink); }
.pm-card button:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); } .pm-card button[hidden] { display: none; }
.pm-card .pm-go { background: linear-gradient(180deg, #ffe680, var(--gold) 55%, #e0a800); font-size: 18px; letter-spacing: 3px; padding: 14px; }
.pm-row { display: flex; gap: 8px; } .pm-row button { flex: 1; font-size: 12px; padding: 9px 4px; } .pm-card .danger { background: #ff9a9a; }
#replayBanner { position: fixed; z-index: 60; top: 112px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; padding: 6px 18px; border-radius: 10px; background: #0b1d0ae6; border: 3px solid #fff; font: 900 18px "Trebuchet MS", sans-serif; letter-spacing: 5px; font-style: italic; box-shadow: 0 4px 0 var(--ink); }
#replayBanner i { width: 12px; height: 12px; border-radius: 50%; background: #ff3a3a; animation: recBlink .9s steps(2) infinite; } @keyframes recBlink { 50% { opacity: 0.15; } }
body.replaying::after { content: ""; position: fixed; inset: 0; z-index: 55; pointer-events: none; box-shadow: inset 0 0 120px #000b; }

/* ================= App de Windows / Android: descarga y actualización =================
body.app-native #sInstall, body.app-native #installNote { display: none !important; }
.dlbtn { display: inline-block; padding: 11px 16px; border-radius: 12px; border: 3px solid var(--ink); background: linear-gradient(180deg, #8be04e, #2a7d00); color: #fff; font: 900 14px "Trebuchet MS", sans-serif; text-decoration: none; text-align: center; box-shadow: 0 4px 0 var(--ink); cursor: pointer; }
.dlbtn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
#dlBox .ts-row .dlbtn { flex: 1; }
#dlPromo { position: fixed; z-index: 90; right: 14px; bottom: 14px; display: flex; align-items: center; gap: 12px; max-width: min(440px, calc(100vw - 28px)); padding: 12px 14px; border-radius: 16px; background: #0d2410f2; border: 3px solid var(--sena); box-shadow: 0 8px 24px #000a; animation: promoIn .5s cubic-bezier(.2, 1.4, .4, 1) both; }
#dlPromo div { display: flex; flex-direction: column; gap: 2px; flex: 1; font-size: 14px; } #dlPromo small { font-size: 11px; font-weight: 700; color: #bcd6b4; }
#dlPromo button { background: none; border: 0; color: #fff9; font-size: 24px; line-height: 1; cursor: pointer; padding: 0 2px; }
@keyframes promoIn { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
#updBox { position: fixed; inset: 0; z-index: 400; display: flex; align-items: center; justify-content: center; background: #000b; padding: 16px; }
#updBox[hidden] { display: none; }
.upd-card { width: min(420px, 100%); text-align: center; padding: 24px 22px 20px; border-radius: 20px; background: linear-gradient(180deg, #14361a, #0b1d0a); border: 4px solid var(--sena); box-shadow: 0 0 0 4px var(--ink), 0 20px 50px #000c; }
.upd-ico { width: 64px; height: 64px; margin: 0 auto 10px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--sena); color: #fff; border: 3px solid var(--ink); }
.upd-card h3 { font-size: 22px; font-style: italic; margin-bottom: 6px; } .upd-card p { font-size: 14px; font-weight: 700; color: #cfe6c6; min-height: 2.6em; }
#updBar { margin-top: 14px; } .upd-track { height: 22px; border-radius: 12px; background: #0008; border: 3px solid var(--ink); overflow: hidden; }
.upd-track i { display: block; height: 100%; width: 0; background: repeating-linear-gradient(45deg, var(--sena-l) 0 12px, var(--sena) 12px 24px); transition: width .25s linear; }
.upd-line { display: flex; justify-content: space-between; margin-top: 6px; font-size: 13px; font-weight: 800; } .upd-line span { color: #bcd6b4; }
.upd-btns { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.upd-btns button { padding: 13px; border-radius: 12px; border: 3px solid var(--ink); font: 900 16px "Trebuchet MS", sans-serif; cursor: pointer; box-shadow: 0 4px 0 var(--ink); }
.upd-btns .go { background: linear-gradient(180deg, #ffe680, var(--gold) 55%, #e0a800); color: var(--ink); } .upd-btns .later { background: #ffffff1a; color: #fff; font-size: 13px; padding: 9px; box-shadow: none; border-color: #ffffff33; }
.upd-btns button[hidden] { display: none; }
#updChip { position: fixed; z-index: 300; top: 64px; left: 50%; transform: translateX(-50%); padding: 6px 14px; opacity: .94; border-radius: 999px; border: 3px solid var(--ink); background: linear-gradient(180deg, #ffe680, var(--gold)); color: var(--ink); font: 900 13px "Trebuchet MS", sans-serif; cursor: pointer; box-shadow: 0 4px 0 var(--ink); }
