/* La web del mural · mobile first. Marca medida de usfq.edu.ec:
   rojo #dc2323, azul #003ecc, gris #232429; Zalando Sans Expanded y Lato. Nada en oscuro. */
:root {
  --rojo: #dc2323; --rojo-claro: #fce9e9; --azul: #003ecc; --azul-claro: #f5f8ff; --azul-borde: #ccdbff;
  --gris: #232429; --g050: #f3f4f9; --g100: #dedfe4; --g300: #c1c2c7; --g500: #919297; --g700: #55565b;
  --zf: 'Zalando Sans Expanded', 'Helvetica Neue', Arial, sans-serif; --lato: 'Lato', 'Helvetica Neue', Arial, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body { background: #fff; color: var(--gris); font-family: var(--lato); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; }
.app { max-width: 480px; margin: 0 auto; min-height: 100svh; position: relative; }
.pantalla { min-height: 100svh; display: flex; flex-direction: column; padding-bottom: env(safe-area-inset-bottom); }
@media (min-width: 560px) {
  body { background: var(--g050); }
  .app { background: #fff; box-shadow: 0 0 0 1px var(--g100); }
}

.cab { display: flex; justify-content: space-between; align-items: center; padding: max(16px, env(safe-area-inset-top)) 20px 6px; gap: 12px; }
.ceja { font-family: var(--zf); font-size: 10px; font-weight: 700; letter-spacing: .16em; color: var(--rojo); }
.atras { font-size: 24px; line-height: 1; text-decoration: none; padding: 6px 10px 6px 0; }
.idi { display: inline-flex; border: 1.2px solid var(--g100); border-radius: 99px; padding: 2px; font-family: var(--zf); font-size: 10px; font-weight: 700; }
.idi button { padding: 5px 10px; border-radius: 99px; color: var(--g500); }
.idi button.on { background: var(--azul); color: #fff; }

/* ── El mural ── */
.mural { padding: 8px 0 0; }
.mural-t { display: flex; justify-content: space-between; align-items: baseline; padding: 0 20px 10px; }
.mural-t h2 { font-family: var(--zf); font-weight: 800; font-size: 26px; letter-spacing: -.02em; }
.mural-t span { font-size: 12px; color: var(--g500); }
.muro { overflow-x: auto; overflow-y: hidden; padding: 0 20px 6px; scroll-padding: 20px; scrollbar-width: none; overscroll-behavior-x: contain; }
.muro::-webkit-scrollbar { display: none; }
.lienzo { position: relative; height: clamp(190px, 52vw, 250px); width: calc(clamp(190px, 52vw, 250px) * var(--p)); border-radius: 14px; overflow: hidden; background: var(--g050); border: 1px solid var(--g100); }
.muro-foto { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.muro-vacio { position: absolute; inset: 0;
  background-image: repeating-linear-gradient(0deg, rgba(35,36,41,.06) 0 1px, transparent 1px 44px), repeating-linear-gradient(90deg, rgba(35,36,41,.06) 0 1px, transparent 1px 44px); }
.pin { position: absolute; transform: translate(-50%, -50%); min-width: 36px; height: 36px; padding: 0 6px; border-radius: 99px; background: #fff; border: 2px solid var(--gris); font-family: var(--zf); font-weight: 800; font-size: 13px; color: var(--gris); box-shadow: 0 2px 0 rgba(35,36,41,.18); transition: transform .15s, background .15s; }
.pin.on { background: var(--rojo); border-color: #fff; color: #fff; transform: translate(-50%, -50%) scale(1.3); outline: 6px solid rgba(220,35,35,.25); z-index: 2; }

/* ── El teclado ── */
.teclado { padding: 18px 20px 8px; }
.t-p { font-family: var(--zf); font-weight: 800; font-size: 19px; line-height: 1.2; }
.t-pant { margin-top: 12px; height: 84px; border-radius: 18px; background: var(--azul-claro); border: 1.5px solid var(--azul-borde); color: var(--azul); display: flex; align-items: center; justify-content: center; font-family: var(--zf); font-weight: 800; font-size: 58px; letter-spacing: .04em; line-height: 1; }
.t-pant .cur { width: 3px; height: 48px; background: var(--rojo); margin-left: 4px; animation: parpadeo 1s steps(1) infinite; }
@keyframes parpadeo { 50% { opacity: 0; } }
.t-pant.mal { border-color: var(--rojo); animation: temblor .35s; }
@keyframes temblor { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.t-quien { min-height: 22px; margin-top: 8px; text-align: center; font-weight: 700; font-size: 14px; }
.t-quien.mal { color: var(--rojo); font-weight: 400; font-size: 13px; }
.t-tec { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 8px; }
.t-tec button { height: 56px; border-radius: 16px; background: var(--g050); font-family: var(--zf); font-size: 22px; font-weight: 700; color: var(--gris); transition: transform .08s, background .15s; touch-action: manipulation; }
.t-tec button:active { transform: scale(.94); background: var(--g100); }
.t-tec button.ir { background: var(--rojo); color: #fff; }
.t-tec button.bor { background: transparent; color: var(--g700); font-size: 20px; }
.t-o { display: block; width: fit-content; margin: 16px auto 0; font-size: 13px; color: var(--azul); text-underline-offset: 3px; }

/* ── La hoja (al tocar un número del mural) ── */
.velo { position: fixed; inset: 0; background: rgba(35,36,41,.25); z-index: 10; animation: aparece .2s; }
@keyframes aparece { from { opacity: 0; } }
.hoja { position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); width: 100%; max-width: 480px; background: #fff; border-radius: 26px 26px 0 0; padding: 12px 22px calc(24px + env(safe-area-inset-bottom)); z-index: 11; animation: sube .25s ease-out; }
@keyframes sube { from { transform: translate(-50%, 100%); } }
.asa { display: block; width: 40px; height: 5px; border-radius: 3px; background: var(--g100); margin: 0 auto 16px; }
.hoja-f { display: grid; grid-template-columns: 76px 1fr 28px; gap: 14px; align-items: center; }
.hoja-f .ret { width: 76px; height: 76px; border-radius: 50%; overflow: hidden; }
.hoja-f span { font-family: var(--zf); font-weight: 800; color: var(--rojo); font-size: 12px; }
.hoja-f b { display: block; font-size: 17px; line-height: 1.15; margin-top: 2px; }
.hoja-f em { display: block; font-style: normal; font-size: 12.5px; color: var(--g500); margin-top: 3px; }
.cerrar { font-size: 24px; color: var(--g500); align-self: start; }
.boton { display: block; margin-top: 18px; text-align: center; text-decoration: none; font-family: var(--zf); font-weight: 700; font-size: 14px; padding: 15px; border-radius: 15px; color: #fff; background: var(--azul); }

/* ── La ficha ── */
.foto { display: block; width: 100%; height: 100%; object-fit: cover; }
.banda { position: relative; background: var(--rojo); color: #fff; padding: max(14px, env(safe-area-inset-top)) 20px 0; height: 206px; flex: none; }
.banda-fila { display: flex; justify-content: space-between; align-items: flex-start; }
.banda .atras { color: #fff; }
.num { font-family: var(--zf); font-weight: 800; font-size: 96px; line-height: .85; color: transparent; -webkit-text-stroke: 2px #fff; letter-spacing: -.03em; }
.ret.grande { position: absolute; left: 20px; bottom: -66px; width: 132px; height: 132px; border-radius: 50%; overflow: hidden; border: 5px solid #fff; background: #e5edff; }
.ficha-c { padding: 80px 20px 8px; flex: 1; }
.ficha-c h1 { font-family: var(--zf); font-weight: 800; font-size: 24px; line-height: 1.1; letter-spacing: -.01em; }
.car { font-size: 13.5px; color: var(--g700); margin-top: 6px; }
.dat { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.dat div { background: var(--azul-claro); border-radius: 14px; padding: 11px 14px; }
.dat b { display: block; font-family: var(--zf); font-size: 22px; color: var(--azul); font-weight: 800; line-height: 1.1; }
.dat span { font-size: 11px; color: var(--g500); }
.ficha-c h3 { font-family: var(--zf); font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--azul); margin: 24px 0 8px; }
.texto { font-size: 15px; line-height: 1.6; color: #393a3f; }
.vid { display: grid; grid-template-columns: 48px 1fr; gap: 12px; align-items: center; margin-top: 22px; padding: 11px 13px; border-radius: 16px; background: var(--azul-claro); width: 100%; text-align: left; }
.vid-play { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--azul); }
.vid-play i { width: 0; height: 0; border-left: 14px solid #fff; border-top: 9px solid transparent; border-bottom: 9px solid transparent; margin-left: 4px; }
.vid b { display: block; font-family: var(--zf); font-weight: 800; font-size: 14px; }
.vid em { display: block; font-style: normal; font-size: 12px; color: var(--g500); margin-top: 2px; }
.vid-marco { margin-top: 22px; position: relative; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: #000; }
.vid-marco iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.nota { display: flex; justify-content: space-between; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--g100); font-size: 14px; font-weight: 700; text-decoration: none; }
.nota i { font-style: normal; color: var(--g500); }
.pie { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 28px; }
.b { text-align: center; border: 1.5px solid var(--azul); color: var(--azul); border-radius: 14px; padding: 13px 0; font-family: var(--zf); font-weight: 700; font-size: 12.5px; }
.b.lleno { background: var(--rojo); border-color: var(--rojo); color: #fff; }

/* ── Buscar ── */
.bus { margin: 8px 20px 0; display: flex; align-items: center; gap: 10px; background: var(--g050); border-radius: 12px; padding: 12px 14px; }
.bus svg { width: 18px; height: 18px; flex: none; }
.bus input { border: 0; background: none; outline: none; width: 100%; font-size: 16px; font-family: var(--lato); }
.lista { padding: 6px 20px 24px; }
.item { display: grid; grid-template-columns: 56px 1fr 12px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--g100); text-decoration: none; }
.item > span { font-family: var(--zf); font-weight: 800; font-size: 22px; color: var(--rojo); letter-spacing: -.02em; }
.item b { display: block; font-size: 15px; line-height: 1.2; }
.item em { display: block; font-style: normal; font-size: 12px; color: var(--g500); margin-top: 2px; }
.item i { font-style: normal; color: var(--g500); font-size: 18px; }
.vacio { color: var(--g500); font-size: 14px; padding: 20px 0; }

/* ── Cargando, firma y aviso ── */
.cargando { align-items: center; justify-content: center; gap: 14px; text-align: center; padding: 24px; }
.cargando p { color: var(--g700); }
.cargando .b { padding: 12px 22px; }
.firma { display: flex; justify-content: space-between; align-items: center; padding: 24px 20px calc(20px + env(safe-area-inset-bottom)); margin-top: auto; font-size: 11px; color: var(--g500); }
.firma a { display: flex; align-items: center; gap: 6px; text-decoration: none; }
.firma img { height: 9px; width: auto; display: block; }
.toast { position: fixed; left: 50%; bottom: calc(28px + env(safe-area-inset-bottom)); transform: translate(-50%, 12px); background: var(--gris); color: #fff; font-family: var(--zf); font-size: 12px; font-weight: 700; padding: 10px 16px; border-radius: 99px; opacity: 0; transition: .3s; pointer-events: none; z-index: 30; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
:focus-visible { outline: 2.5px solid var(--azul); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* ── Los dos íconos de abajo: Mural y Número (1/12) ── */
.inicio, .numero { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
.tabs-abajo { position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); width: 100%; max-width: 480px; display: grid; grid-template-columns: 1fr 1fr; background: #fff; border-top: 1px solid var(--g100); padding: 8px 0 calc(8px + env(safe-area-inset-bottom)); z-index: 5; }
.tabs-abajo a { display: flex; flex-direction: column; align-items: center; gap: 3px; text-decoration: none; color: var(--g500); font-family: var(--zf); font-size: 10.5px; font-weight: 700; letter-spacing: .02em; padding: 4px 0; }
.tabs-abajo svg { width: 24px; height: 24px; }
.tabs-abajo a.on { color: var(--rojo); }

/* ── Número: buscador y filtros ── */
.titulo { font-family: var(--zf); font-weight: 800; font-size: 26px; letter-spacing: -.02em; padding: 8px 20px 4px; }
.filtros { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 10px 20px 0; }
.filtro { position: relative; display: flex; flex-direction: column; border: 1.4px solid var(--g100); border-radius: 12px; padding: 7px 34px 8px 12px; background: #fff; }
.filtro::after { content: ''; position: absolute; right: 14px; top: 50%; width: 7px; height: 7px; border-right: 2px solid var(--g500); border-bottom: 2px solid var(--g500); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.filtro span { font-size: 10.5px; font-weight: 700; color: var(--g500); }
.filtro select { appearance: none; -webkit-appearance: none; border: 0; background: none; font: 700 14px var(--lato); color: var(--gris); outline: none; width: 100%; padding: 1px 0 0; cursor: pointer; text-overflow: ellipsis; }
.filtro select::after { content: none; }
.filtro.on { border-color: var(--rojo); }
.filtro.on span { color: var(--rojo); }
.lista-cab { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px 0; font-size: 12px; color: var(--g500); min-height: 34px; }
.limpiar { font-size: 12px; font-weight: 700; color: var(--azul); text-decoration: underline; text-underline-offset: 3px; }
.numero .lista { padding-top: 0; }
.t-tec button { height: 52px; }
.t-pant { height: 76px; }

/* ── Tres íconos (1/12): Buscar · Mural (centro, inicio) · Número ── */
.numero-p, .buscar { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
.tabs-abajo { grid-template-columns: 1fr 1fr 1fr; align-items: end; }
.tabs-abajo a.centro svg { width: 28px; height: 28px; }
.tabs-abajo a.centro { position: relative; }
.tabs-abajo a.centro::before { content: ''; position: absolute; top: -2px; width: 54px; height: 34px; border-radius: 99px; background: transparent; z-index: -1; transition: background .2s; }
.tabs-abajo a.centro.on::before { background: var(--rojo-claro); }
/* El mural, grande */
.inicio .mural { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.mural-t h1 { font-family: var(--zf); font-weight: 800; font-size: 28px; letter-spacing: -.02em; }
.inicio .lienzo { --h: min(44svh, 400px); height: var(--h); width: calc(var(--h) * var(--p)); }
.inicio .pin { min-width: 40px; height: 40px; font-size: 14px; }
.mural-pie { text-align: center; font-size: 12px; color: var(--g500); margin-top: 10px; }
.inicio .firma { margin-top: 0; }
/* El teclado, solo */
.numero-p .teclado { flex: 1; display: flex; flex-direction: column; justify-content: center; padding-top: 8px; }
.numero-p .t-p { font-size: 22px; }
.numero-p .t-pant { height: 92px; font-size: 64px; }
.numero-p .t-tec button { height: 60px; }

/* ── Sin zoom y sin desplazarse hacia abajo (1/12, JIS) ──
   Cada pantalla mide justo lo que la pantalla del celular. Lo único que se desliza por dentro:
   el mural (de lado), la lista de Buscar y el texto de una ficha larga. */
html, body { height: 100%; overflow: hidden; overscroll-behavior: none; touch-action: pan-x pan-y; }
body { position: fixed; inset: 0; }
button, a, input, select { touch-action: manipulation; }
.app { height: 100%; min-height: 0; overflow: hidden; }
.pantalla { height: 100%; min-height: 0; overflow: hidden; }
.ficha { overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.inicio, .numero-p, .buscar { padding-bottom: calc(70px + env(safe-area-inset-bottom)); }
/* Mural: todo cabe */
.inicio .cab { flex: none; }
.inicio .mural { flex: 1; min-height: 0; padding: 0; }
.inicio .lienzo { --h: min(46svh, 420px, calc(100svh - 300px)); }
.inicio .firma { flex: none; padding: 6px 20px 8px; }
/* Número: el teclado se ajusta al alto del celular */
.numero-p .cab { flex: none; }
.numero-p .teclado { min-height: 0; padding-bottom: 6px; }
.numero-p .t-p { font-size: clamp(18px, 2.8svh, 22px); }
.numero-p .t-pant { height: clamp(64px, 11svh, 92px); font-size: clamp(46px, 7.6svh, 64px); margin-top: clamp(8px, 1.6svh, 14px); }
.numero-p .t-tec { gap: clamp(7px, 1.2svh, 10px); }
.numero-p .t-tec button { height: clamp(46px, 7.4svh, 60px); }
/* Buscar: la lista se desliza por dentro */
.buscar .cab, .buscar .titulo, .buscar .bus, .buscar .filtros, .buscar .lista-cab { flex: none; }
.buscar .lista { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.filtro select { font-size: 16px; }
.tabs-abajo { padding: 6px 0 calc(6px + env(safe-area-inset-bottom)); }
