/* M0LINA
   Dos mundos: el cubo (oscuro, GameCube: vidrio, rejilla negra, A verde y B
   roja) y las páginas (claras, el menú de la consola portátil: papel
   cuadriculado, filas rayadas, fichas de color con trama de puntos, diálogos
   de borde naranja). El lienzo WebGL está detrás de todo y funde su rejilla
   de un mundo al otro. */

:root {
  --sel: #7ee06a;
  --tinta: #26272c;
  --gris: #6b6e76;
  --papel: #eef0f2;
  --linea: #c9ccd2;
  --borde: #3b3d44;
  --ds-rosa: #d42a6e;
  --ds-azul: #1f55da;
  --ds-verde: #1f9d48;
  --ds-amarillo: #d4a600;
  --ds-naranja: #f07a00;
  --ds-oscuro: #2b2c30;
  --redonda: "Nunito", "Arial Rounded MT Bold", "Helvetica Neue", sans-serif;
  --pixel: "DotGothic16", "Nunito", ui-monospace, monospace;
  --barra-h: 28px;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: #000; color: var(--tinta); font-family: var(--redonda); }
body { -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button { font: inherit; color: inherit; }
img { max-width: 100%; }

#m0-lienzo { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 0; display: block; touch-action: none; }
#m0-lienzo.es-oculto { visibility: hidden; }
#app { position: relative; z-index: 1; pointer-events: none; }
/* La capa HTML deja pasar el puntero al lienzo (el cubo se agarra y se
   pulsa); solo sus piezas lo capturan. */
.m0-app { min-height: 100vh; pointer-events: none; }
.m0-app > * { pointer-events: auto; }
.m0-app > .m0-escenario, .m0-app > .m0-pistas { pointer-events: none; }

/* Trama de puntos de las fichas de la consola. */
.m0-trama {
  background: radial-gradient(circle, rgba(255,255,255,.34) 1.1px, transparent 1.5px) 0 0 / 5px 5px, var(--c, var(--ds-azul));
}

/* ------------------------------------------------------------------ barra */

/* La barra de arriba es la de NED OS en todo el sitio: una barra de menús
   de Macintosh de 1990 — blanca, fina, una raya de tinta debajo, las
   secciones como títulos de menú que se invierten al elegirlos. */
.m0-barra {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  height: calc(var(--barra-h) + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) 8px 0;
  display: flex; align-items: center; gap: 4px;
  background: #fff; color: var(--tinta);
  border-bottom: 1px solid var(--tinta);
  font-family: var(--pixel); font-size: .85rem;
}
.m0-barra.es-sobre-cubo, .m0-barra.es-sobre-papel { background: #fff; color: var(--tinta); }
.m0-marca {
  font-family: var(--pixel); font-weight: 400; font-size: .95rem; letter-spacing: .08em;
  text-decoration: none; padding: 0 8px; height: 100%; display: inline-flex; align-items: center;
}
.m0-nav { display: flex; gap: 0; flex: 1; justify-content: flex-start; height: 100%; }
.m0-nav a {
  text-decoration: none; padding: 0 10px; height: 100%; display: inline-flex; align-items: center;
}
.m0-nav a:hover, .m0-nav a.es-activo { background: var(--tinta); color: #fff; }
.m0-cuenta { display: flex; align-items: center; gap: 12px; font-size: .9rem; }
.m0-cuenta a { text-decoration: none; }
.m0-cuenta a:hover { text-decoration: underline; }
.m0-quien { opacity: .75; }
/* La barra es la de NED: Ned junto al nombre, búsqueda en píldora y la
   cuenta en un botón con borde. La marca de greb vive solo dentro de la barra
   de comandos, no aquí. */
.m0-marca { display: inline-flex; align-items: center; gap: 8px; }
.m0-ned {
  display: inline-block; width: 38px; height: 38px; flex: none;
  background: url(/assets/ballena-tira.png) 0 0 / 950px 38px no-repeat;
  animation: m0-ned 1.5s steps(25) infinite;
}
@keyframes m0-ned { to { background-position: -950px 0; } }
@media (prefers-reduced-motion: reduce) { .m0-ned { animation: none; } }
.m0-buscar {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer; height: 20px;
  padding: 0 6px; border: 1px solid var(--tinta); border-radius: 0; background: #fff; color: var(--tinta);
  font-family: var(--pixel); font-size: .8rem;
}
.m0-buscar .m0-icono, .m0-buscar .m0-icono svg { width: 13px; height: 13px; }
.m0-buscar:hover, .m0-cuenta-boton:hover { background: var(--tinta); color: #fff; box-shadow: none; }
.m0-buscar kbd { font-family: var(--pixel); font-size: .7rem; border: 0; padding: 0; opacity: .6; }
.m0-cuenta-boton {
  display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 8px;
  border: 1px solid var(--tinta); border-radius: 0; background: #fff;
}
.m0-cuenta-boton .m0-icono, .m0-cuenta-boton .m0-icono svg { width: 13px; height: 13px; }
.m0-cuenta-boton:hover { text-decoration: none !important; }
.m0-reloj { padding: 0 6px 0 4px; white-space: nowrap; }
.m0-marca .m0-ned { width: 20px; height: 20px; background-size: 500px 20px; animation-name: m0-ned-mini; }
@keyframes m0-ned-mini { to { background-position: -500px 0; } }
@media (max-width: 640px) { .m0-buscar { min-width: 0; } .m0-buscar-texto, .m0-buscar kbd { display: none; } }
@media (max-width: 640px) {
  .m0-nav { display: none; }
  .m0-barra { justify-content: space-between; }
}

/* ------------------------------------------------------ escena del cubo */

.m0-escenario { position: fixed; inset: 0; z-index: 5; pointer-events: none; color: #fff; }
.m0-escenario button, .m0-escenario a { pointer-events: auto; }

.m0-carga {
  position: absolute; left: 50%; bottom: 17vh; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.m0-ballena {
  width: 96px; height: 96px;
  background: url(/assets/ballena-tira.png) 0 0 / 2400px 96px no-repeat;
  animation: m0-ballena 1.5s steps(25) infinite;
  filter: drop-shadow(0 0 18px rgba(110,170,255,.25));
}
@keyframes m0-ballena { to { background-position: -2400px 0; } }
.m0-carga-sub {
  margin: 0; font-family: var(--redonda); font-weight: 800; font-size: 1.15rem;
  letter-spacing: .04em; text-transform: lowercase; color: rgba(255,255,255,.85);
}
.m0-puntitos span { animation: m0-punto 1.2s infinite both; }
.m0-puntitos span:nth-child(2) { animation-delay: .2s; }
.m0-puntitos span:nth-child(3) { animation-delay: .4s; }
@keyframes m0-punto { 0%, 60%, 100% { opacity: .15; } 30% { opacity: 1; } }
.m0-saltar {
  position: absolute; right: 20px; top: calc(var(--barra-h) + 14px);
  background: none; border: 0; color: rgba(255,255,255,.55); cursor: pointer; font-family: var(--pixel);
}
.m0-saltar:hover { color: #fff; }

.m0-ajustes-titulo {
  position: absolute; top: calc(var(--barra-h) + 3vh); left: 0; right: 0; margin: 0;
  text-align: center; font-weight: 800; font-size: clamp(1.1rem, 2.6vw, 1.8rem);
  text-shadow: 0 2px 10px rgba(0,0,0,.9);
}

/* Botones A/B: los círculos que brillan de la consola de sobremesa. */
.m0-pistas {
  position: fixed; left: 0; right: 0; bottom: calc(22px + env(safe-area-inset-bottom, 0px)); z-index: 10;
  display: flex; justify-content: center; align-items: center; gap: clamp(18px, 5vw, 64px);
  color: #fff; font-weight: 800; font-size: clamp(1rem, 2.2vw, 1.45rem); pointer-events: none;
}
.m0-pistas > * { pointer-events: auto; }
.m0-pista-elegir, .m0-boton-mando { display: inline-flex; align-items: center; gap: 10px; }
.m0-boton-mando { background: none; border: 0; cursor: pointer; padding: 6px 8px; border-radius: 30px; }
.m0-boton-mando:hover { background: rgba(255,255,255,.06); }
.m0-boton-mando:active { transform: scale(.96); }
.m0-puntos { opacity: .8; letter-spacing: .05em; }
.m0-stick {
  width: 1.7em; height: 1.7em; display: grid; place-items: center; border-radius: 50%;
  background: radial-gradient(circle, #ddd 0 25%, #888 26% 34%, #ddd 35% 46%, #777 47% 56%, #ccc 57%);
  color: transparent; box-shadow: 0 0 12px rgba(255,255,255,.3);
}
.m0-letra {
  width: 1.75em; height: 1.75em; display: grid; place-items: center; border-radius: 50%;
  font-weight: 900; font-size: 1.1em;
}
.m0-letra.es-b { background: radial-gradient(circle at 50% 45%, #b3263a, #5a0d18 70%); box-shadow: 0 0 18px 4px rgba(210,40,70,.55); }
.m0-letra.es-a { background: radial-gradient(circle at 50% 45%, #1e8f78, #06392f 70%); box-shadow: 0 0 18px 4px rgba(40,210,160,.5); }
@media (max-width: 560px) { .m0-pista-elegir { display: none; } }

.m0-cruceta { display: none; }
@media (pointer: coarse) {
  .m0-cruceta {
    display: grid; grid-template-columns: repeat(3, 42px); grid-template-rows: repeat(3, 42px); gap: 2px;
    grid-template-areas: ". u ." "l . r" ". d .";
  }
  .m0-cruceta button {
    border: 0; border-radius: 8px; background: rgba(255,255,255,.12); color: #fff; font-size: 14px;
    backdrop-filter: blur(6px);
  }
  .m0-cruceta .es-arriba { grid-area: u; } .m0-cruceta .es-abajo { grid-area: d; }
  .m0-cruceta .es-izquierda { grid-area: l; } .m0-cruceta .es-derecha { grid-area: r; }
  .m0-pista-elegir { display: none; }
}

/* ----------------------------------------------------------- páginas DS */

.m0-pagina {
  position: relative; max-width: 1180px; margin: 0 auto;
  padding: calc(var(--barra-h) + 48px) 24px 130px calc(24px + 150px);
  transform: translateX(var(--m0-desplazamiento, 0));
}
@media (max-width: 760px) { .m0-pagina { padding: calc(var(--barra-h) + 120px) 16px 130px; } }

.m0-boton-cubo {
  position: fixed; z-index: 15; left: 8px; top: calc(var(--barra-h) + 8px);
  width: 140px; height: 140px; border: 0; background: transparent; cursor: pointer; border-radius: 22px;
}
.m0-boton-cubo:hover { box-shadow: 0 0 0 2px var(--sel) inset; }
/* Sin aro amarillo al tocarlo con el ratón; con teclado sí se ve el foco. */
.m0-boton-cubo:focus { outline: none; }
.m0-boton-cubo:focus-visible { outline: 2px solid var(--tinta); outline-offset: 2px; }
@media (max-width: 760px) { .m0-boton-cubo { width: 110px; height: 110px; } }

.m0-etiqueta {
  display: inline-block; margin: 0 0 6px; font-family: var(--pixel); font-size: .95rem; color: var(--gris);
  text-decoration: none; letter-spacing: .04em;
}
a.m0-etiqueta:hover { color: var(--tinta); }
.m0-titulo {
  margin: 0 0 18px; font-weight: 900; font-size: clamp(2.2rem, 6vw, 4rem); line-height: 1; letter-spacing: -.01em;
  color: var(--tinta); text-shadow: 0 3px 0 #fff;
}
.m0-entradilla { max-width: 60ch; font-size: 1.1rem; line-height: 1.55; color: #3d3f46; }
.m0-vacio { font-family: var(--pixel); color: var(--gris); padding: 40px 0; }

/* Tarjetas: el panel de la consola, borde oscuro con filete blanco y gris. */
.m0-rejilla { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; margin-top: 22px; }
.m0-rejilla.es-grande { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.m0-tarjeta {
  position: relative; display: flex; flex-direction: column; text-decoration: none;
  background: #fff; border: 2px solid var(--borde); border-radius: 5px; padding: 6px;
  box-shadow: inset 0 0 0 2px #fff, inset 0 0 0 3px #b9bcc3, 0 3px 0 rgba(0,0,0,.12);
  transition: transform .18s cubic-bezier(.3,1.6,.5,1), box-shadow .18s;
}
.m0-tarjeta-obra { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; border: 1px solid var(--borde); border-radius: 2px; }
.m0-tarjeta-titulo {
  margin-top: 6px; padding: 6px 8px 2px; font-weight: 800; font-size: 1.05rem;
  background: repeating-linear-gradient(#f4f5f7 0 3px, #e3e5e9 3px 5px);
  border: 1px solid #aeb2ba;
}
.m0-tarjeta-meta { padding: 3px 8px 4px; font-family: var(--pixel); font-size: .8rem; color: var(--gris); }
.m0-tarjeta::before, .m0-tarjeta::after {
  content: ""; position: absolute; width: 16px; height: 16px; opacity: 0; transition: opacity .15s, inset .15s;
  border: 4px solid var(--sel); pointer-events: none; filter: drop-shadow(0 0 3px rgba(0,0,0,.4));
}
.m0-tarjeta::before { left: -9px; top: -9px; border-right: 0; border-bottom: 0; }
.m0-tarjeta::after { right: -9px; bottom: -9px; border-left: 0; border-top: 0; }
.m0-tarjeta:hover, .m0-tarjeta:focus-visible { transform: translateY(-3px); outline: none; }
.m0-tarjeta:hover::before, .m0-tarjeta:hover::after,
.m0-tarjeta:focus-visible::before, .m0-tarjeta:focus-visible::after { opacity: 1; }

.m0-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.m0-chips button, .m0-boton, .m0-pistas-ds button {
  font-family: var(--pixel); font-size: .95rem; cursor: pointer; text-decoration: none; display: inline-flex;
  align-items: center; gap: 8px; padding: 6px 16px; border-radius: 999px; color: var(--tinta);
  background: linear-gradient(#fdfdfd, #cdd0d5); border: 2px solid var(--borde);
  box-shadow: inset 0 -2px 0 rgba(0,0,0,.12), 0 2px 0 rgba(0,0,0,.15);
}
.m0-chips button:hover, .m0-boton:hover, .m0-pistas-ds button:hover { box-shadow: 0 0 0 3px var(--sel), inset 0 -2px 0 rgba(0,0,0,.12); }
.m0-chips button.es-activo {
  --c: var(--ds-azul); color: #fff; text-shadow: 0 1px 0 rgba(0,0,0,.4);
  background: radial-gradient(circle, rgba(255,255,255,.34) 1.1px, transparent 1.5px) 0 0 / 5px 5px, var(--c);
}
.m0-boton:disabled { opacity: .5; cursor: default; box-shadow: none; }
.m0-boton.es-peligro { --c: var(--ds-rosa); color: #fff; background: radial-gradient(circle, rgba(255,255,255,.3) 1.1px, transparent 1.5px) 0 0 / 5px 5px, var(--c); }
.m0-boton.es-sutil { background: #fff; }

.m0-pistas-ds {
  position: fixed; z-index: 12; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
  display: flex; gap: 10px; padding: 8px 10px; border-radius: 999px;
  background: linear-gradient(#9aa4af, #6d7682); border: 2px solid var(--borde);
}
.m0-circulo {
  width: 1.3em; height: 1.3em; border-radius: 50%; display: grid; place-items: center;
  background: var(--tinta); color: #fff; font-family: var(--redonda); font-weight: 900; font-size: .8em;
}

/* Ficha: texto | obra | galería, como en el boceto 3. */
.m0-ficha { display: grid; grid-template-columns: minmax(200px, 1fr) minmax(0, 2.1fr) 104px; gap: 28px; align-items: start; }
/* Sin esto, una celda de la rejilla no encoge por debajo del ancho de la foto
   (1600 px) y empuja la galería fuera de la pantalla. */
.m0-ficha > * { min-width: 0; }
.m0-ficha .m0-titulo { font-size: clamp(2rem, 4.2vw, 3.4rem); overflow-wrap: anywhere; hyphens: auto; }
/* una pieza en vídeo: el reproductor ocupa el sitio de la obra */
.m0-ficha-obra.es-video { display:flex; align-items:center; justify-content:center; }
.m0-ficha-video { display:block; width:100%; max-height:72vh; background:#111; border-radius:6px;
                  box-shadow:0 10px 30px rgba(0,0,0,.18); }
.m0-ficha-obra {
  background: #fff; border: 2px solid var(--borde); padding: 8px; border-radius: 4px;
  box-shadow: inset 0 0 0 2px #fff, inset 0 0 0 3px #b9bcc3, 0 6px 0 rgba(0,0,0,.12);
  animation: m0-cambio .45s cubic-bezier(.2,1.4,.4,1) both;
}
@keyframes m0-cambio { from { opacity: 0; transform: translateX(30px) scale(.97); } }
.m0-ficha-img { width: 100%; max-height: 72vh; object-fit: contain; display: block; min-height: 320px; }
.m0-ficha-img.es-generada { aspect-ratio: 4 / 5; }
.m0-ficha-galeria { display: flex; flex-direction: column; gap: 12px; }
.m0-ficha-galeria button {
  width: 100%; padding: 4px; background: #fff; border: 2px solid var(--borde); border-radius: 4px; cursor: pointer;
  position: relative;
}
.m0-ficha-galeria button.es-activo { box-shadow: 0 0 0 3px var(--sel); }
.m0-ficha-galeria button.es-activo::before {
  content: "◀"; position: absolute; left: -22px; top: 50%; transform: translateY(-50%); color: var(--ds-verde);
}
.m0-ficha-mini { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.m0-datos { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 0 0 12px; font-size: .98rem; }
.m0-datos dt { font-family: var(--pixel); color: var(--gris); }
.m0-datos dd { margin: 0; font-weight: 700; }
.m0-vecinas { display: flex; justify-content: space-between; gap: 12px; margin-top: 20px; font-family: var(--pixel); font-size: .9rem; }
.m0-vecinas a { text-decoration: none; }
.m0-vecinas a:hover { text-decoration: underline; }
@media (max-width: 1180px) {
  .m0-ficha { grid-template-columns: minmax(200px, 1fr) minmax(0, 2fr); }
  .m0-ficha > :last-child { grid-column: 1 / -1; }
  .m0-ficha-galeria { flex-direction: row; overflow-x: auto; padding: 4px; }
  .m0-ficha-galeria button, .m0-ficha-galeria .m0-e { width: 96px; flex: none; }
  .m0-ficha-galeria button.es-activo::before { display: none; }
}
@media (max-width: 900px) {
  .m0-ficha { grid-template-columns: 1fr; }
  .m0-ficha-obra { order: -1; }
  .m0-ficha-galeria { flex-direction: row; overflow-x: auto; }
  .m0-ficha-galeria button { width: 90px; flex: none; }
  .m0-ficha-galeria button.es-activo::before { display: none; }
}

.m0-contacto { font-size: clamp(1.2rem, 2.6vw, 1.7rem); font-weight: 800; line-height: 1.35; }
.m0-contacto p { margin: 0 0 10px; }
.m0-contacto a { color: var(--ds-azul); }

/* Diálogo: oscuro, rayado, con el borde naranja doble. */
.m0-caja-vidrio {
  max-width: 460px; margin: 0 auto; padding: 26px 26px 22px; border-radius: 12px; color: #fff;
  background: repeating-linear-gradient(#34353a 0 3px, #2a2b2f 3px 5px);
  border: 3px solid var(--ds-naranja); box-shadow: 0 0 0 3px #7a3a00, 0 0 0 5px #111, 0 18px 40px rgba(0,0,0,.35);
}
.m0-caja-vidrio .m0-titulo { color: #fff; text-shadow: none; font-size: 2.4rem; }
.m0-caja-vidrio .m0-etiqueta { color: #f7b267; }
.m0-caja-vidrio a { color: #ffd08a; }

/* ----------------------------------------------------------- formularios */

.m0-form { display: flex; flex-direction: column; gap: 12px; }
.m0-campo { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.m0-campo > span { font-family: var(--pixel); font-size: .85rem; opacity: .85; }
.m0-campo input:not([type=checkbox]):not([type=range]):not([type=color]):not([type=file]),
.m0-campo textarea, .m0-campo select {
  font: inherit; font-size: 1rem; padding: 8px 10px; border-radius: 4px; color: var(--tinta);
  background: #fff; border: 2px solid var(--borde); box-shadow: inset 0 2px 0 #d5d8dd;
}
.m0-campo input:focus, .m0-campo textarea:focus, .m0-campo select:focus { outline: 3px solid var(--sel); outline-offset: 1px; }
.m0-campo input[type=range] { accent-color: var(--ds-verde); }
.m0-check { font-family: var(--pixel); display: flex; gap: 8px; align-items: center; }
.m0-dos { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .m0-dos { grid-template-columns: 1fr; } }
.m0-nota { font-size: .9rem; opacity: .8; margin: 4px 0 0; line-height: 1.45; }
.m0-error {
  margin: 0; padding: 8px 12px; border-radius: 8px; color: #fff; font-family: var(--pixel);
  background: radial-gradient(circle, rgba(255,255,255,.25) 1.1px, transparent 1.5px) 0 0 / 5px 5px, var(--ds-rosa);
}
.m0-aviso {
  margin: 0; padding: 10px 14px; border-radius: 10px; color: #fff; font-family: var(--pixel);
  background: repeating-linear-gradient(#34353a 0 3px, #2a2b2f 3px 5px); border: 3px solid var(--ds-naranja);
}
.m0-acciones { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 6px; }
.m0-acciones.es-fija {
  position: sticky; bottom: 0; padding: 12px 0; background: linear-gradient(transparent, var(--papel) 30%);
}
.m0-imagen-campo { display: flex; flex-direction: column; gap: 6px; }
.m0-imagen-campo img { max-height: 140px; width: auto; align-self: flex-start; border: 2px solid var(--borde); }

/* ----------------------------------------------------------------- panel */

.m0-panel { min-height: 100vh; padding: calc(var(--barra-h) + 20px) 20px 60px; background: var(--papel);
  background-image: linear-gradient(var(--linea) 1px, transparent 1px), linear-gradient(90deg, var(--linea) 1px, transparent 1px);
  background-size: 22px 22px; }
.m0-panel.es-con-vista-previa { background: transparent; }
.m0-pestanas { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.m0-pestanas a {
  --c: var(--ds-azul); color: #fff; text-decoration: none; font-family: var(--pixel); font-size: 1rem;
  padding: 12px 18px; border-radius: 4px; border: 2px solid var(--borde); text-shadow: 0 1px 0 rgba(0,0,0,.5);
  background: radial-gradient(circle, rgba(255,255,255,.3) 1.1px, transparent 1.5px) 0 0 / 5px 5px, var(--c);
  box-shadow: 0 3px 0 rgba(0,0,0,.2);
}
.m0-pestanas a:nth-child(2) { --c: var(--ds-verde); }
.m0-pestanas a:nth-child(3) { --c: var(--ds-rosa); }
.m0-pestanas a:nth-child(4) { --c: var(--ds-amarillo); }
.m0-pestanas a:nth-child(5) { --c: var(--ds-naranja); }
.m0-pestanas a:last-child { --c: var(--ds-oscuro); margin-left: auto; }
.m0-pestanas a { display: inline-flex; align-items: center; gap: 8px; }
.m0-icono { display: inline-flex; width: 18px; height: 18px; }
.m0-icono svg { width: 18px; height: 18px; }
.m0-pestanas a.es-activo { outline: 4px solid #fff; box-shadow: 0 0 0 7px var(--borde); }
.m0-panel h2 { font-weight: 900; margin: 18px 0 4px; }
.m0-panel-cols { display: grid; grid-template-columns: 300px 1fr; gap: 22px; align-items: start; }
@media (max-width: 800px) { .m0-panel-cols { grid-template-columns: 1fr; } }
.m0-lista { display: flex; flex-direction: column; gap: 10px; }
.m0-lista ul { list-style: none; margin: 0; padding: 0; border: 2px solid var(--borde); background: #fff; border-radius: 4px; }
.m0-lista li button {
  width: 100%; text-align: left; padding: 10px 12px; border: 0; border-bottom: 1px solid #c3c6cc; cursor: pointer;
  background: repeating-linear-gradient(#fafbfc 0 3px, #eef0f3 3px 5px); font-weight: 700;
}
.m0-lista li button em { font-family: var(--pixel); font-style: normal; font-weight: 400; color: var(--gris); }
.m0-lista li.es-activo button { background: var(--sel); }
.m0-panel .m0-form, .m0-recorrido .m0-form {
  background: #fff; border: 2px solid var(--borde); border-radius: 6px; padding: 18px;
  box-shadow: inset 0 0 0 2px #fff, inset 0 0 0 3px #b9bcc3;
}
.m0-recorrido { max-width: 600px; }
.m0-recorrido .m0-form { max-height: calc(100vh - var(--barra-h) - 110px); overflow: auto; }
@media (max-width: 760px) { .m0-recorrido .m0-form { max-height: none; } .m0-recorrido { padding-bottom: 55vh; } }
.m0-cara { border: 2px solid var(--borde); border-radius: 6px; padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 10px; margin: 0; }
.m0-cara legend { font-weight: 900; padding: 0 6px; display: flex; gap: 10px; align-items: center; }
.m0-cara.es-cubo { background: repeating-linear-gradient(#fafbfc 0 3px, #f0f2f5 3px 5px); }
.m0-subcubo { display: flex; flex-direction: column; gap: 10px; padding-left: 12px; border-left: 4px solid var(--ds-rosa); }
.m0-mini { font-family: var(--pixel); font-size: .75rem; border: 1px solid var(--borde); border-radius: 999px; background: #fff; cursor: pointer; padding: 2px 8px; }
.m0-mini:hover { background: var(--sel); }

/* ------------------------------------------------ entradas de las páginas */

.m0-e { --i: 0; }
.entra-desde-cubo .m0-e { animation: m0-desde .75s cubic-bezier(.2,1.35,.35,1) both; animation-delay: calc(var(--i) * 65ms + 60ms); }
[data-dir=arriba]    { --dx: 0; --dy: -70px; }
[data-dir=abajo]     { --dx: 0; --dy: 70px; }
[data-dir=derecha]   { --dx: 90px; --dy: 0; }
[data-dir=izquierda] { --dx: -90px; --dy: 0; }
@keyframes m0-desde {
  from { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(.92) rotate(calc(var(--dx) / 90px * 2deg)); filter: blur(8px); }
  to { opacity: 1; transform: none; filter: none; }
}
.entra-cascada .m0-e { animation: m0-cascada .6s cubic-bezier(.2,1.3,.4,1) both; animation-delay: calc(var(--i) * 55ms); transform-origin: 50% 0; }
@keyframes m0-cascada { from { opacity: 0; transform: perspective(700px) translateY(-28px) rotateX(-55deg); } }
.entra-voxel .m0-e { animation: m0-voxel .7s steps(7, end) both; animation-delay: calc(var(--i) * 70ms); }
@keyframes m0-voxel {
  0% { opacity: 0; clip-path: inset(0 100% 100% 0); filter: contrast(3) saturate(0); }
  40% { opacity: 1; }
  100% { clip-path: inset(0 0 0 0); filter: none; }
}
.entra-ninguna .m0-e { animation: none; }
@media (prefers-reduced-motion: reduce) { .m0-e, .m0-ballena, .m0-ficha-obra { animation: none !important; } }

/* ------------------------------------------------ carga: tiempos y blanco */

/* 1. La ballena sola, en el centro. 2. Llegan los vóxeles: baja y se va. */
.m0-escenario.es-fase-ballena .m0-carga { bottom: auto; top: 50%; transform: translate(-50%, -50%) scale(1.5); }
.m0-carga { transition: top .7s cubic-bezier(.3,1.3,.5,1), bottom .7s, transform .7s cubic-bezier(.3,1.3,.5,1), opacity .5s; }
.m0-escenario.es-fase-formando .m0-carga,
.m0-escenario.es-fase-implosion .m0-carga { top: auto; bottom: 14vh; transform: translateX(-50%) scale(.8); opacity: .75; }
.m0-escenario.es-fase-implosion .m0-carga { opacity: 0; }

.m0-escenario.es-claro { color: var(--tinta); }
.m0-escenario.es-claro .m0-carga-sub { color: var(--tinta); font-family: var(--redonda); }
.m0-escenario.es-claro .m0-ballena { filter: drop-shadow(0 6px 10px rgba(40,80,160,.18)); }
.m0-escenario.es-claro .m0-saltar { color: var(--gris); }
.m0-sobre-claro .m0-pistas { color: var(--tinta); }
.m0-sobre-claro .m0-letra { color: #fff; }
.m0-barra.es-sobre-papel { background: transparent; border-color: transparent; box-shadow: none; }

.m0-boton-greb { justify-content: center; font-size: 1.05rem; padding: 10px 18px; }
.m0-g {
  width: 1.6em; height: 1.6em; display: grid; place-items: center; border-radius: 50%; color: #fff;
  font-family: var(--redonda); font-weight: 900;
  background: conic-gradient(#ea4335 0 25%, #fbbc05 0 50%, #34a853 0 75%, #4285f4 0);
}
.m0-plegable summary { cursor: pointer; font-family: var(--pixel); opacity: .8; }
.m0-plegable[open] summary { margin-bottom: 10px; }

/* ------------------------------------------------ galería: cuadros en la pared */

.m0-pared {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 56px 40px; margin-top: 34px; perspective: 1400px; align-items: end;
}
.m0-cuadro {
  --rx: 0deg; --ry: 0deg; --lx: 30%; --ly: 20%;
  display: flex; flex-direction: column; align-items: center; gap: 14px; text-decoration: none;
  transform-style: preserve-3d;
}
.m0-lienzo-obra {
  position: relative; width: 100%;
  transform: rotateX(var(--rx)) rotateY(var(--ry)) translateZ(0);
  transition: transform .35s cubic-bezier(.2,1.3,.4,1), box-shadow .35s;
  /* El canto del bastidor y la sombra sobre la pared. */
  box-shadow: 1px 1px 0 #d8d2c8, 2px 2px 0 #cfc8bd, 3px 3px 0 #c6bfb3, 4px 4px 0 #bdb5a9,
              14px 22px 26px rgba(40,34,26,.28), 3px 6px 8px rgba(40,34,26,.18);
}
.m0-cuadro:hover .m0-lienzo-obra {
  transition: transform .08s linear, box-shadow .3s;
  box-shadow: 1px 1px 0 #d8d2c8, 2px 2px 0 #cfc8bd, 3px 3px 0 #c6bfb3, 4px 4px 0 #bdb5a9,
              22px 36px 40px rgba(40,34,26,.32), 4px 8px 10px rgba(40,34,26,.2);
}
.m0-cuadro-img { display: block; width: 100%; height: auto; max-height: 340px; object-fit: contain; background: #eee; }
.m0-cuadro-img.es-generada { aspect-ratio: 1; }
.m0-brillo {
  position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(circle at var(--lx) var(--ly), rgba(255,255,255,.35), transparent 45%);
}
.m0-cuadro:hover .m0-brillo { opacity: 1; }
.m0-cartela {
  display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center;
  padding: 7px 14px 8px; min-width: 60%;
  background: #fbfaf7; border: 1px solid #d9d4ca; box-shadow: 0 2px 4px rgba(0,0,0,.08);
}
.m0-cartela b { font-weight: 800; font-size: 1rem; color: var(--tinta); }
.m0-cartela span { font-family: var(--pixel); font-size: .75rem; color: var(--gris); }
.m0-cuadro:focus-visible .m0-cartela, .m0-cuadro:hover .m0-cartela { outline: 3px solid var(--sel); }

/* ------------------------------------------------ lupa */

.m0-lupa { overflow: hidden; touch-action: none; }
/* Sin zoom no recorta (la hoja que gira y las sombras asoman); con zoom sí. */
.m0-lupa-marco.es-ampliada { overflow: hidden; }
.m0-lupa-contenido { transform-origin: 50% 50%; will-change: transform; }
.m0-lupa-ayuda { margin: 8px 0 0; font-family: var(--pixel); font-size: .75rem; color: var(--gris); text-align: center; }

/* ------------------------------------------------ escritorio */

.m0-categorias { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin-top: 14px; }
.m0-categoria {
  display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 6px;
  background: #fff; border: 2px solid var(--borde); box-shadow: inset 0 0 0 2px #fff, inset 0 0 0 3px #b9bcc3;
  transition: box-shadow .15s, transform .15s;
}
.m0-categoria.es-encima { box-shadow: 0 0 0 4px var(--sel); transform: scale(1.02); }
.m0-categoria.es-nueva { border-style: dashed; justify-content: center; align-items: flex-start; }
.m0-categoria h3 { margin: 0; font-weight: 900; font-size: 1.3rem; }
.m0-categoria-cab { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.m0-cuenta-piezas { margin-left: auto; font-family: var(--pixel); font-size: .8rem; color: var(--gris); }
.m0-categoria-minis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; min-height: 20px; }
.m0-categoria-minis button { padding: 0; border: 1px solid var(--borde); background: #eee; cursor: pointer; aspect-ratio: 1; overflow: hidden; font-size: .6rem; }
.m0-categoria-minis img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* borrar desde el escritorio: una × en cada foto, a la vista al pasar (siempre en pantallas táctiles) */
.m0-mini-pieza { position: relative; aspect-ratio: 1; }
.m0-mini-pieza > button:first-child { width: 100%; height: 100%; }
.m0-categoria-minis .m0-mini-borrar { position: absolute; top: 2px; right: 2px; width: 22px; height: 22px; aspect-ratio: auto;
  display: grid; place-items: center; border-radius: 50%; border: 0; background: rgba(0,0,0,.72); color: #fff;
  font-size: 15px; line-height: 1; opacity: 0; transition: opacity .15s; }
.m0-mini-pieza:hover .m0-mini-borrar, .m0-mini-borrar:focus-visible { opacity: 1; }
.m0-categoria-minis .m0-mini-borrar:hover { background: #c0392b; }
@media (hover: none) { .m0-categoria-minis .m0-mini-borrar { opacity: 1; } }
.m0-categoria-borrar { margin-left: auto; padding: 2px 8px; font: inherit; font-size: .75rem; cursor: pointer;
  background: none; border: 1px solid var(--borde); border-radius: 6px; color: inherit; opacity: .7; }
.m0-categoria-borrar:hover { opacity: 1; border-color: #c0392b; color: #c0392b; }
.m0-ver-todas { align-self: flex-start; }
.m0-categoria label.m0-boton { align-self: flex-start; }

/* ------------------------------------------------ barra greb: scrollbar */

#m0-omnibar-mount * { scrollbar-width: thin; scrollbar-color: #1c1815 transparent; }
#m0-omnibar-mount *::-webkit-scrollbar { width: 10px; height: 10px; }
#m0-omnibar-mount *::-webkit-scrollbar-track { background: transparent; }
#m0-omnibar-mount *::-webkit-scrollbar-thumb {
  background: #1c1815; border-radius: 10px; border: 3px solid transparent; background-clip: padding-box;
}
#m0-omnibar-mount *::-webkit-scrollbar-thumb:hover { background-color: #b4573a; }

/* ------------------------------------------------ libro 3D */

.m0-ficha.es-libro { grid-template-columns: minmax(200px, 0.8fr) minmax(0, 3fr); }
.m0-libro-escena {
  padding: 40px 0 10px; cursor: pointer; user-select: none; touch-action: none;
  animation: m0-flotar 5s ease-in-out infinite;
}
.m0-libro-perspectiva { perspective: 2200px; }
@keyframes m0-flotar { 50% { transform: translateY(-10px); } }
.m0-libro {
  position: relative; width: 50%; aspect-ratio: 1; margin-left: 50%;
  transform-style: preserve-3d; transition: transform .7s cubic-bezier(.3,1.2,.4,1);
}
.m0-hoja {
  position: absolute; inset: 0; transform-origin: 0 50%; transform-style: preserve-3d;
  transition: transform .9s cubic-bezier(.45,.05,.2,1);
}
.m0-hoja.es-pasada { transform: rotateY(-180deg); }
.m0-cara-hoja {
  position: absolute; inset: 0; backface-visibility: hidden; overflow: hidden;
  background: #fff;
}
/* Una sola sombra bajo lo que se ve del libro: con una por hoja, las 27
   apiladas se sumaban en un halo oscuro y con bandas. */
.m0-libro::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: -100%; right: 0;
  border-radius: 8px; background: #fff; transform: translateZ(-2px);
  box-shadow: 0 22px 44px -8px rgba(20,24,40,.28), 0 4px 10px rgba(20,24,40,.10);
  transition: left .9s cubic-bezier(.45,.05,.2,1), right .9s cubic-bezier(.45,.05,.2,1);
}
.m0-libro.es-cerrado::before { left: 0; }
.m0-libro.es-final::before { right: 100%; }
.m0-cara-hoja img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
/* Un pliego (2:1) repartido en dos páginas cuadradas. */
.m0-cara-hoja img.es-mitad-izq, .m0-cara-hoja img.es-mitad-der { width: 200%; max-width: none; object-fit: fill; }
.m0-cara-hoja img.es-mitad-der { transform: translateX(-50%); }
.m0-cara-hoja.es-frente { border-radius: 2px 8px 8px 2px; }
.m0-cara-hoja.es-dorso { transform: rotateY(180deg); border-radius: 8px 2px 2px 8px; }
/* Sombra del lomo sobre cada página. */
.m0-cara-hoja.es-frente::after, .m0-cara-hoja.es-dorso::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(0,0,0,.18), transparent 8%);
}
.m0-cara-hoja.es-dorso::after { background: linear-gradient(270deg, rgba(0,0,0,.18), transparent 8%); }
.m0-libro-pie { text-align: center; font-family: var(--pixel); color: var(--gris); margin-top: 72px; }
@media (max-width: 900px) { .m0-ficha.es-libro { grid-template-columns: 1fr; } }
/* La regla de la galería (última columna a lo ancho) no aplica al libro. */
.m0-ficha.es-libro > :last-child { grid-column: auto; }
.m0-ficha.es-libro { align-items: center; }
@media (max-width: 900px) { .m0-ficha.es-libro > :last-child { grid-column: 1 / -1; } }
.m0-libro-escena { padding-top: 10px; }
.m0-libro { width: 48%; margin-left: 50%; }

/* ------------------------------------------------ canal (nav incrustado) */

.m0-canal-marco {
  position: relative; width: 100%; aspect-ratio: 16 / 10; min-height: 420px;
  border-radius: 14px; overflow: hidden; background: #0f1115;
  box-shadow: 0 0 0 3px rgba(20,24,40,.12), 0 22px 44px -12px rgba(20,24,40,.35);
}
.m0-canal-marco iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
@media (max-width: 760px) { .m0-canal-marco { aspect-ratio: auto; height: 70vh; min-height: 0; } }
/* /canal: nav maximizado bajo la barra */
.m0-canal-pleno {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 5;
  top: calc(var(--barra-h) + env(safe-area-inset-top, 0px));
  background: #eef0f2;
}
.m0-canal-pleno.sin-barra { top: 0; }
.m0-canal-pleno .m0-canal-marco {
  position: absolute; inset: 0; width: auto; height: auto; min-height: 0; aspect-ratio: auto;
  border-radius: 0; box-shadow: none; background: #eef0f2;
}
.m0-canal-items ol { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.m0-canal-items li { display: grid; grid-template-columns: 52px minmax(0, 1fr) minmax(0, 1.4fr) auto auto auto; gap: 6px; align-items: center; }
.m0-canal-items li.es-invalido input { border-color: #c0392b; }
@media (max-width: 800px) { .m0-canal-items li { grid-template-columns: 52px 1fr auto auto auto; } .m0-canal-items li > input:nth-of-type(2) { grid-column: 1 / -1; } }

/* Un admin viendo el sitio como otra cuenta ((user fernando)): siempre a la
   vista, con la vuelta a mano. */
.m0-viendo-como { position:fixed; left:50%; bottom:14px; transform:translateX(-50%); z-index:2147483000;
                  display:flex; align-items:center; gap:10px; padding:6px 8px 6px 14px; border-radius:999px;
                  background:#1f9d48; color:#fff; font:13px/1.2 system-ui, sans-serif;
                  box-shadow:0 6px 20px rgba(0,0,0,.25); max-width:calc(100vw - 24px); }
.m0-viendo-como span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.m0-viendo-como button { flex:none; border:0; border-radius:999px; padding:5px 12px; cursor:pointer;
                         background:#fff; color:#146b31; font:inherit; font-weight:600; }

/* a piece full screen (double tap on a phone): the work alone, centred on black */
.m0-ficha-obra:fullscreen { display:flex; align-items:center; justify-content:center; background:#000;
                           padding:0; margin:0; border:0; box-shadow:none; }
.m0-ficha-obra:fullscreen .m0-lupa-ayuda { display:none; }
.m0-ficha-obra:fullscreen .m0-lupa { width:100vw; height:100vh; display:flex; align-items:center; justify-content:center; }
.m0-ficha-obra:fullscreen img { width:100vw; height:100vh; max-width:none; max-height:none; object-fit:contain; }

/* Las fotos de una pieza (m0.fotos): flechas en la ficha, la tira del editor,
   el aviso de cuántas hay en las tarjetas, y la ventana del escritorio. */
.m0-ficha-obra { position: relative; }
.m0-ficha-flecha { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 40px; height: 56px; border: 2px solid var(--borde); border-radius: 6px; cursor: pointer;
  background: rgba(255,255,255,.88); font-size: 2rem; line-height: 1; color: inherit; opacity: .75; }
.m0-ficha-flecha:hover, .m0-ficha-flecha:focus-visible { opacity: 1; background: var(--sel); }
.m0-ficha-flecha.es-ant { left: 14px; }
.m0-ficha-flecha.es-sig { right: 14px; }
.m0-ficha-cuenta { position: absolute; right: 16px; bottom: 16px; z-index: 2; padding: 2px 8px; border-radius: 999px;
  background: rgba(0,0,0,.7); color: #fff; font-family: var(--pixel); font-size: .8rem; }
.m0-ficha-editar { margin-top: 18px; display: flex; flex-direction: column; gap: 10px; }

.m0-fotos { display: flex; flex-direction: column; gap: 8px; padding: 8px; border: 2px dashed transparent; border-radius: 6px; }
.m0-fotos.es-encima { border-color: var(--sel); background: rgba(126,224,106,.08); }
.m0-fotos-tira { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
.m0-foto { display: flex; flex-direction: column; gap: 4px; }
.m0-foto-img { position: relative; padding: 0; aspect-ratio: 1; border: 2px solid var(--borde); border-radius: 4px;
  background: #eee; cursor: pointer; overflow: hidden; }
.m0-foto-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.m0-foto.es-principal .m0-foto-img { border-color: var(--ds-verde, #1f9d48); }
.m0-foto.es-actual .m0-foto-img { box-shadow: 0 0 0 3px var(--sel); }
.m0-foto-sello { position: absolute; left: 4px; top: 4px; padding: 1px 5px; border-radius: 3px;
  background: var(--ds-verde, #1f9d48); color: #fff; font-size: .62rem; font-family: var(--pixel); }
.m0-foto-ops { display: flex; gap: 2px; }
.m0-foto-ops button { flex: 1; padding: 2px 0; font: inherit; font-size: .8rem; cursor: pointer; border: 1px solid var(--borde);
  border-radius: 3px; background: #fff; }
.m0-foto-ops button:disabled { opacity: .35; cursor: default; }
.m0-foto-ops button.es-peligro:hover { background: #c0392b; color: #fff; }
.m0-foto.es-nueva { aspect-ratio: 1; }
.m0-foto-anadir { display: grid; place-items: center; height: 100%; min-height: 96px; border: 2px dashed var(--borde);
  border-radius: 4px; cursor: pointer; text-align: center; font-size: .8rem; padding: 6px; }
.m0-foto-anadir:hover { background: var(--sel); }
.m0-fotos-url { display: flex; gap: 6px; }
.m0-fotos-url input { flex: 1; min-width: 0; font: inherit; padding: 4px 6px; border: 1px solid var(--borde); border-radius: 4px; }

.m0-cuadro-fotos { position: absolute; right: 8px; bottom: 8px; z-index: 2; padding: 1px 7px; border-radius: 999px;
  background: rgba(0,0,0,.7); color: #fff; font-family: var(--pixel); font-size: .72rem; pointer-events: none; }
.m0-mini-cuenta { position: absolute; left: 3px; bottom: 3px; padding: 0 5px; border-radius: 999px;
  background: rgba(0,0,0,.72); color: #fff; font-size: .62rem; line-height: 1.5; pointer-events: none; }
.m0-mini-pieza > button:first-child { position: relative; }

.m0-modal { position: fixed; inset: 0; z-index: 5000; display: grid; place-items: center; padding: 16px;
  background: rgba(0,0,0,.45); }
.m0-modal-caja { width: min(760px, 100%); max-height: calc(100dvh - 32px); overflow: auto; background: #fff;
  border: 2px solid var(--borde); border-radius: 8px; box-shadow: 0 16px 40px rgba(0,0,0,.25); padding: 12px 14px; }
.m0-modal-cab { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.m0-modal-cab h3 { margin: 0 auto 0 0; font-weight: 900; }

/* Subir (m0.subida): el botón propio, las vistas previas y el interruptor */
.m0-elegir { display: inline-flex; }
.m0-elegir-icono { font-weight: 900; }
.m0-foto.es-nueva .m0-elegir { display: block; height: 100%; }
.m0-foto.es-nueva .m0-foto-anadir { width: 100%; font: inherit; font-size: .8rem; background: #fff; color: inherit; }
.m0-comprimir { font-size: .85rem; }
.m0-previas { display: flex; flex-direction: column; gap: 6px; padding: 8px; border: 1px solid var(--borde);
  border-radius: 6px; background: #fafafa; }
.m0-previas-cab { display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-family: var(--pixel); font-size: .8rem; }
.m0-previas-lista { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); max-height: 260px; overflow: auto; }
.m0-previa { display: flex; flex-direction: column; gap: 2px; font-size: .72rem; min-width: 0; }
.m0-previa img, .m0-previa-tipo { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 4px;
  border: 2px solid var(--borde); background: #eee; display: grid; place-items: center; font-size: 1.6rem; }
.m0-previa.es-optimizando img, .m0-previa.es-subiendo img { opacity: .55; animation: m0-latir 1s ease-in-out infinite alternate; }
@keyframes m0-latir { to { opacity: .9; } }
.m0-previa.es-lista img { border-color: var(--ds-verde, #1f9d48); }
.m0-previa.es-error img, .m0-previa.es-error .m0-previa-tipo { border-color: #c0392b; }
.m0-previa-nombre { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.m0-previa-estado { color: var(--gris, #666); }
.m0-previa.es-error .m0-previa-estado { color: #c0392b; }
.m0-previa.es-lista .m0-previa-estado { color: var(--ds-verde, #1f9d48); }
@media (prefers-reduced-motion: reduce) { .m0-previa img { animation: none !important; } }
.m0-categoria-net { margin-left: auto; padding: 2px 8px; font: inherit; font-size: .75rem; cursor: pointer;
  background: none; border: 1px solid var(--borde); border-radius: 6px; color: inherit; }
.m0-categoria-net + .m0-categoria-borrar { margin-left: 0; }
.m0-categoria-net:hover { background: var(--sel); }

/* El blog: las notas de NETpad que el estudio publica (m0.blog) */
.m0-blog-lista { list-style: none; margin: 0; padding: 0; max-width: 70ch; }
.m0-blog-lista li { border-top: 1px solid var(--linea); }
.m0-blog-lista li:last-child { border-bottom: 1px solid var(--linea); }
.m0-blog-item { display: flex; flex-direction: column; gap: 4px; padding: 16px 4px; color: var(--tinta); text-decoration: none; }
.m0-blog-item b { font-size: clamp(1.2rem, 2.6vw, 1.6rem); font-weight: 900; line-height: 1.15; }
.m0-blog-item span:last-child { color: #3d3f46; line-height: 1.5; }
.m0-blog-item:hover b, .m0-blog-item:focus-visible b { color: var(--ds-azul); }
.m0-blog-fecha { font-family: var(--pixel); font-size: .9rem; color: var(--gris); margin: 0 0 18px; }
.m0-blog-item .m0-blog-fecha { margin: 0; }
.m0-blog-texto { max-width: 66ch; font-size: 1.1rem; line-height: 1.65; color: #2e3036; overflow-wrap: anywhere; }
.m0-blog-texto p, .m0-blog-texto ul { margin: 0 0 1em; }
.m0-blog-texto h2, .m0-blog-texto h3 { margin: 1.4em 0 .5em; font-weight: 900; line-height: 1.15; color: var(--tinta); }
.m0-blog-texto blockquote { margin: 0 0 1em; padding: 2px 0 2px 16px; border-left: 4px solid var(--sel); color: var(--gris); }
.m0-blog-texto a { color: var(--ds-azul); }

/* ------------------------------------------------ NET: el lector */

.ned-lector-cuerpo { height: calc(100% - 22px); overflow: hidden; background: #f4f1ea; display: flex; align-items: center; justify-content: center; }
.ned-lector-cuerpo .m0-libro-escena { width: 100%; padding: 20px 24px 0; }
.ned-lector-cuerpo .m0-libro { width: 46%; margin-left: 50%; }
.ned-lector-cuerpo .m0-libro-pie { margin-top: 36px; font-size: 11px; }
