:root {
  --fondo: #07090c; --texto: #f3f1ed; --segundo: #a8a39c; --tenue: #7f7a74;
  --linea: rgba(255,248,240,.07); --linea-2: rgba(255,248,240,.13);
  --capa: rgba(255,248,240,.03); --capa-2: rgba(255,248,240,.06); --tarjeta: rgba(14,15,19,.84);
  --acento: #3fd8f2; --ac: 63,216,242; --ok: #10e0a1; --mal: #fb7185; --aviso: #f7a440;
  --jak: "Plus Jakarta Sans", system-ui, sans-serif;
  --geist: "Geist", system-ui, -apple-system, sans-serif;
  --alto-barra: 64px;
  color-scheme: dark;
}
[data-c="a"] { --c: 75,139,247; } [data-c="b"] { --c: 247,164,64; } [data-c="c"] { --c: 16,224,161; }
[data-c="d"] { --c: 167,139,250; } [data-c="e"] { --c: 244,114,182; } [data-c="n"] { --c: 150,145,138; }

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--fondo); color: var(--texto); height: 100%; }
body { font-family: var(--geist); font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased; overflow: hidden; }
button, input { font: inherit; color: inherit; background: none; border: 0; }
button { cursor: pointer; }
h1, h2, h3, .jak { font-family: var(--jak); font-weight: 800; letter-spacing: -.04em; text-wrap: balance; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--acento); outline-offset: 3px; border-radius: 8px; }
::selection { background: rgba(var(--ac), .35); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.grad { background: linear-gradient(92deg, #c4b5fd 0%, #3fd8f2 70%); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Fondo de nodos */
.fondo-fijo { position: fixed; inset: 0; z-index: 0; pointer-events: none; background: var(--fondo); }
.fondo-fijo canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 1.2s; }
.fondo-fijo.gl canvas { opacity: 1; }
.velo { position: fixed; inset: 0; z-index: 0; pointer-events: none; background: radial-gradient(60% 70% at 50% 50%, rgba(7,9,12,.74), rgba(7,9,12,.18) 70%, transparent); }

/* Estructura: todo cabe en la pantalla */
.app { position: relative; z-index: 1; height: 100dvh; display: flex; flex-direction: column; }
.barra { flex: none; display: flex; align-items: center; gap: 18px; height: var(--alto-barra); padding: 0 clamp(18px, 3vw, 40px); }
.marca { display: flex; align-items: center; gap: 10px; font-family: var(--jak); font-weight: 800; font-size: 17px; letter-spacing: -.02em; white-space: nowrap; }
.marca i { width: 8px; height: 8px; border-radius: 50%; background: var(--acento); box-shadow: 0 0 0 4px rgba(var(--ac),.16), 0 0 14px rgba(var(--ac),.8); }
.marca small { font-family: var(--geist); font-weight: 400; font-size: 13px; color: var(--tenue); letter-spacing: 0; margin-left: 6px; }
.barra-der { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.vista { flex: 1; min-height: 0; position: relative; display: flex; flex-direction: column; }
.pantalla { flex: 1; min-height: 0; display: flex; flex-direction: column; animation: entra .45s cubic-bezier(.2,.7,.2,1) both; }
@keyframes entra { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.centrado { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: center; }
.ancho { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 clamp(18px, 3vw, 40px); }

/* Piezas */
.boton { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 22px; border-radius: 14px; font-size: 15px; font-weight: 500; background: var(--capa-2); border: 1px solid var(--linea-2); color: var(--texto); white-space: nowrap; transition: transform .2s, border-color .2s, background .2s, box-shadow .2s, opacity .2s; }
.boton:hover { transform: translateY(-1px); border-color: rgba(255,248,240,.24); }
.boton:active { transform: scale(.98); }
.boton:disabled { opacity: .35; cursor: not-allowed; transform: none; }
.boton.chico { height: 38px; padding: 0 14px; font-size: 13.5px; border-radius: 11px; }
.boton.fuerte { background: var(--acento); color: #03151b; border-color: transparent; box-shadow: 0 10px 30px -12px rgba(var(--ac),.75); font-weight: 600; }
.boton.fuerte:hover { box-shadow: 0 14px 36px -12px rgba(var(--ac),.9); }
.boton.enorme { height: 64px; padding: 0 32px; font-size: 18px; border-radius: 18px; }
.flecha { width: 16px; height: 16px; flex: none; }
.tecla { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 7px; border: 1px solid var(--linea-2); font-size: 11.5px; color: var(--tenue); font-family: var(--geist); font-weight: 500; }
.cel { position: relative; border-radius: 22px; background: radial-gradient(90% 70% at 100% 0%, rgba(var(--c, var(--ac)),.07), transparent 60%), var(--tarjeta); border: 1px solid var(--linea); }
.brilla::before { content: ""; position: absolute; left: 12%; right: 12%; top: -1px; height: 1px; background: linear-gradient(90deg, transparent, rgba(var(--c, var(--ac)),.85), transparent); pointer-events: none; }
.chip { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; padding: 5px 12px; border-radius: 99px; border: 1px solid var(--linea-2); color: var(--segundo); white-space: nowrap; }
.chip b { color: var(--texto); font-weight: 600; }
.punto { width: 7px; height: 7px; border-radius: 50%; background: var(--acento); box-shadow: 0 0 10px var(--acento); flex: none; }
.ico { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; color: rgb(var(--c)); background: rgba(var(--c),.09); border: 1px solid rgba(var(--c),.2); }
.ico svg { width: 55%; height: 55%; }
.estado { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--segundo); padding: 0 6px; }
.estado::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(16,224,161,.18); }
.estado[data-estado="pendiente"]::before { background: var(--tenue); box-shadow: none; animation: latido 1s ease-in-out infinite; }
.estado[data-estado="error"] { color: var(--aviso); }
.estado[data-estado="error"]::before { background: var(--aviso); box-shadow: 0 0 0 3px rgba(247,164,64,.2); }
@keyframes latido { 50% { opacity: .3; } }
.linea-punto { flex: 1; height: 2px; background: var(--linea-2); border-radius: 2px; position: relative; }
.linea-punto i { position: absolute; left: 0; top: 0; height: 2px; border-radius: 2px; background: linear-gradient(90deg, rgba(var(--ac),.2), var(--acento)); transition: width .4s ease; }
.linea-punto i::after { content: ""; position: absolute; right: -4px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--acento); box-shadow: 0 0 0 4px rgba(var(--ac),.18), 0 0 16px rgba(var(--ac),.9); }
.campo { height: 56px; border-radius: 15px; background: var(--capa); border: 1px solid var(--linea-2); display: flex; align-items: center; gap: 12px; padding: 0 18px; font-size: 17px; transition: border-color .2s, box-shadow .2s; }
.campo:focus-within { border-color: rgba(var(--ac),.6); box-shadow: 0 0 0 4px rgba(var(--ac),.12); }
.campo svg { width: 20px; height: 20px; color: var(--tenue); flex: none; }
.campo input { flex: 1; height: 100%; outline: none; min-width: 0; }
.campo input::placeholder { color: var(--tenue); }
.seg { display: inline-flex; gap: 2px; padding: 4px; border-radius: 13px; background: rgba(7,9,12,.55); border: 1px solid var(--linea); }
.seg button, .seg label { padding: 10px 22px; border-radius: 9px; color: var(--segundo); font-size: 15px; cursor: pointer; transition: color .2s, background .2s; }
.seg button:hover, .seg label:hover { color: var(--texto); }
.seg [aria-checked="true"], .seg label:has(input:checked) { color: var(--texto); background: rgba(255,248,240,.1); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label:has(input:focus-visible) { outline: 2px solid var(--acento); }
.error { color: var(--mal); font-size: 14px; min-height: 21px; }

/* 1 Bienvenida */
.bien { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; height: 100%; }
.bien h1 { font-size: clamp(46px, min(6vw, 10vh), 88px); line-height: .98; margin: clamp(14px, 2.4vh, 24px) 0; }
.bien .sub { font-size: clamp(16px, 2.2vh, 19px); color: var(--segundo); max-width: 31em; }
.acceso { display: flex; gap: 10px; margin-top: clamp(22px, 4.5vh, 42px); max-width: 520px; }
.acceso .campo { flex: 1; }
.acceso .boton { height: 56px; border-radius: 15px; }
.acceso + .error { margin-top: 10px; }
.firma { margin-top: clamp(20px, 4vh, 40px); padding-top: 20px; border-top: 1px solid var(--linea); max-width: 520px; font-size: 13.5px; color: var(--tenue); }
.firma b { color: var(--segundo); font-weight: 500; }
.figura { position: relative; height: min(70vh, 600px); }
.figura canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

/* 2 Datos */
.datos { width: 100%; max-width: 560px; margin: 0 auto; padding: 0 20px; }
.datos h2 { font-size: clamp(34px, 5.4vh, 46px); line-height: 1.05; margin: 12px 0 10px; }
.datos .sub { color: var(--segundo); font-size: 17px; margin-bottom: clamp(18px, 4vh, 34px); }
.datos label.et { display: block; font-size: 14px; font-weight: 500; color: var(--segundo); margin: 20px 0 10px; }

/* 3 Fichas de categorías */
.fichas { display: flex; flex-direction: column; height: 100%; width: 100%; max-width: 1100px; margin: 0 auto; padding: clamp(6px, 1.5vh, 18px) clamp(18px, 3vw, 40px) clamp(14px, 3vh, 28px); }
.pestanas { flex: none; display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: clamp(10px, 2.2vh, 20px); }
.pestanas button { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 7px; border-radius: 12px; border: 1px solid var(--linea); color: var(--tenue); font-size: 13.5px; background: var(--tarjeta); transition: border-color .2s, color .2s, background .2s; }
.pestanas button .ico { width: 26px; height: 26px; border-radius: 8px; }
.pestanas button:hover { color: var(--texto); }
.pestanas button[aria-selected="true"] { border-color: rgba(var(--c),.6); color: var(--texto); background: rgba(var(--c),.1); }
.pestanas button.vista-ya { color: var(--segundo); }
.ficha { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: clamp(20px, 3.6vh, 38px) clamp(22px, 3vw, 42px); }
.ficha-cuerpo { flex: 1; min-height: 0; }
.ficha-cab { display: flex; align-items: center; gap: 18px; }
.ficha-cab .ico { width: clamp(46px, 6.5vh, 60px); height: clamp(46px, 6.5vh, 60px); border-radius: 16px; }
.ficha-cab h2 { font-size: clamp(30px, 5vh, 42px); line-height: 1; }
.ficha-cab h2 small { display: block; font-family: var(--geist); font-size: 14px; font-weight: 500; letter-spacing: 0; color: rgb(var(--c)); margin-bottom: 6px; }
.ficha .lit { font-size: clamp(17px, 2.5vh, 21px); line-height: 1.5; margin: clamp(14px, 2.8vh, 26px) 0 clamp(16px, 3vh, 28px); max-width: 44em; color: #efece7; }
.ficha .lit b { color: rgb(var(--c)); font-weight: 600; }
.dos { display: grid; grid-template-columns: 1.15fr 1fr; gap: 16px; }
.col h3 { font-family: var(--geist); font-size: 14px; font-weight: 600; letter-spacing: 0; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.col h3 svg { width: 16px; height: 16px; }
.col.si h3 { color: var(--ok); } .col.no h3 { color: var(--mal); }
.ej { display: grid; grid-template-columns: 24px 1fr; gap: 12px; padding: clamp(8px, 1.4vh, 12px) 14px; border-radius: 14px; background: var(--capa); border: 1px solid var(--linea); margin-bottom: 8px; }
.ej .m { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; }
.ej .m svg { width: 13px; height: 13px; }
.col.si .m { background: rgba(16,224,161,.15); color: var(--ok); } .col.no .m { background: rgba(251,113,133,.14); color: var(--mal); }
.ej q { quotes: none; font-size: clamp(14px, 1.9vh, 15.5px); color: var(--texto); display: block; }
.ej small { display: block; font-size: 13px; color: var(--segundo); margin-top: 2px; }
.ficha-pie { flex: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: clamp(12px, 2.4vh, 24px); }
.reglas { display: grid; gap: 10px; margin-top: 8px; }
.reglas li { list-style: none; display: grid; grid-template-columns: 26px 1fr; gap: 12px; align-items: start; font-size: clamp(15px, 2.2vh, 18px); padding: clamp(10px, 1.8vh, 14px) 16px; border-radius: 14px; background: var(--capa); border: 1px solid var(--linea); }
.reglas li span { width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; background: rgba(var(--ac),.12); color: var(--acento); font-weight: 600; font-size: 13px; }

/* Espera */
.espera { text-align: center; align-items: center; }
.espera h2 { font-size: clamp(34px, 6vh, 54px); line-height: 1.05; margin: 22px auto 14px; max-width: 16em; }
.espera p { color: var(--segundo); font-size: 18px; max-width: 34em; margin: 0 auto; }
.espera .acciones { display: flex; gap: 10px; justify-content: center; margin-top: 30px; flex-wrap: wrap; }
.pulso { width: 64px; height: 64px; margin: 0 auto; position: relative; }
.pulso i { position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid var(--acento); opacity: 0; animation: onda 2.6s ease-out infinite; }
.pulso i:nth-child(2) { animation-delay: .87s; } .pulso i:nth-child(3) { animation-delay: 1.74s; }
.pulso b { position: absolute; inset: 24px; border-radius: 50%; background: var(--acento); box-shadow: 0 0 20px var(--acento); }
@keyframes onda { from { transform: scale(.35); opacity: .7; } to { transform: scale(1.4); opacity: 0; } }

/* 4 Codificar */
.cod { flex: 1; min-height: 0; width: 100%; max-width: 960px; margin: 0 auto; padding: clamp(6px, 1.6vh, 20px) clamp(18px, 3vw, 40px) 0; display: flex; flex-direction: column; }
.cod-texto { flex: none; overflow-y: auto; max-height: 34vh; margin-top: clamp(8px, 1.6vh, 16px); padding-right: 6px; }
.cod-texto.larga { -webkit-mask-image: linear-gradient(#000 82%, transparent); mask-image: linear-gradient(#000 82%, transparent); }
.texto-resp { font-family: var(--jak); font-size: 28px; line-height: 1.4; font-weight: 700; letter-spacing: -.022em; white-space: pre-wrap; overflow-wrap: anywhere; }
.texto-resp.vacia { color: var(--tenue); }
.desliza { animation: desliza .3s cubic-bezier(.2,.7,.2,1) both; }
.desliza-atras { animation: desliza-atras .3s cubic-bezier(.2,.7,.2,1) both; }
@keyframes desliza { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
@keyframes desliza-atras { from { opacity: 0; transform: translateX(-16px); } to { opacity: 1; transform: none; } }
.pregunta { flex: none; display: flex; align-items: baseline; gap: 12px; margin: clamp(14px, 3vh, 28px) 0 clamp(8px, 1.4vh, 12px); flex-wrap: wrap; }
.pregunta h2 { font-size: 20px; letter-spacing: -.03em; }
.pregunta span { color: var(--tenue); font-size: 14px; }
.lista { flex: none; display: grid; gap: clamp(4px, .8vh, 7px); }
.fila { position: relative; display: grid; grid-template-columns: 26px 36px 1fr auto; gap: 16px; align-items: center; width: 100%; text-align: left; padding: clamp(6px, 1.1vh, 10px) 18px clamp(6px, 1.1vh, 10px) 16px; border-radius: 14px; border: 1px solid var(--linea); background: var(--tarjeta); transition: border-color .2s, background .2s, transform .12s; }
.fila:hover { border-color: var(--linea-2); }
.fila:active { transform: scale(.995); }
.fila .ico { width: 36px; height: 36px; border-radius: 10px; }
.caja { width: 24px; height: 24px; border-radius: 7px; border: 1.5px solid var(--linea-2); display: grid; place-items: center; color: #07090c; transition: background .15s, border-color .15s, box-shadow .2s; }
.caja svg { width: 15px; height: 15px; opacity: 0; transform: scale(.4); transition: opacity .15s, transform .2s cubic-bezier(.3,1.6,.5,1); }
.fila h3 { font-family: var(--geist); font-weight: 600; font-size: 16px; letter-spacing: -.01em; display: flex; align-items: center; gap: 10px; }
.fila h3 small { font-weight: 500; font-size: 12px; color: rgb(var(--c)); border: 1px solid rgba(var(--c),.35); border-radius: 6px; padding: 1px 6px; }
.fila p { font-size: 13.5px; color: var(--segundo); margin-top: 1px; line-height: 1.4; }
.fila[aria-checked="true"] { border-color: rgba(var(--c),.55); background: radial-gradient(80% 140% at 0% 0%, rgba(var(--c),.15), transparent 70%), var(--tarjeta); }
.fila[aria-checked="true"]::before { content: ""; position: absolute; left: 10%; right: 10%; top: -1px; height: 1px; background: linear-gradient(90deg, transparent, rgb(var(--c)), transparent); }
.fila[aria-checked="true"] .caja { background: rgb(var(--c)); border-color: rgb(var(--c)); box-shadow: 0 0 16px rgba(var(--c),.5); }
.fila[aria-checked="true"] .caja svg { opacity: 1; transform: none; }
.fila[aria-checked="true"] .tecla { color: rgb(var(--c)); border-color: rgba(var(--c),.4); }
.fila.n { margin-top: 3px; background: transparent; border-style: dashed; }
.aviso-marca { flex: none; min-height: 22px; font-size: 14px; color: var(--aviso); margin-top: 8px; text-align: center; }
.dock { flex: none; width: min(960px, calc(100% - 36px)); margin: 6px auto clamp(12px, 2.6vh, 24px); display: flex; align-items: center; gap: 18px; padding: 10px 10px 10px 22px; border-radius: 18px; background: rgba(7,9,12,.8); border: 1px solid var(--linea-2); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.dock .prog { font-size: 13.5px; color: var(--segundo); white-space: nowrap; }
.dock .prog b { color: var(--texto); font-weight: 500; }
.dock .atajo { font-size: 12.5px; color: var(--tenue); display: flex; gap: 6px; align-items: center; white-space: nowrap; }

/* Solución de la práctica */
.solucion { flex: 1; min-height: 0; width: 100%; max-width: 1100px; margin: 0 auto; padding: clamp(6px, 1.5vh, 16px) clamp(18px, 3vw, 40px) clamp(14px, 3vh, 26px); display: flex; flex-direction: column; }
.sol-cab { flex: none; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: clamp(10px, 2vh, 18px); }
.sol-cab h2 { font-size: clamp(28px, 4.4vh, 38px); }
.sol-cab .acierto { text-align: right; }
.sol-cab .acierto b { font-family: var(--jak); font-weight: 800; font-size: clamp(34px, 5.4vh, 48px); letter-spacing: -.04em; display: block; line-height: 1; }
.sol-cab .acierto span { font-size: 13px; color: var(--segundo); }
.sol-nav { flex: none; display: flex; gap: 6px; margin-bottom: clamp(8px, 1.6vh, 14px); }
.sol-nav button { min-width: 64px; padding: 7px 12px; border-radius: 11px; border: 1px solid var(--linea); background: var(--tarjeta); color: var(--tenue); font-size: 13.5px; display: inline-flex; align-items: center; gap: 8px; }
.sol-nav button i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.sol-nav button i.mal { background: var(--aviso); }
.sol-nav button[aria-selected="true"] { color: var(--texto); border-color: rgba(var(--ac),.5); background: rgba(var(--ac),.08); }
.sol-item { flex: 1; min-height: 0; padding: clamp(18px, 3vh, 30px) clamp(20px, 3vw, 36px); display: flex; flex-direction: column; overflow: auto; }
.sol-item .texto-resp { font-size: clamp(19px, 2.8vh, 24px); margin: 10px 0 clamp(12px, 2.2vh, 20px); }
.sol-filas { display: grid; gap: 6px; }
.sol-fila { display: grid; grid-template-columns: 30px 200px 1fr; gap: 14px; align-items: center; padding: clamp(5px, 1vh, 8px) 12px; border-radius: 12px; border: 1px solid var(--linea); }
.sol-fila .marca-sol { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; border: 1.5px solid var(--linea-2); color: #07090c; }
.sol-fila .marca-sol svg { width: 14px; height: 14px; }
.sol-fila.si { border-color: rgba(var(--c),.45); background: rgba(var(--c),.07); }
.sol-fila.si .marca-sol { background: rgb(var(--c)); border-color: rgb(var(--c)); }
.sol-fila .nm { font-weight: 600; font-size: 14.5px; }
.sol-fila .nm small { color: rgb(var(--c)); font-weight: 500; margin-right: 6px; }
.sol-fila .ex { font-size: 13.5px; color: var(--segundo); }
.sol-fila .tu { font-size: 12px; font-weight: 600; color: var(--aviso); border: 1px solid rgba(247,164,64,.45); border-radius: 6px; padding: 1px 6px; margin-right: 8px; white-space: nowrap; }

/* Fin */
.fin { text-align: center; align-items: center; }
.fin .cifra { font-family: var(--jak); font-weight: 800; font-size: clamp(90px, 18vh, 160px); letter-spacing: -.06em; line-height: 1; margin-top: 16px; }
.fin h2 { font-size: clamp(30px, 5vh, 44px); margin: 18px 0 10px; }
.fin p { color: var(--segundo); font-size: 18px; max-width: 32em; margin: 0 auto; }

/* Panel lateral de categorías */
.lateral { position: fixed; inset: 0 0 0 auto; z-index: 60; width: min(640px, 100%); background: #0b0d11; border-left: 1px solid var(--linea-2); display: flex; flex-direction: column; transform: translateX(102%); visibility: hidden; transition: transform .38s cubic-bezier(.2,.8,.2,1), visibility .38s; box-shadow: -40px 0 80px -40px rgba(0,0,0,.8); }
.lateral.abierto { transform: none; visibility: visible; }
.lateral-cab { flex: none; display: flex; align-items: center; justify-content: space-between; padding: 18px 24px 10px; }
.lateral-cab h2 { font-size: 24px; }
.lateral .pestanas { padding: 0 24px; margin-bottom: 10px; }
.lateral .ficha { padding: 6px 24px 24px; overflow: auto; }
.lateral .ficha .lit { font-size: 16.5px; margin: 14px 0 16px; }
.lateral .dos { grid-template-columns: 1fr; }
.lateral .ficha-cab h2 { font-size: 28px; }
.velo-lateral { position: fixed; inset: 0; z-index: 55; background: rgba(0,0,0,.45); opacity: 0; pointer-events: none; transition: opacity .3s; }
.velo-lateral.abierto { opacity: 1; pointer-events: auto; }

.toast { position: fixed; left: 50%; bottom: 28px; z-index: 80; transform: translate(-50%, 16px); opacity: 0; background: #f3f1ed; color: #07090c; padding: 12px 18px; border-radius: 14px; font-size: 14px; font-weight: 500; transition: transform .25s, opacity .25s; pointer-events: none; max-width: calc(100% - 32px); text-align: center; }
.toast.visible { transform: translate(-50%, 0); opacity: 1; }

/* Pantallas bajas: compactar */
@media (max-height: 760px) {
  :root { --alto-barra: 56px; }
  .fila p { font-size: 12.5px; }
  .fila .ico { width: 30px; height: 30px; border-radius: 9px; }
  .fila { grid-template-columns: 24px 30px 1fr auto; gap: 13px; }
  .pregunta h2 { font-size: 18px; }
  .ej small { display: none; }
}

/* Móvil: se permite el scroll */
@media (max-width: 760px) {
  body { overflow: auto; }
  .app { height: auto; min-height: 100dvh; }
  .marca small, .dock .atajo, .fila .tecla { display: none; }
  .bien { grid-template-columns: 1fr; padding: 30px 0; }
  .figura { display: none; }
  .acceso { flex-direction: column; }
  .dos { grid-template-columns: 1fr; }
  .cod-texto { max-height: none; }
  .fila { grid-template-columns: 24px 1fr; } .fila .ico { display: none; }
  .dock { position: sticky; bottom: 10px; gap: 10px; padding-left: 14px; }
  .sol-fila { grid-template-columns: 28px 1fr; } .sol-fila .ex { grid-column: 2; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
