/* quimibit · la consola de dos pantallas (Catalina eligió la C el 19-nov-2026). Kawaii pastel en pixeles.
   Todos los colores arriba. En la compu: página con la consola en medio y dos cuadros a los lados. En el celular: como una app. */
:root {
  --fondo1: #ffe6f3; --fondo2: #fff0f8; --tinta: #5a2a62; --tinta2: #2c1530; --suave: #8a5a96;
  --rosa: #ff4f9e; --rosa2: #ff6fb8; --lila: #9a5cf0; --lila2: #c9a6ff; --blanco: #ffffff;
  --carcasa1: #ffd3ea; --carcasa2: #f5b4d8; --carcasa3: #e9a3cf;
  --r1: #d9b8cf; --r2: #7fb0ff; --r3: #ffc94a; --r4: #ff4f9e;
  --pixel: "Pixelify Sans", monospace; --texto: "DotGothic16", monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: repeating-conic-gradient(var(--fondo1) 0 25%, var(--fondo2) 0 50%) 0 0 / 8px 8px; color: var(--tinta); font: 15px/1.45 var(--texto); }
button { font: inherit; color: inherit; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; }
:focus-visible { outline: 3px solid var(--lila); outline-offset: 3px; }
a { color: var(--rosa); }
[hidden] { display: none !important; }
.pix, canvas { image-rendering: pixelated; image-rendering: crisp-edges; }
/* borde de pixel (esquinas «mordidas»): se usa en botones, cuadros y la ventana */
.boton, .nota, .ventana, .pestanas button, .conOjo input, label input {
  border: 0; border-radius: 0; box-shadow: 0 -3px 0 var(--tinta), 0 3px 0 var(--tinta), -3px 0 0 var(--tinta), 3px 0 0 var(--tinta), var(--sombra, 0 0 0 transparent); }

.pagina { min-height: 100%; display: flex; flex-direction: column; }
.menuWeb { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px max(20px, env(safe-area-inset-right)) 8px max(20px, env(safe-area-inset-left)); }
.logo { font: 700 28px var(--pixel); color: var(--rosa); text-shadow: 3px 3px 0 var(--tinta); text-decoration: none; }
.redes { display: flex; gap: 10px; align-items: center; }
.boton { display: inline-block; font: 15px var(--texto); padding: 5px 12px; margin: 3px; background: var(--blanco); color: var(--tinta); text-decoration: none; white-space: nowrap; }
.boton:hover { background: #fff6fb; }
.boton:active { transform: translateY(2px); }
.boton.rosa { background: var(--rosa2); color: var(--blanco); --sombra: 0 6px 0 #c23a86; }
.boton.ancho { display: block; width: calc(100% - 6px); text-align: center; padding: 9px; }
.escenario { flex: 1; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 22px; padding: 4px 24px 8px; }
.nota { background: var(--blanco); padding: 14px; display: grid; gap: 8px; max-width: 280px; --sombra: 6px 8px 0 rgba(90, 42, 98, .18); }
.nota.izq { justify-self: end; } .nota.der { justify-self: start; }
.nota b { font: 700 17px var(--pixel); color: var(--rosa); }
.nota small { color: var(--suave); font-size: 12.5px; }
.nota .grande { font: 700 34px var(--pixel); color: var(--lila); }
.nota .barra { display: block; height: 12px; background: var(--fondo1); box-shadow: 0 0 0 2px var(--tinta); }
.nota .barra i { display: block; height: 100%; width: 0; background: repeating-linear-gradient(90deg, var(--rosa2) 0 8px, #ff9fd0 8px 10px); transition: width .4s steps(8); }
.nota .sigue { color: var(--rosa); }
#ladoRarezas { display: grid; gap: 2px; font-size: 13px; }
#ladoRarezas span::before { content: ""; display: inline-block; width: 9px; height: 9px; margin-right: 6px; background: var(--c); box-shadow: 0 0 0 1px var(--tinta); }
kbd { font: 12px var(--texto); background: var(--lila2); color: var(--blanco); padding: 0 5px; margin-right: 3px; }
.pie { text-align: center; padding: 8px 16px max(14px, env(safe-area-inset-bottom)); color: var(--suave); font-size: 13px; }
.pie b { color: var(--rosa); }
.soloCel { display: none; }

/* ---------- la consola (340 × 640; se agranda o achica entera con JS) ---------- */
.lugarConsola { position: relative; }
.consola { position: absolute; left: 0; top: 0; width: 340px; height: 640px; transform-origin: left top; }
.tapa, .base { position: absolute; left: 0; width: 340px; background: linear-gradient(160deg, var(--carcasa1), var(--carcasa2) 60%, var(--carcasa3));
  box-shadow: inset 0 3px 0 rgba(255,255,255,.7), inset 0 -5px 0 rgba(150,60,110,.2), 0 10px 0 rgba(90,42,98,.15); }
.tapa { top: 0; height: 300px; border-radius: 22px 22px 10px 10px; }
.bisagra { position: absolute; left: 30px; right: 30px; top: 300px; height: 16px; background: linear-gradient(#c88ab4, #e9a3cf); border-radius: 0 0 8px 8px; }
.base { top: 316px; height: 324px; border-radius: 10px 10px 30px 30px; }
.bisel { position: absolute; background: var(--tinta); border-radius: 12px; box-shadow: inset 0 2px 0 rgba(255,255,255,.15); transition: box-shadow .15s; }
.tapa .bisel { left: 18px; top: 16px; width: 304px; height: 268px; }
.bisel.chico { left: 72px; top: 18px; width: 196px; height: 176px; border-radius: 10px; }
.bisel.foco { box-shadow: inset 0 2px 0 rgba(255,255,255,.15), 0 0 0 3px var(--lila2), 0 0 14px var(--lila2); }
.led { position: absolute; left: 9px; top: 46%; width: 8px; height: 8px; border-radius: 50%; background: var(--rosa); box-shadow: 0 0 8px var(--rosa); animation: led 2s steps(2) infinite; }
@keyframes led { 50% { opacity: .35; } }
.marcaBisel { position: absolute; left: 0; right: 0; bottom: 6px; text-align: center; font: 700 11px var(--pixel); color: #ffc4e1; letter-spacing: .12em; }
.pantalla { position: absolute; overflow: hidden; background: repeating-conic-gradient(#fff0f8 0 25%, #ffe6f3 0 50%) 0 0 / 4px 4px; box-shadow: inset 0 0 0 3px var(--tinta2), inset 0 0 18px rgba(90,42,98,.2); }
.pantalla::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 5; background: repeating-linear-gradient(transparent 0 2px, rgba(90,42,98,.05) 2px 3px); }
.tapa .pantalla { left: 24px; top: 14px; width: 256px; height: 226px; }
.bisel.chico .pantalla { left: 10px; top: 10px; width: 176px; height: 156px; }
/* cruz: la forma dibujada + 4 botones invisibles encima */
.cruz { position: absolute; left: 12px; top: 210px; width: 92px; height: 92px; transform: scale(.85); transform-origin: left top; }
.cruz > i { position: absolute; background: var(--tinta); border-radius: 4px; box-shadow: 0 4px 0 var(--tinta2); pointer-events: none; }
.cruz > i:first-child { left: 31px; top: 0; width: 30px; height: 92px; } .cruz > i:nth-child(2) { left: 0; top: 31px; width: 92px; height: 30px; }
.cruz > b { position: absolute; left: 40px; top: 40px; width: 12px; height: 12px; border-radius: 50%; background: #3e1d44; pointer-events: none; }
.dir { position: absolute; width: 31px; height: 31px; padding: 0; border: 0; background: transparent; border-radius: 4px; }
.dir:active, .dir.apretado { background: rgba(255,255,255,.25); }
.dir.arriba { left: 31px; top: 0; } .dir.abajo { left: 31px; top: 61px; } .dir.izq { left: 0; top: 31px; } .dir.der { left: 61px; top: 31px; }
.ab { position: absolute; right: 14px; top: 206px; width: 120px; height: 90px; transform: scale(.85); transform-origin: right top; }
.ab button { position: absolute; width: 50px; height: 50px; border-radius: 50%; border: 0; display: grid; place-items: center; font: 700 18px var(--pixel); color: var(--blanco);
  background: radial-gradient(circle at 35% 30%, #ffb3d9, var(--rosa2) 55%, #d23a8a); box-shadow: 0 5px 0 #a8287a; }
.ab .btnB { left: 0; top: 34px; background: radial-gradient(circle at 35% 30%, #e6d6ff, #b48cf2 55%, #8a5cd6); box-shadow: 0 5px 0 #6a3cb8; }
.ab .btnA { right: 0; top: 0; }
.ab button:active, .ab button.apretado { transform: translateY(4px); box-shadow: 0 1px 0 #a8287a; }
.ss { position: absolute; left: 100px; top: 252px; display: flex; gap: 14px; }
.ss button { border: 0; background: none; padding: 0; display: grid; justify-items: center; gap: 3px; font: 9px var(--pixel); color: #7a3a72; letter-spacing: .08em; }
.ss button::before { content: ""; width: 46px; height: 12px; border-radius: 99px; background: #c08ab8; box-shadow: inset 0 2px 0 rgba(0,0,0,.15); transform: rotate(-18deg); }
.ss button:active::before, .ss button.apretado::before { background: #a06a98; }

/* colores de rareza por clase (la página no usa estilos escritos dentro del HTML: los bloquea su regla de seguridad) */
.rr1 { --c: var(--r1); } .rr2 { --c: var(--r2); } .rr3 { --c: var(--r3); } .rr4 { --c: var(--r4); }
.colr1 { color: #b0789e; } .colr2 { color: #3f7fe0; } .colr3 { color: #d69a00; } .colr4 { color: var(--r4); }

/* ---------- lo que se ve en las pantallas ---------- */
.scr { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: 8px; color: var(--tinta); font-family: var(--texto); }
.hud { width: 100%; display: flex; justify-content: space-between; align-items: baseline; gap: 6px; font-size: 11px; }
.hud b { font: 700 12px var(--pixel); color: var(--rosa); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sobreP { width: 74px; height: 96px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 0; padding: 0;
  background: linear-gradient(180deg, #ffc4e4 0 50%, #d6c1ff 50% 100%); box-shadow: 0 -3px 0 var(--tinta), 0 3px 0 var(--tinta), -3px 0 0 var(--tinta), 3px 0 0 var(--tinta); animation: sube 1.4s steps(2) infinite; }
.sobreP.tiembla { animation: tiembla .1s steps(2) infinite; }
@keyframes sube { 50% { transform: translateY(-3px); } }
@keyframes tiembla { 50% { transform: translate(-3px, 1px) rotate(-3deg); } }
.sobreP .spr { width: 46px; height: 46px; } .sobreP b { font: 9px var(--texto); } .sobreP small { font-size: 8px; }
.parpadea { font-size: 12px; color: var(--rosa); animation: parp 1s steps(2) infinite; }
@keyframes parp { 50% { opacity: .2; } }
.dlg { width: 100%; display: flex; gap: 6px; align-items: center; background: var(--blanco); padding: 4px 6px; min-height: 34px;
  box-shadow: 0 -2px 0 var(--tinta), 0 2px 0 var(--tinta), -2px 0 0 var(--tinta), 2px 0 0 var(--tinta); }
.dlg img { width: 28px; height: 24px; object-fit: cover; object-position: top; flex: none; }
.dlg p { margin: 0; font-size: 10px; line-height: 1.25; } .dlg b { display: block; font-size: 8px; color: var(--rosa); }
.spr { display: block; } .spr canvas { width: 100%; height: 100%; display: block; }
/* sobre abierto: 4 cartas */
.fila4 { display: grid; grid-template-columns: repeat(4, 54px); gap: 6px; }
.cartita { width: 54px; height: 76px; padding: 3px; border: 0; background: var(--blanco); display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  box-shadow: 0 -2px 0 var(--c, var(--r1)), 0 2px 0 var(--c, var(--r1)), -2px 0 0 var(--c, var(--r1)), 2px 0 0 var(--c, var(--r1)); position: relative; }
.cartita .spr { width: 36px; height: 36px; margin-top: 4px; }
.cartita small { font-size: 7px; text-align: center; line-height: 1.1; }
.cartita.atras { background: repeating-conic-gradient(#ffc4e4 0 25%, #d6c1ff 0 50%) 0 0 / 8px 8px; --c: var(--tinta); }
.cartita.atras::after { content: "?"; position: absolute; inset: 0; display: grid; place-items: center; font: 700 22px var(--pixel); color: var(--blanco); text-shadow: 2px 2px 0 var(--tinta); }
.cartita.cursor { outline: 3px solid var(--lila); outline-offset: 3px; }
.cartita.r3 { animation: brillo 1s steps(2) infinite; } .cartita.r4 { animation: arcoiris 1.6s steps(6) infinite; }
@keyframes brillo { 50% { box-shadow: 0 -2px 0 #fff2b0, 0 2px 0 #fff2b0, -2px 0 0 #fff2b0, 2px 0 0 #fff2b0, 0 0 10px var(--r3); } }
@keyframes arcoiris { 0% { --c: #ff4f9e; } 33% { --c: #ffc94a; } 66% { --c: #7fb0ff; } }
.nueva { position: absolute; top: -7px; right: 0; z-index: 3; font: 7px var(--pixel); background: var(--rosa); color: var(--blanco); padding: 0 3px; }
.revelada { text-align: center; font-size: 11px; min-height: 30px; }
.revelada b { display: block; font: 700 13px var(--pixel); }
/* detalle de una carta */
.detalle { width: 100%; display: grid; grid-template-columns: 84px 1fr; gap: 8px; align-items: start; }
.detalle .cartaG { height: 118px; padding: 4px; background: var(--blanco); display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  box-shadow: 0 -3px 0 var(--c), 0 3px 0 var(--c), -3px 0 0 var(--c), 3px 0 0 var(--c); }
.detalle .cartaG .spr { width: 64px; height: 64px; margin-top: 8px; }
.detalle .cartaG small { font-size: 8px; }
.detalle h3 { margin: 0; font: 700 14px/1.1 var(--pixel); color: var(--tinta); }
.detalle i { display: block; font-size: 9px; color: var(--suave); margin: 2px 0 4px; }
.detalle p { margin: 0; font-size: 10px; line-height: 1.3; }
.etiq { display: inline-block; font-size: 8px; padding: 0 4px; margin: 0 3px 3px 0; background: var(--c, var(--lila2)); color: var(--blanco); }
.textoChico { font-size: 10px; line-height: 1.35; width: 100%; }
.textoChico ul { margin: 4px 0 0; padding-left: 14px; }
/* pantalla de abajo: colección y menú */
.rejilla { display: grid; grid-template-columns: repeat(4, 36px); gap: 5px; }
.ranura { width: 36px; height: 36px; padding: 2px; border: 0; background: var(--blanco); display: grid; place-items: center;
  box-shadow: 0 -2px 0 var(--c, #e8b8d4), 0 2px 0 var(--c, #e8b8d4), -2px 0 0 var(--c, #e8b8d4), 2px 0 0 var(--c, #e8b8d4); position: relative; }
.ranura .spr { width: 28px; height: 28px; }
.ranura.falta { --c: #ecd4e3; background: #fff6fb; } .ranura.falta canvas { filter: brightness(0) opacity(.15); }
.ranura.cursor { outline: 3px solid var(--lila); outline-offset: 2px; z-index: 2; }
.ranura em { position: absolute; right: -3px; bottom: -4px; font: 7px var(--pixel); font-style: normal; background: var(--tinta); color: var(--blanco); padding: 0 2px; }
.pie2 { font-size: 8px; color: var(--suave); text-align: center; }
.menu { width: 100%; display: grid; gap: 3px; margin-top: 4px; }
.menu button { border: 0; background: none; text-align: left; font: 12px var(--texto); padding: 3px 6px; color: var(--tinta); }
.menu button.cursor { background: var(--rosa2); color: var(--blanco); }
.menu button.cursor::before { content: "▶ "; }

/* ---------- la ventana de la cuenta ---------- */
.velo { position: fixed; inset: 0; z-index: 20; background: rgba(90, 42, 98, .45); display: grid; place-items: center; padding: 16px; }
.ventana { position: relative; width: min(380px, 100%); background: var(--blanco); padding: 18px; --sombra: 8px 10px 0 rgba(44, 21, 48, .3); }
.ventana h2 { margin: 0 0 12px; font: 700 22px var(--pixel); color: var(--rosa); }
.cerrar { position: absolute; right: 8px; top: 6px; width: 32px; height: 32px; border: 0; background: none; font: 700 22px var(--pixel); color: var(--tinta); }
.pestanas { display: flex; gap: 10px; margin: 0 0 14px 3px; }
.pestanas button { font: 15px var(--texto); padding: 4px 12px; background: var(--fondo1); }
.pestanas button[aria-selected="true"] { background: var(--lila); color: var(--blanco); }
label { display: grid; gap: 4px; margin: 0 3px 12px; font-size: 14px; }
label input, .conOjo input { font: 16px var(--texto); padding: 8px 10px; width: 100%; background: #fffafd; color: var(--tinta); }
.conOjo { display: flex; gap: 8px; align-items: center; }
.conOjo button { border: 0; background: var(--lila2); color: var(--blanco); font: 13px var(--texto); padding: 6px 8px; flex: none; }
.ayudaReg { font-size: 12.5px; color: var(--suave); margin: -4px 3px 10px; }
.avisoCuenta { min-height: 18px; margin: 0 3px 10px; color: #c2185b; font-size: 13.5px; }
.boton[disabled] { opacity: .6; cursor: default; }

/* ---------- celular: como una app ---------- */
@media (max-width: 760px) {
  .soloCompu { display: none !important; }
  .soloCel { display: flex; }
  .menuWeb { padding-top: max(10px, env(safe-area-inset-top)); }
  .logo { font-size: 24px; }
  .escenario { grid-template-columns: 1fr; padding: 0 8px; justify-items: center; }
  .redesCel { justify-content: center; gap: 10px; }
  .pie { padding-top: 4px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
