:root {
  --azul: #1D4F91; --azul-osc: #163E73; --azul-claro: #EEF3FA; --amarillo: #F2B705; --amarillo-osc: #C99600;
  --rojo: #C8372D; --negro: #23272C; --gris: #58616B; --gris-claro: #CDD6E3; --fondo: #F3F5F8; --blanco: #fff;
  --verde: #2E7D4F; --verde-claro: #E9F4EC;
  --letra: 17px;
  --cond: 'Barlow Condensed', 'Arial Narrow', Arial, sans-serif;
  --base: 'Barlow', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  --sup: env(safe-area-inset-top, 0px); --inf: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--fondo); color: var(--negro); font-family: var(--base); font-size: 16px; }
body { overflow-x: hidden; }
button, input, select { font: inherit; color: inherit; }
a { color: var(--azul); }
[hidden] { display: none !important; }
#app { max-width: 600px; margin: 0 auto; min-height: 100vh; background: var(--fondo); position: relative; }

/* ---------- barra de arriba ---------- */
.barra { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 8px;
  padding: calc(10px + var(--sup)) 12px 10px; color: #fff;
  background-color: var(--azul);
  background-image: linear-gradient(rgba(255,255,255,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px);
  background-size: 18px 18px; box-shadow: 0 2px 10px rgba(16,40,80,.25); min-height: 58px; }
.marca { display: flex; align-items: center; gap: 9px; color: #fff; text-decoration: none; flex: 1; min-width: 0; }
.marca img { border-radius: 8px; flex: none; }
.marca span { font-family: var(--cond); font-weight: 800; font-size: 21px; letter-spacing: 1.4px; white-space: nowrap; }
.b-atras { background: none; border: 0; color: #fff; padding: 6px 4px; margin-left: -4px; cursor: pointer; display: flex; }
.b-titulo { flex: 1; min-width: 0; font-family: var(--cond); font-weight: 700; font-size: 18px; letter-spacing: .3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.b-letra { display: flex; gap: 4px; }
.b-letra button { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.35); color: #fff; border-radius: 8px;
  min-width: 42px; height: 36px; font-family: var(--cond); font-weight: 800; font-size: 16px; cursor: pointer; }
.b-info { color: #fff; display: flex; padding: 6px; opacity: .9; }
.progreso-lectura { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: transparent; }
.progreso-lectura i { display: block; height: 100%; width: 0; background: var(--amarillo); transition: width .15s; }

main { padding: 16px 16px calc(96px + var(--inf)); outline: none; }

/* ---------- menú de abajo ---------- */
.menu { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 600px; z-index: 30;
  display: grid; grid-template-columns: repeat(5, 1fr); background: #fff; border-top: 1px solid #DDE3EA;
  padding: 6px 2px calc(6px + var(--inf)); box-shadow: 0 -4px 16px rgba(20,40,70,.08); }
.menu a { display: flex; flex-direction: column; align-items: center; gap: 2px; text-decoration: none; color: var(--gris);
  font-size: 11.5px; font-weight: 600; padding: 4px 0; border-radius: 10px; }
.menu svg { width: 25px; height: 25px; }
.menu a.on { color: var(--azul); }
.menu a.on svg { stroke-width: 2.6; }
.menu a.on span { font-weight: 800; }

/* ---------- piezas comunes ---------- */
h1.t, h2.t { font-family: var(--cond); font-weight: 800; text-transform: uppercase; letter-spacing: .3px; margin: 0; }
h1.t { font-size: 28px; line-height: 1.05; color: var(--negro); }
h2.t { font-size: 20px; color: var(--azul); margin: 26px 0 10px; display: flex; align-items: center; gap: 8px; }
h2.t small { font-family: var(--base); text-transform: none; font-weight: 600; font-size: 13px; color: var(--gris); letter-spacing: 0; margin-left: auto; }
.sub { color: var(--gris); margin: 6px 0 0; line-height: 1.45; }
.tarjeta { background: #fff; border-radius: 14px; padding: 16px; box-shadow: 0 1px 0 #E2E7EE, 0 4px 14px rgba(20,40,70,.06); }
.franja { height: 8px; border-radius: 4px; background: repeating-linear-gradient(-45deg, var(--amarillo) 0 10px, var(--negro) 10px 20px); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 10px; cursor: pointer;
  font-family: var(--cond); font-weight: 800; font-size: 18px; letter-spacing: .4px; text-transform: uppercase; text-decoration: none;
  padding: 13px 18px; min-height: 50px; }
.btn-am { background: var(--amarillo); color: #1A1D21; box-shadow: 0 4px 0 var(--amarillo-osc); }
.btn-az { background: var(--azul); color: #fff; box-shadow: 0 4px 0 var(--azul-osc); }
.btn-bl { background: #fff; color: var(--azul); border: 2px solid var(--azul); }
.btn:active { transform: translateY(2px); box-shadow: none; }
.btn-ancho { width: 100%; }
.chip { display: inline-flex; align-items: center; border: 1.5px solid var(--gris-claro); background: #fff; border-radius: 99px;
  padding: 7px 13px; font-weight: 700; font-size: 14px; cursor: pointer; color: var(--negro); }
.chip.on { background: var(--azul); border-color: var(--azul); color: #fff; }
.campo { width: 100%; border: 2px solid var(--gris-claro); border-radius: 12px; background: #fff; color: var(--negro); padding: 13px 14px; font-size: 18px; }
.campo:focus { outline: none; border-color: var(--azul); box-shadow: 0 0 0 3px rgba(29,79,145,.15); }
.busqueda { position: relative; }
.busqueda svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; color: var(--gris); z-index: 2; pointer-events: none; }
.busqueda .campo { padding-left: 46px; }
.vacio { text-align: center; color: var(--gris); padding: 28px 10px; }
.barrita { height: 8px; background: #E4E9F0; border-radius: 99px; overflow: hidden; }
.barrita i { display: block; height: 100%; background: var(--verde); border-radius: 99px; transition: width .4s; }
mark { background: #FFE58A; color: inherit; border-radius: 3px; padding: 0 1px; }

/* ---------- entrada (sin código) ---------- */
.entrada { text-align: center; padding-top: 8px; }
.entrada .logo { width: 150px; height: 150px; border-radius: 26px; box-shadow: 0 10px 30px rgba(29,79,145,.3); }
.entrada h1 { font-family: var(--cond); font-weight: 800; font-size: 30px; text-transform: uppercase; margin: 20px 0 6px; line-height: 1.05; }
.entrada p { color: var(--gris); line-height: 1.5; }
.codigo-in { text-transform: uppercase; letter-spacing: 4px; text-align: center; font-family: var(--cond); font-weight: 800; font-size: 26px; }
.error { color: var(--rojo); font-weight: 700; min-height: 22px; margin: 8px 0; }
.ayuda-codigo { text-align: left; background: var(--azul-claro); border-radius: 12px; padding: 12px 14px; font-size: 15px; line-height: 1.5; margin-top: 18px; }

/* ---------- inicio ---------- */
.hola { display: flex; gap: 14px; align-items: center; }
.hola .mano { font-size: 34px; }
.seguir { display: flex; gap: 14px; align-items: center; text-decoration: none; color: inherit; margin-top: 16px; }
.seguir img { width: 64px; border-radius: 6px; box-shadow: 0 4px 12px rgba(0,0,0,.2); flex: none; }
.seguir .k { font-family: var(--cond); font-weight: 700; color: var(--rojo); letter-spacing: 1.2px; font-size: 13px; text-transform: uppercase; }
.seguir .n { font-family: var(--cond); font-weight: 800; font-size: 21px; line-height: 1.1; margin: 2px 0 8px; }
.seguir .flecha { margin-left: auto; color: var(--azul); font-size: 26px; font-weight: 800; }
.nota-rapida { background: var(--negro); color: #fff; border-radius: 16px; padding: 18px 16px 16px; margin-top: 16px; position: relative; overflow: hidden; }
.nota-rapida::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 16px 16px; }
.nota-rapida h3 { font-family: var(--cond); font-weight: 800; font-size: 22px; margin: 0 0 4px; text-transform: uppercase; }
.nota-rapida h3 b { color: var(--amarillo); }
.nota-rapida p { margin: 0 0 12px; color: #C9D2DC; font-size: 15px; }
.nota-rapida .campo { position: relative; z-index: 1; }
.ejemplos { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; position: relative; z-index: 1; }
.ejemplos button { background: rgba(255,255,255,.1); color: #fff; border: 1px solid rgba(255,255,255,.25); border-radius: 8px;
  padding: 6px 10px; font-family: var(--cond); font-weight: 700; font-size: 16px; cursor: pointer; }
.herr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.herr { background: #fff; border-radius: 14px; padding: 14px 12px; text-decoration: none; color: var(--negro);
  box-shadow: 0 1px 0 #E2E7EE, 0 4px 14px rgba(20,40,70,.06); display: flex; flex-direction: column; gap: 6px; min-height: 112px; }
.herr .ic { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; font-size: 22px; background: var(--azul-claro); }
.herr b { font-family: var(--cond); font-weight: 800; font-size: 18px; line-height: 1.05; text-transform: uppercase; }
.herr small { color: var(--gris); font-size: 13px; line-height: 1.3; }

/* ---------- biblioteca ---------- */
.libros { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.libro { text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: 8px; position: relative; }
.libro .tapa { position: relative; border-radius: 6px; overflow: hidden; box-shadow: 0 8px 20px rgba(16,40,80,.22); background: #dfe5ee; aspect-ratio: 480/621; }
.libro .tapa img { width: 100%; height: 100%; object-fit: cover; display: block; }
.libro b { font-family: var(--cond); font-weight: 800; font-size: 17px; line-height: 1.1; }
.libro .barrita { height: 6px; }
.libro .est { font-size: 13px; color: var(--gris); font-weight: 600; }
.libro.cerrado .tapa img { filter: grayscale(.35) brightness(.86); }
.candado { position: absolute; top: 8px; right: 8px; background: rgba(35,39,44,.88); color: #fff; border-radius: 99px;
  padding: 4px 9px; font-size: 12.5px; font-weight: 700; display: flex; gap: 5px; align-items: center; }
.precio { display: flex; align-items: baseline; gap: 7px; }
.precio s { color: var(--gris); font-size: 14px; }
.precio strong { font-family: var(--cond); font-weight: 800; font-size: 20px; color: var(--negro); }
.libro .acciones { display: flex; flex-direction: column; gap: 6px; }
.libro .acciones .btn { font-size: 15px; min-height: 42px; padding: 9px 10px; }
.ya, .libro .ya { background: none; border: 0; color: var(--azul); text-decoration: underline; font-size: 14px; cursor: pointer; padding: 6px; font-weight: 600; }
.libro .ya { font-size: 13.5px; padding: 4px; font-weight: 400; }
.etiqueta { display: inline-block; background: var(--verde-claro); color: var(--verde); font-weight: 800; font-size: 12px; border-radius: 6px; padding: 2px 7px; }

/* ---------- página de un libro ---------- */
.portada { display: flex; gap: 16px; align-items: flex-start; }
.portada img { width: 118px; border-radius: 6px; box-shadow: 0 10px 24px rgba(16,40,80,.25); flex: none; }
.portada h1 { font-size: 25px; }
.caps { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.caps a { display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 12px; padding: 12px 12px;
  text-decoration: none; color: inherit; box-shadow: 0 1px 0 #E2E7EE; min-height: 62px; }
.caps .num { font-family: var(--cond); font-weight: 800; font-size: 26px; color: var(--azul); width: 34px; text-align: center; flex: none; }
.caps .num.sin { font-size: 20px; color: var(--amarillo-osc); }
.caps .tx { flex: 1; min-width: 0; }
.caps .tx b { display: block; font-family: var(--cond); font-weight: 700; font-size: 18px; line-height: 1.12; }
.caps .tx small { color: var(--gris); font-size: 13.5px; }
.caps .ok { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--gris-claro); flex: none; display: grid; place-items: center; color: #fff; font-size: 15px; font-weight: 800; }
.caps .ok.si { background: var(--verde); border-color: var(--verde); }

/* ---------- lector ---------- */
.cap-cab { margin: -16px -16px 18px; padding: 22px 16px 0; background: #fff; }
.cap-cab .kick { font-family: var(--cond); font-weight: 700; color: var(--rojo); letter-spacing: 1.4px; font-size: 13px; text-transform: uppercase; }
.cap-cab .fila { display: flex; gap: 12px; align-items: flex-end; border-bottom: 3px solid var(--negro); padding-bottom: 8px; }
.cap-cab .numero { font-family: var(--cond); font-weight: 800; font-size: 58px; line-height: .8; color: var(--azul); }
.cap-cab h1 { font-family: var(--cond); font-weight: 800; font-size: 27px; line-height: 1.02; text-transform: uppercase; margin: 2px 0 0; }
.cap-cab .franja { border-radius: 0; height: 9px; margin-top: 0; }
.lector { font-size: var(--letra); line-height: 1.6; overflow-wrap: anywhere;
  background-image: var(--marca, none); background-repeat: repeat;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.lector figure, .lector .tarj, .lector .ej { background-image: var(--marca, none); background-repeat: repeat; }
.lector p { margin: 0 0 12px; }
.lector h2 { font-family: var(--cond); font-weight: 800; font-size: 1.3em; color: var(--azul); margin: 26px 0 8px; text-transform: uppercase; line-height: 1.1; }
.lector h3 { font-family: var(--cond); font-weight: 700; font-size: 1.12em; margin: 18px 0 6px; }
.lector code { font-family: var(--cond); font-weight: 700; font-size: 1.05em; background: var(--azul-claro); color: var(--azul-osc); padding: 0 5px; border-radius: 4px; white-space: nowrap; }
.lector figure { margin: 14px -6px 20px; background: #fff; border-radius: 12px; padding: 10px 8px 10px; box-shadow: 0 1px 0 #E2E7EE; position: relative; cursor: zoom-in; }
.lector figure svg { width: 100%; height: auto; display: block; max-height: none !important; }
.lector figure::after { content: "🔍 Toca el dibujo para ampliarlo"; display: block; text-align: right; color: var(--azul);
  font-size: 12.5px; font-weight: 700; margin-top: 6px; pointer-events: none; }
.lector figcaption { font-size: .86em; color: var(--gris); margin-top: 6px; border-left: 3px solid var(--amarillo); padding-left: 8px; line-height: 1.4; }
.lector .caja { border-radius: 10px; padding: 12px 14px 4px; margin: 14px 0 16px; }
.lector .caja .et { font-family: var(--cond); font-weight: 800; letter-spacing: 1.2px; font-size: .82em; text-transform: uppercase; display: block; margin-bottom: 3px; }
.lector .obra { background: var(--azul-claro); border-left: 6px solid var(--azul); }
.lector .obra .et { color: var(--azul); }
.lector .ojo { background: #FFF5E0; border-left: 6px solid var(--rojo); }
.lector .ojo .et { color: var(--rojo); }
.lector .ej { background: #fff; border: 1.5px solid var(--gris-claro); border-radius: 12px; padding: 12px 14px; margin: 10px 0 12px; }
.lector .ej .q { font-weight: 600; }
.lector .ej .q b { font-family: var(--cond); color: var(--azul); font-size: 1.12em; margin-right: 5px; }
.lector .ej .r { margin-top: 8px; color: var(--verde); background: var(--verde-claro); border-radius: 8px; padding: 8px 10px; }
.lector .ej .r b { font-family: var(--cond); letter-spacing: .8px; }
.lector .ej.tapada .r { display: none; }
.ver-resp { margin-top: 10px; background: var(--azul-claro); color: var(--azul); border: 0; border-radius: 8px; padding: 8px 12px;
  font-family: var(--cond); font-weight: 800; font-size: 16px; cursor: pointer; letter-spacing: .3px; }
.lector ul, .lector ol { padding-left: 24px; margin: 0 0 12px; }
.lector li { margin: 4px 0; }
.lector ul.check { list-style: none; padding-left: 0; }
.lector ul.check li { position: relative; padding: 8px 8px 8px 42px; background: #fff; border-radius: 10px; margin: 6px 0; cursor: pointer; box-shadow: 0 1px 0 #E2E7EE; }
.lector ul.check li::before { content: ""; position: absolute; left: 10px; top: 9px; width: 22px; height: 22px; border: 2px solid var(--negro); border-radius: 5px; background: #fff; }
.lector ul.check li.hecho::before { background: var(--verde); border-color: var(--verde); }
.lector ul.check li.hecho::after { content: "✓"; position: absolute; left: 15px; top: 7px; color: #fff; font-weight: 800; }
.lector ul.check li.hecho { color: var(--gris); text-decoration: line-through; }
.lector .tabla { overflow-x: auto; margin: 8px -16px 16px; padding: 0 16px; -webkit-overflow-scrolling: touch; }
.lector table { border-collapse: collapse; width: 100%; min-width: 100%; font-size: .9em; background: #fff; border-radius: 8px; overflow: hidden; overflow-wrap: normal; word-break: normal; }
.lector th { white-space: nowrap; }
.lector th { background: var(--negro); color: #fff; font-family: var(--cond); font-weight: 700; letter-spacing: .4px; text-align: left; padding: 7px 9px; }
.lector td { border-bottom: 1px solid #E1E6EC; padding: 7px 9px; vertical-align: top; }
.lector tr:nth-child(even) td { background: #F7F8FA; }
.lector td:first-child { font-family: var(--cond); font-weight: 700; white-space: nowrap; }
.lector .grande { font-size: 1.08em; }
.lector .pie-legal { font-size: .8em; color: var(--gris); border-top: 1px solid var(--gris-claro); padding-top: 8px; margin-top: 22px; }
.lector .centro { text-align: center; }
.lector img { max-width: 100%; height: auto; }
.lector svg { max-width: 100%; }
/* tarjetas de bolsillo y otros bloques sueltos de los libros */
.lector .cel { margin: 0 0 18px; }
.lector .tarj { background: #fff; border-radius: 14px; padding: 14px; box-shadow: 0 1px 0 #E2E7EE, 0 4px 14px rgba(20,40,70,.06); overflow-x: auto; }
.lector .tarj table.chica { font-size: .8em; }
.lector .tarj .th { display: flex; align-items: center; gap: 9px; font-family: var(--cond); font-weight: 800; font-size: 1.35em;
  text-transform: uppercase; border-bottom: 3px solid var(--negro); padding-bottom: 4px; margin-bottom: 8px; line-height: 1.05; }
.lector .tarj .th span { background: var(--azul); color: #fff; border-radius: 5px; padding: 0 7px; font-size: .85em; }
.lector .tarj .fr { height: 7px; margin: -8px 0 10px; background: repeating-linear-gradient(-45deg, var(--amarillo) 0 8px, var(--negro) 8px 16px); }
.lector .tarj .pie { font-family: var(--cond); font-weight: 700; color: #9AA1A8; letter-spacing: 1px; font-size: .78em; margin-top: 8px; }
.lector table.tt td:first-child { white-space: normal; }
.lector table.sim td:first-child { width: 42%; }
.lector table.sim td:first-child svg { width: 100% !important; height: auto; }
.lector table.sim td { vertical-align: middle; }
.lector table.tt { margin: 2px 0 6px; }
.fin-cap { margin-top: 28px; display: flex; flex-direction: column; gap: 10px; }
.fin-cap .nav2 { display: flex; gap: 10px; }
.fin-cap .nav2 .btn { flex: 1; font-size: 15.5px; padding: 10px; }
.leido-ok { text-align: center; color: var(--verde); font-weight: 800; }
.resaltar { animation: resaltar 2.2s ease; border-radius: 6px; }
@keyframes resaltar { 0%, 60% { background: #FFE58A; box-shadow: 0 0 0 4px #FFE58A; } 100% { background: transparent; box-shadow: none; } }

/* ---------- diccionario y búsqueda ---------- */
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 4px; }
.entradas { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.ent { background: #fff; color: var(--negro); border-radius: 12px; padding: 12px 14px; box-shadow: 0 1px 0 #E2E7EE; }
.ent .tt { font-family: var(--cond); font-weight: 800; font-size: 22px; color: var(--azul-osc); line-height: 1.1; }
.ent .en { color: var(--gris); font-size: 14px; font-style: italic; margin-left: 6px; font-weight: 500; }
.ent .es { font-size: 17px; margin-top: 3px; line-height: 1.4; }
.ent .nota { font-size: 14px; color: var(--gris); margin-top: 3px; }
.ent .tema { display: inline-block; font-size: 11.5px; font-weight: 700; color: var(--gris); background: var(--fondo); border-radius: 5px; padding: 1px 6px; margin-top: 6px; }
.res { display: block; background: #fff; border-radius: 12px; padding: 12px 14px; text-decoration: none; color: inherit; box-shadow: 0 1px 0 #E2E7EE; }
.res .de { font-family: var(--cond); font-weight: 700; color: var(--rojo); font-size: 13px; letter-spacing: 1px; text-transform: uppercase; }
.res b { display: block; font-family: var(--cond); font-weight: 800; font-size: 18px; margin: 1px 0 3px; }
.res p { margin: 0; color: #3b4148; font-size: 15px; line-height: 1.45; }
.cuenta-res { color: var(--gris); font-size: 14px; margin-top: 10px; }

/* ---------- herramientas ---------- */
.calc { display: flex; flex-direction: column; gap: 14px; }
.calc label { font-weight: 700; font-size: 14.5px; display: block; margin-bottom: 6px; }
.fila3 { display: grid; grid-template-columns: 1fr 1fr 1.2fr; gap: 8px; }
.fila2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.uni { position: relative; }
.uni .campo { padding-right: 34px; }
.uni i { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-style: normal; font-weight: 800; color: var(--gris); font-family: var(--cond); font-size: 19px; }
select.campo { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--gris) 50%), linear-gradient(135deg, var(--gris) 50%, transparent 50%);
  background-position: calc(100% - 18px) 55%, calc(100% - 12px) 55%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 30px; }
.resultado { background: var(--negro); color: #fff; border-radius: 14px; padding: 16px; }
.resultado .grande { font-family: var(--cond); font-weight: 800; font-size: 38px; line-height: 1; color: var(--amarillo); }
.resultado .linea { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px dashed rgba(255,255,255,.18); font-size: 16px; }
.resultado .linea:last-child { border: 0; }
.resultado .linea b { font-family: var(--cond); font-size: 20px; }
.pasos { background: var(--azul-claro); border-radius: 12px; padding: 12px 14px; line-height: 1.55; font-size: 15.5px; }
.pasos ol { margin: 6px 0 0; padding-left: 20px; }
.consejo { background: #FFF5E0; border-left: 5px solid var(--rojo); border-radius: 10px; padding: 10px 12px; font-size: 14.5px; line-height: 1.45; }
.seg { display: flex; background: #E4E9F0; border-radius: 12px; padding: 4px; gap: 4px; }
.seg button { flex: 1; border: 0; background: none; border-radius: 9px; padding: 10px 6px; font-weight: 800; font-family: var(--cond); font-size: 17px; cursor: pointer; color: var(--gris); }
.seg button.on { background: #fff; color: var(--azul); box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.cotas { display: flex; flex-direction: column; gap: 8px; }
.cota { display: grid; grid-template-columns: 26px 1fr 1fr 1.2fr 34px; gap: 6px; align-items: center; }
.cota .n { font-family: var(--cond); font-weight: 800; color: var(--azul); font-size: 18px; text-align: center; }
.cota .campo { padding: 11px 8px; font-size: 17px; }
.cota button { border: 0; background: #F6E3E1; color: var(--rojo); border-radius: 8px; height: 40px; font-size: 20px; font-weight: 800; cursor: pointer; }
.veredicto { border-radius: 12px; padding: 12px 14px; font-weight: 700; line-height: 1.4; }
.veredicto.bien { background: var(--verde-claro); color: var(--verde); }
.veredicto.mal { background: #FBE6E4; color: var(--rojo); }

/* ---------- info ---------- */
.pasos-instalar { display: flex; flex-direction: column; gap: 10px; }
.pasos-instalar .tarjeta h3 { font-family: var(--cond); font-weight: 800; font-size: 19px; margin: 0 0 6px; text-transform: uppercase; }
.pasos-instalar ol { margin: 0; padding-left: 20px; line-height: 1.55; }
.lista-codigos { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.lista-codigos div { display: flex; justify-content: space-between; background: var(--fondo); border-radius: 8px; padding: 8px 10px; font-size: 15px; }

/* ---------- zoom de dibujos ---------- */
.zoom { position: fixed; inset: 0; z-index: 60; background: #0F1B2D; display: flex; flex-direction: column; }
.zoom-barra { display: flex; gap: 8px; padding: calc(10px + var(--sup)) 12px 10px; background: rgba(0,0,0,.35); }
.zoom-barra button { background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.3); border-radius: 10px; min-width: 50px; height: 44px; font-size: 24px; font-weight: 800; cursor: pointer; }
.zoom-barra .zoom-cerrar { margin-left: auto; font-size: 16px; font-family: var(--cond); letter-spacing: .5px; padding: 0 14px; background: var(--amarillo); color: #1A1D21; border: 0; }
.zoom-lienzo { flex: 1; overflow: auto; -webkit-overflow-scrolling: touch; padding: 16px; touch-action: pan-x pan-y pinch-zoom; }
.zoom-lienzo .hoja { background: #fff; border-radius: 8px; padding: 10px; margin: 0 auto; transition: width .15s; }
.zoom-lienzo svg { width: 100%; height: auto; display: block; max-height: none !important; }
.zoom-ayuda { color: #9FB0C6; text-align: center; font-size: 13px; margin: 6px 0 calc(10px + var(--inf)); }

/* ---------- aviso ---------- */
.aviso { position: fixed; left: 50%; bottom: calc(90px + var(--inf)); transform: translateX(-50%) translateY(20px); opacity: 0; z-index: 70;
  background: var(--negro); color: #fff; border-radius: 12px; padding: 12px 16px; font-weight: 600; max-width: 92vw; text-align: center;
  transition: opacity .25s, transform .25s; pointer-events: none; box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.aviso.ver { opacity: 1; transform: translateX(-50%) translateY(0); }

.cargando { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 60px 0; color: var(--gris); font-weight: 600; }
.cargando .rueda { width: 42px; height: 42px; border: 4px solid var(--gris-claro); border-top-color: var(--azul); border-radius: 50%; animation: gira 1s linear infinite; }
@keyframes gira { to { transform: rotate(360deg); } }
.instalar-banda { display: flex; gap: 12px; align-items: center; background: #fff; border: 2px dashed var(--azul); border-radius: 14px; padding: 12px 14px; margin-top: 16px; }
.instalar-banda .ic { font-size: 28px; }
.instalar-banda p { margin: 0; font-size: 14.5px; line-height: 1.4; flex: 1; }
.instalar-banda b { font-family: var(--cond); font-size: 17px; display: block; }
.instalar-banda .btn { font-size: 15px; min-height: 42px; padding: 8px 12px; }
