/* ==========================================================================
   Alexis26Dev — la página de los juegos. Pensada para PC (y que se adapte al
   teléfono): portada a pantalla completa con la fogata de La Última Señal,
   una sección a todo el ancho por juego con su arte de fondo y bordes
   rasgados, y encima el papel, la tinta y el neón del juego.
   ========================================================================== */

@font-face { font-family: "Barlow Condensed"; src: url("../assets/fuentes/BarlowCondensed-ExtraBold.ttf") format("truetype"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("../assets/fuentes/BarlowCondensed-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("../assets/fuentes/Barlow-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("../assets/fuentes/Barlow-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Caveat"; src: url("../assets/fuentes/Caveat.ttf") format("truetype"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Kalam"; src: url("../assets/fuentes/Kalam-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }

:root {
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --noche: #0b1020;
  --hueso: #efe6d4;
  --hueso-suave: #c4bcad;
  --fuego-claro: #ffb15c;
  --fuego-oscuro: #8c3f12;
  --neon: #57e389;
  --papel: #f1e4c8;
  --papel-2: #e7d6b2;
  --tinta: #2a1e14;
  --tinta-suave: #5b4a38;
  --rojo: #b8352f;
  --azul-lapiz: #3f5578;
  --linea-papel: rgba(70, 110, 160, .16);
  --mano: "Caveat", "Kalam", cursive;
  --titulo: "Barlow Condensed", "Arial Narrow", sans-serif;
  --texto: "Barlow", system-ui, sans-serif;
  --ancho: 1320px;
  --rasgado: polygon(0.0% 25px, 2.94% 8px, 5.88% 23px, 8.82% 8px, 11.76% 15px, 14.71% 21px, 17.65% 19px, 20.59% 3px, 23.53% 6px, 26.47% 26px, 29.41% 26px, 32.35% 17px, 35.29% 3px, 38.24% 25px, 41.18% 23px, 44.12% 21px, 47.06% 18px, 50.0% 7px, 52.94% 22px, 55.88% 15px, 58.82% 9px, 61.76% 25px, 64.71% 15px, 67.65% 24px, 70.59% 8px, 73.53% 24px, 76.47% 2px, 79.41% 23px, 82.35% 9px, 85.29% 6px, 88.24% 6px, 91.18% 8px, 94.12% 21px, 97.06% 17px, 100.0% 26px, 100.0% calc(100% - 6px), 97.06% calc(100% - 18px), 94.12% calc(100% - 21px), 91.18% calc(100% - 15px), 88.24% calc(100% - 14px), 85.29% calc(100% - 21px), 82.35% calc(100% - 8px), 79.41% calc(100% - 10px), 76.47% calc(100% - 3px), 73.53% calc(100% - 8px), 70.59% calc(100% - 24px), 67.65% calc(100% - 15px), 64.71% calc(100% - 15px), 61.76% calc(100% - 23px), 58.82% calc(100% - 12px), 55.88% calc(100% - 12px), 52.94% calc(100% - 19px), 50.0% calc(100% - 23px), 47.06% calc(100% - 21px), 44.12% calc(100% - 16px), 41.18% calc(100% - 2px), 38.24% calc(100% - 22px), 35.29% calc(100% - 3px), 32.35% calc(100% - 18px), 29.41% calc(100% - 5px), 26.47% calc(100% - 19px), 23.53% calc(100% - 19px), 20.59% calc(100% - 11px), 17.65% calc(100% - 25px), 14.71% calc(100% - 2px), 11.76% calc(100% - 2px), 8.82% calc(100% - 20px), 5.88% calc(100% - 9px), 2.94% calc(100% - 13px), 0.0% calc(100% - 14px));
  --ruido: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .35 0 0 0 0 .26 0 0 0 0 .16 0 0 0 .11 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html, body { overflow-x: hidden; }
@supports (overflow: clip) { html, body { overflow-x: clip; } }
body {
  margin: 0; min-height: 100vh; overflow-x: hidden;
  background: linear-gradient(180deg, #0a0f1d 0%, #0e1527 50%, #0d1424 100%); background-color: var(--noche);
  color: var(--hueso); font: 500 17px/1.6 var(--texto);
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; }
.manuscrito { font-family: var(--mano); font-weight: 600; letter-spacing: .01em; }

#cielo { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 3; pointer-events: none; }
main, .pie { position: relative; z-index: 1; }

.saltar { position: absolute; left: -999px; top: 8px; z-index: 60; background: var(--fuego-claro); color: var(--tinta); padding: 8px 14px; border-radius: 10px; font-weight: 700; }
.saltar:focus { left: 12px; }

/* ---------- la barra de arriba (transparente sobre la portada) ---------- */
.barra {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  display: flex; align-items: center; gap: 18px; height: 64px;
  padding: 0 max(20px, env(safe-area-inset-right)) 0 max(20px, env(safe-area-inset-left));
  transition: background .35s, box-shadow .35s, height .35s;
}
.barra--solida { background: rgba(9, 13, 25, .9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 1px 0 rgba(239, 230, 212, .08), 0 10px 30px rgba(0, 0, 0, .35); height: 58px; }
.barra__logo { display: inline-flex; align-items: baseline; text-decoration: none; font-family: var(--titulo); font-weight: 800; font-size: 26px; line-height: 1; letter-spacing: .03em; text-shadow: 0 2px 8px rgba(0, 0, 0, .6); }
.barra__a { color: var(--hueso); }
.barra__26 { color: var(--neon); text-shadow: 0 0 10px rgba(87, 227, 137, .7); }
.barra__nav { display: none; gap: 30px; margin-left: auto; font-family: var(--titulo); font-weight: 700; font-size: 18px; letter-spacing: .08em; text-transform: uppercase; }
.barra__nav a { position: relative; text-decoration: none; color: var(--hueso); text-shadow: 0 2px 8px rgba(0, 0, 0, .7); padding: 6px 0; }
.barra__nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; border-radius: 2px; background: var(--fuego-claro); transform: scaleX(0); transform-origin: left; transition: transform .25s; }
.barra__nav a:hover::after, .barra__nav a:focus-visible::after { transform: scaleX(1); }
.idioma { margin-left: 0; display: inline-flex; border: 2px solid rgba(239, 230, 212, .35); border-radius: 999px; overflow: hidden; background: rgba(9, 13, 25, .45); }
.idioma button { background: transparent; color: var(--hueso); border: 0; padding: 5px 13px; font-family: var(--titulo); font-weight: 800; font-size: 15px; letter-spacing: .08em; cursor: pointer; }
.idioma button[aria-pressed="true"] { background: var(--hueso); color: var(--noche); }
@media (min-width: 820px) { .barra__nav { display: flex; } .barra__terminal { margin-left: 8px; } .idioma { margin-left: 4px; } }
@media (max-width: 380px) { .barra { gap: 10px; padding: 0 14px; } .barra__logo { font-size: 22px; } .idioma button { padding: 5px 10px; } }

/* ---------- la portada ---------- */
.portada { position: relative; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; overflow: hidden; isolation: isolate; }
.portada__arte { position: absolute; inset: -2%; z-index: -2; background: url("../assets/img/portada_fogata.webp") 64% 60% / cover no-repeat; animation: acercar 40s ease-in-out infinite alternate; }
@keyframes acercar { from { transform: scale(1); } to { transform: scale(1.08) translateY(-1%); } }
.portada__velo { position: absolute; inset: 0; z-index: -1; background:
  linear-gradient(180deg, rgba(8, 12, 24, .72) 0%, rgba(8, 12, 24, .25) 22%, rgba(8, 12, 24, .05) 45%, rgba(8, 12, 24, .45) 74%, #0b1020 100%),
  radial-gradient(120% 90% at 50% 40%, transparent 55%, rgba(4, 6, 14, .55) 100%); }
.portada__contenido { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 96px 20px 24px; }
.portada__hola { font-size: clamp(26px, 3vw, 40px); color: var(--fuego-claro); margin: 0 0 -4px; transform: rotate(-3deg); text-shadow: 0 2px 10px rgba(0, 0, 0, .8); }
.marca { margin: 0; font-family: var(--titulo); font-weight: 800; line-height: .86; letter-spacing: .01em; text-transform: uppercase; }
.marca__linea { display: block; font-size: clamp(64px, 11vw, 172px); color: var(--hueso); text-shadow: 0 6px 0 rgba(0, 0, 0, .45), 0 0 40px rgba(0, 0, 0, .5); }
.marca__neon {
  position: relative; display: inline-block; font-size: clamp(76px, 13vw, 206px); color: var(--neon); padding-right: .55em;
  -webkit-text-stroke: 2px rgba(10, 40, 22, .55);
  text-shadow: 0 0 6px rgba(87, 227, 137, .9), 0 0 22px rgba(87, 227, 137, .55), 0 0 60px rgba(87, 227, 137, .35);
  opacity: .08;
}
.marca__dev { color: var(--neon); }
.marca__neon.encendido { animation: encender 1.5s steps(1, end) forwards, respirar 4s ease-in-out 1.6s infinite; }
@keyframes encender { 0% { opacity: .08; } 12% { opacity: 1; } 18% { opacity: .12; } 26% { opacity: 1; } 34% { opacity: .4; } 44% { opacity: 1; } 52% { opacity: .7; } 60%, 100% { opacity: 1; } }
@keyframes respirar { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.14) saturate(1.08); } }
.ondas { position: absolute; right: 0; top: 50%; width: .42em; height: .42em; transform: translateY(-58%); overflow: visible; }
.ondas circle { fill: var(--neon); filter: drop-shadow(0 0 6px rgba(87, 227, 137, .9)); }
.ondas path { fill: none; stroke: var(--neon); stroke-width: 6; stroke-linecap: round; filter: drop-shadow(0 0 6px rgba(87, 227, 137, .8)); }
.encendido .onda--1 { animation: onda 2.2s ease-out 1.8s infinite; }
.encendido .onda--2 { animation: onda 2.2s ease-out 2.1s infinite; }
@keyframes onda { 0% { opacity: .2; } 30% { opacity: 1; } 100% { opacity: .2; } }
.portada__lema { max-width: 640px; margin: 20px auto 0; font-size: clamp(17px, 1.6vw, 21px); color: var(--hueso); text-shadow: 0 2px 12px rgba(0, 0, 0, .9); }
.portada__botones { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; margin-top: 30px; }
.portada__nota { margin: 30px 0 0; font-size: clamp(24px, 2.4vw, 32px); color: var(--hueso); display: flex; gap: 14px; align-items: center; flex-wrap: wrap; justify-content: center; transform: rotate(-2deg); text-shadow: 0 2px 10px rgba(0, 0, 0, .9); }
.flecha-mano { width: 56px; height: 38px; margin-right: -4px; }
.flecha-mano path { fill: none; stroke: var(--fuego-claro); stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.encerrado { position: relative; padding: 2px 10px; }
.circulo-mano { position: absolute; inset: -12px -14px; width: calc(100% + 28px); height: calc(100% + 24px); overflow: visible; }
.circulo-mano path { fill: none; stroke: #e0473f; stroke-width: 3; stroke-linecap: round; stroke-dasharray: 560; stroke-dashoffset: 560; }
.portada.dibujar .circulo-mano path { animation: trazar 1.1s ease-out 1.9s forwards; }
@keyframes trazar { to { stroke-dashoffset: 0; } }

/* las cuatro cartas al pie de la portada */
.cartas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; width: min(var(--ancho), calc(100% - 32px)); margin: 0 auto 40px; }
.carta {
  display: grid; grid-template-columns: 56px 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center;
  padding: 10px 12px; border-radius: 16px; text-decoration: none;
  background: linear-gradient(180deg, rgba(20, 27, 46, .82), rgba(12, 17, 31, .9)); border: 1px solid rgba(239, 230, 212, .14);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .4); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.carta img { grid-row: 1 / 3; width: 56px; height: 56px; border-radius: 14px; object-fit: cover; border: 2px solid rgba(0, 0, 0, .5); }
.carta__nombre { font-family: var(--titulo); font-weight: 800; font-size: 19px; line-height: 1.05; letter-spacing: .02em; align-self: end; }
.carta__estado { justify-self: start; align-self: start; margin-top: 4px; padding: 1px 9px; border-radius: 999px; font-family: var(--titulo); font-weight: 700; font-size: 13px; letter-spacing: .07em; text-transform: uppercase; color: #a9bddd; background: rgba(63, 85, 120, .35); }
.carta__estado--ya { color: #12261a; background: var(--neon); }
.carta__estado--prueba { color: #2a1a05; background: #e8a33d; }
@media (max-width: 400px) { .cartas { grid-template-columns: minmax(0, 1fr); } }
.carta:hover, .carta:focus-visible { transform: translateY(-4px); border-color: rgba(255, 177, 92, .6); box-shadow: 0 16px 36px rgba(0, 0, 0, .5), 0 0 0 1px rgba(255, 177, 92, .25); outline: none; }

/* ---------- botones (como «EMPEZAR» del juego) ---------- */
.boton {
  position: relative; display: inline-flex; align-items: center; justify-content: center; min-height: 56px; padding: 10px 30px;
  border: 3px solid var(--tinta); border-radius: 18px; text-decoration: none;
  font-family: var(--titulo); font-weight: 800; font-size: 22px; letter-spacing: .06em; line-height: 1; text-transform: uppercase;
  transition: transform .12s, box-shadow .12s, filter .2s; cursor: pointer;
}
.boton--fuego { color: var(--tinta); background: linear-gradient(180deg, #ffb562 0%, #f2913d 55%, #e7752a 100%); box-shadow: 0 6px 0 var(--fuego-oscuro), 0 12px 28px rgba(242, 145, 61, .4), inset 0 2px 0 rgba(255, 255, 255, .45); }
.boton--noche { color: var(--hueso); background: linear-gradient(180deg, #3a4d6c 0%, #2b3a55 100%); box-shadow: 0 6px 0 #141c2c, 0 12px 28px rgba(0, 0, 0, .35), inset 0 2px 0 rgba(255, 255, 255, .18); }
.boton:hover { filter: brightness(1.07); transform: translateY(-1px); }
.boton:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--fuego-oscuro); }
.boton--noche:active { box-shadow: 0 2px 0 #141c2c; }
.boton:focus-visible, .foto__boton:focus-visible, .tienda:focus-visible, .idioma button:focus-visible { outline: 3px solid var(--neon); outline-offset: 3px; }

/* ---------- las franjas de título ---------- */
.franja { position: relative; text-align: center; padding: 70px 20px 54px; }
.franja__titulo { margin: 0; font-family: var(--titulo); font-weight: 800; font-size: clamp(48px, 7vw, 96px); line-height: .95; letter-spacing: .02em; color: var(--hueso); text-shadow: 0 5px 0 rgba(0, 0, 0, .4); }
.subrayado-mano { display: block; width: min(340px, 70%); height: 16px; margin: 8px auto 0; overflow: visible; }
.subrayado-mano path { fill: none; stroke: #d2443c; stroke-width: 4; stroke-linecap: round; stroke-dasharray: 300; stroke-dashoffset: 300; }
.franja.visible .subrayado-mano path { animation: trazar .9s ease-out .15s forwards; }
.franja__sub { margin: 6px 0 0; font-size: clamp(26px, 2.6vw, 34px); color: var(--fuego-claro); transform: rotate(-1.5deg); }
.franja--proximos .franja__sub { color: #a9c1e6; }

/* ---------- una sección por juego ---------- */
.juego { position: relative; isolation: isolate; padding: 80px 16px 90px; clip-path: var(--rasgado); margin: -14px 0; }
.juego__arte { position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(8, 11, 22, .92) 0%, rgba(8, 11, 22, .66) 42%, rgba(8, 11, 22, .38) 70%, rgba(8, 11, 22, .6) 100%), var(--fondo) center / cover no-repeat;
  background-color: #10172a; }
.juego--invertido .juego__arte { background: linear-gradient(270deg, rgba(8, 11, 22, .92) 0%, rgba(8, 11, 22, .66) 42%, rgba(8, 11, 22, .38) 70%, rgba(8, 11, 22, .6) 100%), var(--fondo) center / cover no-repeat; background-color: #10172a; }
.juego--mazmorra .juego__arte { background-color: #120c22; }
/* Entretenidos: sin arte ancho; el morado y el verde de su tienda, con confeti de letras */
.juego--cliente .juego__arte { background:
  radial-gradient(60% 70% at 78% 40%, rgba(255, 200, 80, .28), transparent 60%),
  radial-gradient(50% 60% at 20% 80%, rgba(60, 200, 160, .25), transparent 60%),
  url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><g font-family='Arial Black,Arial' font-weight='900' fill='white' fill-opacity='.06'><text x='20' y='60' font-size='54' transform='rotate(-12 40 50)'>A</text><text x='140' y='90' font-size='40' transform='rotate(14 150 80)'>T</text><text x='60' y='170' font-size='48' transform='rotate(8 70 160)'>?</text><text x='170' y='210' font-size='44' transform='rotate(-10 180 200)'>Ñ</text></g></svg>"),
  linear-gradient(160deg, #3b1f6b 0%, #2a1650 45%, #13324a 100%); }
.franja--clientes .franja__sub { color: #ffd27a; }
.juego__contenido { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; width: min(var(--ancho), 100%); margin: 0 auto; align-items: center; }

/* el panel: una hoja de cuaderno pegada sobre el arte */
.panel {
  position: relative; padding: 32px 22px 30px 46px; color: var(--tinta);
  background:
    var(--ruido),
    linear-gradient(90deg, transparent 32px, rgba(184, 53, 47, .38) 32px 34px, transparent 34px),
    repeating-linear-gradient(180deg, transparent 0 33px, var(--linea-papel) 33px 34px),
    linear-gradient(170deg, var(--papel) 0%, var(--papel-2) 100%);
  border-radius: 6px 10px 8px 12px; box-shadow: 0 24px 50px rgba(0, 0, 0, .55), 0 2px 0 rgba(0, 0, 0, .25);
  transform: rotate(-1deg);
}
.panel::before { content: ""; position: absolute; left: 10px; top: 24px; bottom: 24px; width: 14px; background: radial-gradient(circle at 7px 7px, rgba(11, 16, 32, .85) 0 5px, rgba(0, 0, 0, .18) 5.5px 6.5px, transparent 7px) 0 0 / 14px 64px repeat-y; }
.panel::after { content: ""; position: absolute; top: -14px; left: 50%; width: 130px; height: 30px; transform: translateX(-50%) rotate(-3deg); background: linear-gradient(90deg, rgba(255, 255, 255, .18), rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, .14)), rgba(232, 218, 176, .82); box-shadow: 0 1px 2px rgba(0, 0, 0, .18); }
.juego--invertido .panel { transform: rotate(.8deg); }
.panel__cabeza { display: flex; align-items: center; gap: 16px; padding-right: 8px; }
.panel__icono { width: 84px; height: 84px; border-radius: 22px; border: 3px solid var(--tinta); box-shadow: 0 4px 0 rgba(42, 30, 20, .35); background: #fff; object-fit: cover; flex: none; }
.panel__nombre { margin: 0; overflow-wrap: break-word; font-family: var(--titulo); font-weight: 800; font-size: clamp(30px, 10vw, 40px); line-height: .92; letter-spacing: .01em; }
.panel__nombre--largo { font-size: clamp(28px, 8.5vw, 34px); }
.panel__cabeza > div { min-width: 0; }
.panel__genero { margin: 6px 0 0; font-family: var(--titulo); font-weight: 700; font-size: 16px; letter-spacing: .07em; text-transform: uppercase; color: var(--tinta-suave); }
.panel__frase { margin: 18px 0 4px; font-size: clamp(30px, 2.6vw, 38px); line-height: 1.1; color: var(--rojo); transform: rotate(-1deg); }
.panel__parrafo { margin: 10px 0 0; font-size: 17px; line-height: 1.65; color: #3a2c1e; }
.rasgos { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 7px; }
.rasgos li { position: relative; padding-left: 32px; font-family: "Kalam", var(--mano); font-weight: 700; font-size: 18.5px; line-height: 1.35; color: var(--tinta); }
.rasgos li::before { content: ""; position: absolute; left: 2px; top: 3px; width: 21px; height: 21px; background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M3 13 C6 15 8 18 9 20 C12 13 16 8 21 4' fill='none' stroke='%23b8352f' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/></svg>") no-repeat center / contain; }

/* el sello de estado */
.sello { display: inline-block; margin: 0 0 14px; padding: 6px 14px 4px; border: 4px double currentColor; border-radius: 8px; font-family: var(--titulo); font-weight: 800; font-size: 20px; letter-spacing: .08em; line-height: 1; text-transform: uppercase; transform: rotate(-4deg); opacity: .88; mix-blend-mode: multiply; }
.sello--rojo { color: #b0261f; }
.sello--ambar { color: #b06a10; }
.sello--lapiz { color: #4b5d78; border-style: dashed; border-width: 3px; }

/* las tiendas */
.tiendas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.tienda { display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 18px 8px 14px; border-radius: 14px; background: var(--tinta); color: var(--papel); text-decoration: none; border: 2px solid var(--tinta); box-shadow: 0 4px 0 rgba(42, 30, 20, .4); transition: transform .12s, box-shadow .12s; }
.tienda svg { width: 24px; height: 24px; fill: var(--papel); flex: none; }
.tienda span { display: flex; flex-direction: column; font-family: var(--titulo); font-weight: 800; font-size: 20px; line-height: 1; letter-spacing: .03em; }
.tienda small { font-family: var(--texto); font-weight: 500; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; opacity: .75; margin-bottom: 3px; }
.tienda:hover { transform: translateY(-2px); box-shadow: 0 6px 0 rgba(42, 30, 20, .4); }
.tienda:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(42, 30, 20, .4); }
[data-enlace].sin-enlace { display: none; }

.anotacion { position: relative; display: inline-block; margin: 16px 0 0; padding-left: 52px; font-size: 28px; line-height: 1.1; color: var(--rojo); transform: rotate(-3deg); }
.anotacion::before { content: ""; position: absolute; left: 0; top: -6px; width: 46px; height: 34px; background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 46 34'><path d='M4 30 C 10 12, 24 6, 40 8' fill='none' stroke='%23b8352f' stroke-width='2.6' stroke-linecap='round'/><path d='M33 2 L41 8 L33 14' fill='none' stroke='%23b8352f' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/></svg>") no-repeat center / contain; }

/* los próximos: papel más gris y tinta de lápiz azul */
.panel--boceto { background: var(--ruido), linear-gradient(90deg, transparent 32px, rgba(75, 93, 120, .35) 32px 34px, transparent 34px), repeating-linear-gradient(180deg, transparent 0 33px, rgba(110, 106, 98, .14) 33px 34px), linear-gradient(170deg, #ece2cc 0%, #ddd0b0 100%); }
.panel--boceto .panel__frase, .panel--boceto .anotacion { color: var(--azul-lapiz); }
.panel--boceto .anotacion::before { filter: hue-rotate(190deg) saturate(.5); }
.panel--boceto .rasgos li::before { filter: hue-rotate(195deg) saturate(.45) brightness(1.05); }

/* ---------- las capturas pegadas con cinta ---------- */
.galeria { display: grid; gap: 26px 18px; align-content: center; }
.foto { position: relative; margin: 0; padding: 9px 9px 0; background: #fbf7ee; border-radius: 3px; box-shadow: 0 16px 34px rgba(0, 0, 0, .5), 0 1px 0 rgba(0, 0, 0, .1); transition: transform .25s ease, box-shadow .25s ease; }
.foto::before { content: ""; position: absolute; top: -13px; left: 50%; width: 92px; height: 28px; transform: translateX(-50%) rotate(-4deg); background: linear-gradient(90deg, rgba(255, 255, 255, .15), rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, .12)), rgba(232, 218, 176, .8); box-shadow: 0 1px 2px rgba(0, 0, 0, .14); z-index: 2; }
.foto:nth-child(odd) { transform: rotate(-1.6deg); }
.foto:nth-child(even) { transform: rotate(1.4deg); }
.foto:nth-child(3n)::before { transform: translateX(-50%) rotate(5deg); }
.foto:hover { transform: rotate(0) translateY(-6px) scale(1.02); box-shadow: 0 24px 44px rgba(0, 0, 0, .55); z-index: 3; }
.foto__boton { display: block; width: 100%; padding: 0; border: 0; background: #111; cursor: zoom-in; overflow: hidden; border-radius: 2px; }
.foto__boton img { width: 100%; height: auto; transition: transform .4s ease; }
.foto:hover .foto__boton img { transform: scale(1.03); }
.foto figcaption { padding: 6px 4px 9px; font-family: var(--mano); font-weight: 600; font-size: 22px; line-height: 1.1; color: var(--tinta-suave); text-align: center; }
.galeria--apaisada { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.galeria--apaisada .foto--grande { grid-column: 1 / -1; }
.galeria--apaisada .foto:not(.foto--grande) figcaption { font-size: 18px; }
.galeria--vertical { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.galeria--boceto { grid-template-columns: 1fr; }
.galeria--despertar { display: flex; flex-wrap: wrap; justify-content: center; gap: 26px 16px; }
.galeria--despertar .foto { flex: 0 1 calc(50% - 8px); }
.galeria--despertar .foto--grande { flex-basis: 100%; }
.galeria--despertar .foto:not(.foto--grande) figcaption { font-size: 18px; }
@media (min-width: 640px) { .galeria--despertar .foto { flex-basis: calc(33.333% - 11px); } .galeria--despertar .foto--grande { flex-basis: 100%; } }
.galeria--alexcity { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.galeria--alexcity .foto--grande { grid-column: 1 / -1; }
.foto--dianoche .foto__boton { position: relative; }
.foto--dianoche .foto__noche { position: absolute; inset: 0; height: 100%; object-fit: cover; opacity: 0; animation: dianoche 12s ease-in-out 1.5s infinite; }
@keyframes dianoche { 0%, 36% { opacity: 0; } 50%, 86% { opacity: 1; } 100% { opacity: 0; } }
.juego--boceto .foto { background: rgba(236, 226, 204, .96); }
.juego--boceto .foto::before { background: rgba(200, 208, 220, .75); }
.juego--boceto .foto figcaption { color: var(--azul-lapiz); }
.galeria--abanico { grid-auto-flow: column; grid-auto-columns: 60%; overflow-x: auto; scroll-snap-type: x mandatory; padding: 18px 6px 12px; margin: 0 -6px; scrollbar-width: thin; }
.galeria--abanico .foto { scroll-snap-align: center; }

/* ---------- contacto: una nota pegada ---------- */
.contacto { padding: 90px 16px 40px; }
.nota-pegada { position: relative; max-width: 640px; margin: 0 auto; padding: 44px 30px 32px; text-align: center; color: var(--tinta); background: var(--ruido), linear-gradient(165deg, #fff1a8 0%, #f5df7c 100%); box-shadow: 0 24px 40px rgba(0, 0, 0, .5); transform: rotate(-1.2deg); border-radius: 2px 2px 14px 2px; }
.nota-pegada::before { content: ""; position: absolute; top: -14px; left: 50%; width: 130px; height: 30px; transform: translateX(-50%) rotate(3deg); background: rgba(232, 218, 176, .85); box-shadow: 0 1px 2px rgba(0, 0, 0, .15); }
.nota-pegada__titulo { margin: 0; font-family: var(--titulo); font-weight: 800; font-size: clamp(44px, 6vw, 68px); line-height: .95; }
.nota-pegada p { font-size: 18px; margin: 14px auto 22px; max-width: 470px; }
.nota-pegada__correo { display: inline-flex; align-items: center; gap: 9px; margin: 16px 0 0; padding: 4px 2px; font: 700 20px/1.2 var(--texto); color: var(--tinta); text-decoration: none; border-bottom: 2px solid currentColor; overflow-wrap: anywhere; transition: color .2s; }
.nota-pegada__correo svg { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.nota-pegada__correo:hover { color: var(--rojo); }
.nota-pegada__pd { margin-bottom: 0 !important; font-size: 26px !important; color: var(--rojo); transform: rotate(-2deg); }

/* ---------- pie ---------- */
.pie { text-align: center; padding: 34px 16px 50px; color: var(--hueso-suave); font-size: 15px; }
.pie p { margin: 4px 0; }
.pie__letras { font-size: 13px; opacity: .7; }

/* ---------- visor ---------- */
.visor { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 56px 12px 24px; background: rgba(6, 9, 18, .94); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.visor[hidden] { display: none; }
.visor__marco { margin: 0; max-width: min(1300px, 100%); max-height: 100%; display: flex; flex-direction: column; align-items: center; }
.visor__img { max-width: 100%; max-height: calc(100vh - 140px); max-height: calc(100svh - 140px); object-fit: contain; border-radius: 6px; box-shadow: 0 20px 60px rgba(0, 0, 0, .6); border: 8px solid #fbf7ee; }
.visor__video { max-width: 100%; max-height: calc(100vh - 140px); max-height: calc(100svh - 140px); border-radius: 6px; box-shadow: 0 20px 60px rgba(0, 0, 0, .6); border: 8px solid #fbf7ee; background: #000; }
.visor__img[hidden], .visor__video[hidden] { display: none; }
.visor__texto { margin-top: 10px; font-size: 28px; color: var(--hueso); }
.visor__cerrar, .visor__flecha { position: absolute; border: 0; cursor: pointer; color: var(--hueso); background: rgba(255, 255, 255, .08); border-radius: 999px; transition: background .2s; }
.visor__cerrar { top: 12px; right: 12px; width: 48px; height: 48px; font-size: 22px; }
.visor__flecha { top: 50%; width: 52px; height: 70px; margin-top: -35px; font-size: 46px; line-height: 1; }
.visor__flecha--izq { left: 10px; }
.visor__flecha--der { right: 10px; }
.visor__cerrar:hover, .visor__flecha:hover { background: rgba(255, 255, 255, .18); }

/* ---------- aparecer al hacer scroll ---------- */
[data-revela] { opacity: 0; translate: 0 40px; transition: opacity .8s ease, translate .9s cubic-bezier(.2, .8, .2, 1); }
[data-revela].visible { opacity: 1; translate: 0 0; }
.juego .galeria[data-revela] { transition-delay: .12s; }

/* ---------- PC ---------- */
@media (min-width: 640px) {
  .cartas { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .galeria--vertical { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .galeria--alexcity { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .galeria--abanico { grid-auto-columns: 36%; }
}
@media (min-width: 980px) {
  .juego { min-height: 100vh; padding: 120px 40px 130px; display: flex; align-items: center; }
  .juego__contenido { grid-template-columns: minmax(380px, 470px) minmax(0, 1fr); gap: 64px; }
  .juego--invertido .juego__contenido { grid-template-columns: minmax(0, 1fr) minmax(380px, 470px); }
  .juego--invertido .panel { order: 2; }
  .juego--invertido .galeria { order: 1; }
  .panel { padding: 40px 30px 36px 58px; }
  .panel::before { left: 16px; }
  .panel { background-position: 0 0, 10px 0, 0 0, 0 0; }
  .panel__icono { width: 96px; height: 96px; }
  .panel__nombre { font-size: clamp(40px, 4vw, 58px); }
  .panel__nombre--largo { font-size: clamp(34px, 3.2vw, 46px); }
  .galeria--vertical { gap: 30px 22px; }
  .galeria--vertical .foto:nth-child(1) { transform: rotate(-4deg) translateY(18px); }
  .galeria--vertical .foto:nth-child(2) { transform: rotate(-1deg); }
  .galeria--vertical .foto:nth-child(3) { transform: rotate(2deg) translateY(10px); }
  .galeria--vertical .foto:nth-child(4) { transform: rotate(4.5deg) translateY(26px); }
  .galeria--vertical .foto:hover { transform: rotate(0) translateY(-10px) scale(1.05); }
  .galeria--telefonos { gap: 34px 20px; }
  .galeria--telefonos .foto:nth-child(4n+1) { transform: rotate(-3deg) translateY(14px); }
  .galeria--telefonos .foto:nth-child(4n+2) { transform: rotate(-.8deg); }
  .galeria--telefonos .foto:nth-child(4n+3) { transform: rotate(1.8deg) translateY(8px); }
  .galeria--telefonos .foto:nth-child(4n) { transform: rotate(3.5deg) translateY(20px); }
  .galeria--telefonos .foto:hover { transform: rotate(0) translateY(-10px) scale(1.05); }
  .galeria--telefonos .foto figcaption { font-size: 18px; }
  .galeria--alexcity { gap: 34px 20px; }
  .galeria--alexcity .foto:nth-child(2) { transform: rotate(-3deg) translateY(10px); }
  .galeria--alexcity .foto:nth-child(3) { transform: rotate(-.8deg); }
  .galeria--alexcity .foto:nth-child(4) { transform: rotate(1.8deg) translateY(6px); }
  .galeria--alexcity .foto:nth-child(5) { transform: rotate(3.5deg) translateY(14px); }
  .galeria--alexcity .foto:hover { transform: rotate(0) translateY(-10px) scale(1.04); }
  .galeria--alexcity .foto:not(.foto--grande) figcaption { font-size: 18px; }
  .galeria--abanico { grid-auto-flow: row; grid-template-columns: repeat(5, minmax(0, 1fr)); overflow: visible; padding: 30px 0 0; margin: 0; gap: 0; }
  .galeria--abanico .foto { margin-left: -9%; }
  .galeria--abanico .foto:first-child { margin-left: 0; }
  .galeria--abanico .foto:nth-child(1) { transform: rotate(-8deg) translateY(22px); }
  .galeria--abanico .foto:nth-child(2) { transform: rotate(-3.5deg) translateY(6px); }
  .galeria--abanico .foto:nth-child(3) { transform: rotate(0deg); z-index: 2; }
  .galeria--abanico .foto:nth-child(4) { transform: rotate(3.5deg) translateY(6px); }
  .galeria--abanico .foto:nth-child(5) { transform: rotate(8deg) translateY(22px); }
  .galeria--abanico .foto:hover { transform: rotate(0) translateY(-16px) scale(1.07); z-index: 5; }
  .galeria--abanico .foto figcaption { font-size: 19px; }
  .cartas { margin-bottom: 56px; }
  .carta { padding: 14px 16px; grid-template-columns: 64px 1fr; }
  .carta img { width: 64px; height: 64px; }
  .carta__nombre { font-size: 21px; }
}
@media (min-width: 980px) {
  /* la portada en PC: el texto a la izquierda, sobre el cielo y el agua; la fogata a la derecha */
  .portada__arte { background-position: center 60%; }
  .portada__velo { background:
    linear-gradient(90deg, rgba(8, 12, 24, .82) 0%, rgba(8, 12, 24, .55) 30%, rgba(8, 12, 24, .08) 55%, transparent 70%),
    linear-gradient(180deg, rgba(8, 12, 24, .7) 0%, transparent 20%, transparent 70%, #0b1020 100%); }
  .portada__contenido { align-items: flex-start; text-align: left; width: min(var(--ancho), calc(100% - 80px)); margin: 0 auto; padding: 110px 0 30px; }
  .portada__contenido > * { max-width: 680px; }
  .portada__hola { margin-left: 6px; }
  .portada__lema { margin-left: 0; }
  .portada__botones, .portada__nota { justify-content: flex-start; }
}
@media (min-width: 980px) and (hover: hover) {
  .juego__arte { background-attachment: fixed, fixed; }
}

/* ---------- sin movimiento ---------- */

/* ---------- fondos de cada juego (aquí y no en el HTML: la CSP no deja estilos en línea) ---------- */
#alexcity { --fondo: url("../assets/img/alexcity/fondo.webp"); }
#duskroll { --fondo: url("../assets/img/duskroll/fondo.webp"); }
#despertar { --fondo: url("../assets/img/despertar/fondo.webp"); }
#senal { --fondo: url("../assets/img/senal/fondo.webp"); }

/* ---------- el botón >_ de la barra ---------- */
.barra__terminal { display: inline-flex; align-items: center; justify-content: center; height: 34px; min-width: 44px; padding: 0 10px; margin-left: auto; border: 2px solid rgba(87, 227, 137, .55); border-radius: 10px; background: rgba(9, 13, 25, .55); color: var(--neon); font: 800 15px/1 var(--mono); text-shadow: 0 0 8px rgba(87, 227, 137, .6); cursor: pointer; transition: background .2s, box-shadow .2s; }
.barra__terminal:hover, .barra__terminal[aria-expanded="true"] { background: rgba(87, 227, 137, .14); box-shadow: 0 0 14px rgba(87, 227, 137, .35); }
.barra__terminal:focus-visible, .dianoche:focus-visible, .dados__boton:focus-visible, .pie__terminal:focus-visible, .terminal__cerrar:focus-visible, .nota-pegada__correo:focus-visible { outline: 3px solid var(--neon); outline-offset: 3px; }

/* ---------- AlexCity: el interruptor de día y noche ---------- */
.foto--dianoche figcaption { padding-left: 86px; padding-right: 86px; }
.dianoche { position: absolute; right: 14px; bottom: 8px; z-index: 3; display: flex; align-items: center; justify-content: space-between; width: 70px; height: 32px; padding: 0 7px; border: 2px solid var(--tinta); border-radius: 999px; background: linear-gradient(90deg, #ffe08a, #ffb347); cursor: pointer; transition: background .5s; }
.dianoche svg { position: relative; width: 16px; height: 16px; fill: none; stroke: var(--tinta); stroke-width: 2.2; stroke-linecap: round; }
.dianoche__luna { fill: var(--tinta) !important; stroke: none !important; }
.dianoche__perilla { position: absolute; top: 2px; left: 2px; z-index: 1; width: 24px; height: 24px; border-radius: 50%; background: #fffaf0; box-shadow: 0 1px 3px rgba(0, 0, 0, .45); transition: transform .45s cubic-bezier(.5, 1.6, .4, 1), background .45s; }
.dianoche[aria-pressed="true"] { background: linear-gradient(90deg, #22305e, #0e1630); }
.dianoche[aria-pressed="true"] .dianoche__perilla { transform: translateX(38px); background: #dfe6ff; }
.dianoche[aria-pressed="true"] .dianoche__sol { stroke: #ffd877; }
.foto--dianoche.manual .foto__noche { animation: none; opacity: 0; transition: opacity .9s ease; }
.foto--dianoche.manual.de-noche .foto__noche { opacity: 1; }

/* ---------- clips de juego (fichas de video) ---------- */
.foto__video { position: relative; display: block; overflow: hidden; border-radius: 2px; background: #111; }
.foto__video video { display: block; width: 100%; height: auto; }
.foto__vivo { position: absolute; top: 8px; left: 8px; display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 6px; background: rgba(184, 53, 47, .94); color: #fff; font: 800 12px/1 var(--titulo); letter-spacing: .12em; box-shadow: 0 2px 6px rgba(0, 0, 0, .45); pointer-events: none; }
.foto__vivo i { width: 7px; height: 7px; border-radius: 50%; background: #fff; }
.foto--video.reproduciendo .foto__vivo i { animation: grabando 1.2s steps(1) infinite; }
@keyframes grabando { 50% { opacity: .15; } }
.foto__abrir { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; padding: 0; border: 0; background: transparent; cursor: zoom-in; }
.foto__abrir:focus-visible { outline: 3px solid var(--neon); outline-offset: -3px; }
.foto__vivo { z-index: 2; }
.video__control { z-index: 2; position: absolute; right: 8px; bottom: 8px; display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; padding: 0; border: 2px solid rgba(255, 255, 255, .85); border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff; cursor: pointer; transition: background .2s, transform .15s; }
.video__control:hover { background: rgba(0, 0, 0, .75); transform: scale(1.06); }
.video__control:focus-visible { outline: 3px solid var(--neon); outline-offset: 2px; }
.video__control svg { width: 18px; height: 18px; fill: currentColor; }
.video__control .i-pausa { display: none; }
.foto--video.reproduciendo .video__control .i-play { display: none; }
.foto--video.reproduciendo .video__control .i-pausa { display: block; }

/* ---------- Primera Oleada: los cinco climas ---------- */
.foto--clima .foto__boton { position: relative; }
.foto--clima .clima__capa { position: absolute; inset: 0; height: 100%; object-fit: cover; opacity: 0; transition: opacity .9s ease; }
.foto--clima .clima__capa.visible { opacity: 1; }
.clima { display: flex; justify-content: center; gap: 8px; padding: 0 0 12px; }
.clima__boton { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; border: 2px solid var(--tinta); border-radius: 50%; background: #fbf7ee; color: var(--tinta); cursor: pointer; transition: background .2s, color .2s, transform .15s; }
.clima__boton svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.clima__boton[data-clima="noche"] svg { fill: currentColor; stroke: none; }
.clima__boton:hover { transform: translateY(-2px); }
.clima__boton[aria-pressed="true"] { background: var(--tinta); color: #ffd877; }
.clima__boton:focus-visible { outline: 3px solid var(--neon); outline-offset: 2px; }

/* ---------- Duskroll: tira los dados ---------- */
.dados { margin: 22px 0 8px; padding: 14px 16px 12px; border: 2px dashed rgba(42, 30, 20, .35); border-radius: 12px; background: rgba(42, 30, 20, .05); }
.dados__titulo { margin: 0 0 10px; font-size: 22px; line-height: 1.1; color: var(--tinta); }
.dados__fila { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dado { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; width: 58px; height: 64px; border-radius: 12px; background: radial-gradient(circle at 35% 25%, #4a5866, #1b232b 70%); border: 2px solid #0b1014; box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .12), 0 4px 8px rgba(0, 0, 0, .3); transition: box-shadow .3s; }
.dado__cara { font: 800 30px/1 var(--titulo); color: #7ff3ff; text-shadow: 0 0 10px rgba(87, 227, 255, .9), 0 0 2px #e9ffff; }
.dado small { margin-top: 4px; font: 700 11px/1 var(--titulo); letter-spacing: .1em; }
.dado--mov small { color: #8ce8ad; }
.dado--atq small { color: #ffc27e; }
.dado--def small { color: #9cc0ff; }
.dados__boton { margin-left: auto; padding: 12px 18px; border: 0; border-radius: 12px; background: var(--tinta); color: var(--papel); font: 800 18px/1 var(--titulo); letter-spacing: .08em; cursor: pointer; box-shadow: 0 4px 0 #000; transition: transform .1s, box-shadow .1s; }
.dados__boton:active { transform: translateY(3px); box-shadow: 0 1px 0 #000; }
.dados__resultado { min-height: 1.3em; margin: 10px 0 0; font-size: 21px; line-height: 1.2; color: var(--rojo); }
.dados.rodando .dado { animation: rodar .6s cubic-bezier(.3, .7, .4, 1.3); }
.dados.rodando .dado:nth-child(2) { animation-delay: .06s; }
.dados.rodando .dado:nth-child(3) { animation-delay: .12s; }
@keyframes rodar { 0% { transform: rotate(0) scale(1); } 35% { transform: rotate(-210deg) scale(.8); } 75% { transform: rotate(-340deg) scale(1.1); } 100% { transform: rotate(-360deg) scale(1); } }
.dados.duskroll .dado { box-shadow: 0 0 0 3px #57e3ff, 0 0 24px rgba(87, 227, 255, .85); }
.dados.duskroll .dados__resultado { color: #0d7f8c; font-weight: 700; }
.dados.escalera .dado { box-shadow: 0 0 0 3px var(--neon), 0 0 18px rgba(87, 227, 137, .7); }
.dados.escalera .dados__resultado { color: #2f7d4f; font-weight: 700; }

/* ---------- las fotos se inclinan con el ratón (solo con ratón) ---------- */
@media (hover: hover) and (pointer: fine) {
  .foto__boton { position: relative; transform: perspective(800px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .25s ease-out; }
  .foto__boton::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .25s; background: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%), rgba(255, 255, 255, .34), rgba(255, 255, 255, 0) 52%); mix-blend-mode: overlay; }
  .foto__boton:hover::after { opacity: 1; }
}

/* ---------- la pista del pie ---------- */
.pie__pista { margin: 12px 0 6px; }
.pie__terminal { padding: 4px 8px; border: 0; background: none; color: var(--neon); font: 600 14px/1.4 var(--mono); cursor: pointer; opacity: .75; transition: opacity .2s, text-shadow .2s; }
.pie__terminal:hover { opacity: 1; text-shadow: 0 0 8px rgba(87, 227, 137, .6); }

/* ---------- la terminal (baja desde arriba, como la consola de un juego) ---------- */
.terminal { position: fixed; top: 0; left: 50%; z-index: 90; display: flex; flex-direction: column; width: min(920px, 100%); height: min(62vh, 560px); transform: translate(-50%, -110%); background: rgba(6, 10, 18, .95); border: 1px solid rgba(87, 227, 137, .35); border-top: 0; border-radius: 0 0 14px 14px; box-shadow: 0 30px 80px rgba(0, 0, 0, .7), 0 0 30px rgba(87, 227, 137, .12); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); color: #cfe9d6; font: 15px/1.5 var(--mono); transition: transform .38s cubic-bezier(.2, .9, .25, 1.08); }
.terminal[hidden] { display: none; }
.terminal.abierta { transform: translate(-50%, 0); }
.terminal::after { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit; background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .025) 0 1px, transparent 1px 3px); }
.terminal__barra { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid rgba(87, 227, 137, .18); }
.terminal__luces { display: inline-flex; gap: 7px; }
.terminal__luces i { width: 12px; height: 12px; border-radius: 50%; background: #ff5f57; }
.terminal__luces i:nth-child(2) { background: #febc2e; }
.terminal__luces i:nth-child(3) { background: #28c840; }
.terminal__titulo { flex: 1; margin: 0; text-align: center; font-size: 13px; font-weight: 600; letter-spacing: .04em; color: #8fb59b; }
.terminal__cerrar { padding: 2px 8px; border: 0; border-radius: 6px; background: none; color: #8fb59b; font-size: 18px; cursor: pointer; }
.terminal__cerrar:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.terminal__salida { flex: 1; overflow-y: auto; padding: 14px 18px 6px; white-space: pre-wrap; overflow-wrap: anywhere; scrollbar-width: thin; scrollbar-color: rgba(87, 227, 137, .4) transparent; }
.terminal__salida p { margin: 0 0 3px; }
.t-cmd { color: #fff; }
.t-cmd::before { content: "alexis26@dev:~$ "; color: var(--neon); }
.t-ok { color: var(--neon); }
.t-err { color: #ff7a6b; }
.t-dim { color: #7f9a88; }
.t-fuego { color: #ffb15c; }
.t-cian { color: #6fe7f5; }
.t-oro { color: #f1c75b; }
.terminal__linea { display: flex; align-items: center; gap: 10px; margin: 0; padding: 8px 18px 14px; }
.terminal__prompt { color: var(--neon); white-space: nowrap; }
.terminal__entrada { flex: 1; min-width: 0; padding: 4px 0; border: 0; outline: 0; background: transparent; color: #fff; font: inherit; caret-color: var(--neon); }
@media (max-width: 640px) {
  .terminal { height: 72vh; height: 72svh; font-size: 13.5px; border-radius: 0 0 12px 12px; }
  .terminal__entrada { font-size: 16px; }
  .dado { width: 52px; height: 58px; }
  .dados__boton { margin-left: 0; }
}

/* ---------- la demo jugable: un teléfono en la pantalla ---------- */
.boton--demo { width: 100%; margin: 4px 0 0; }
.demo-nota { margin: 8px 0 14px; text-align: center; font-size: 20px; color: var(--tinta-suave); }
.demo { position: fixed; inset: 0; z-index: 95; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(4, 6, 12, .9); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.demo[hidden] { display: none; }
.demo__marco { position: relative; display: flex; flex-direction: column; width: min(430px, 100%); height: min(880px, 100%); padding: 10px; border-radius: 42px; background: linear-gradient(160deg, #262b34, #0b0d12); box-shadow: 0 0 0 2px #3a3f4a, 0 30px 80px rgba(0, 0, 0, .7), 0 0 44px rgba(87, 227, 255, .2); }
.demo__barra { display: flex; align-items: center; gap: 8px; padding: 6px 12px 10px; }
.demo__titulo { flex: 1; margin: 0; font: 800 18px/1 var(--titulo); letter-spacing: .08em; text-transform: uppercase; color: var(--hueso); }
.demo__accion { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border: 0; border-radius: 10px; background: rgba(255, 255, 255, .08); color: var(--hueso); font-size: 18px; cursor: pointer; }
.demo__accion svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.demo__accion:hover { background: rgba(255, 255, 255, .16); }
.demo__accion:focus-visible { outline: 3px solid var(--neon); outline-offset: 2px; }
.demo__pantalla { position: relative; flex: 1; overflow: hidden; border-radius: 32px; background: #000; }
.demo__juego { position: absolute; inset: 0; display: block; width: 100%; height: 100%; border: 0; }
.demo__cargando { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; margin: 0; padding: 20px; text-align: center; color: #7ff3ff; font: 600 17px/1.4 var(--mono); }
@media (max-width: 640px) {
  .demo { padding: 0; }
  .demo__marco { width: 100%; height: 100%; padding: 0; border-radius: 0; box-shadow: none; }
  .demo__pantalla { border-radius: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .foto__boton { transform: none !important; }
  .terminal { transition: none; }
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .portada__arte { animation: none; }
  .foto--dianoche .foto__noche { animation: none; }
  .foto--clima .clima__capa { transition: none; }
  .marca__neon { opacity: 1; }
  .circulo-mano path, .subrayado-mano path { stroke-dashoffset: 0; }
  [data-revela] { opacity: 1; translate: 0 0; }
}
