/*
  © 2026 Helpet. Todos los derechos reservados.
  Prohibida la copia, reproducción o distribución total o parcial de este código, diseño, textos e imágenes sin autorización escrita del titular.
*/
/* Estilos de el perfil público de la mascota (index.html) */

/* Sin Tailwind: todo el estilo vive aquí (la ficha carga más rápido en el celular de quien escanea) */
*, *::before, *::after { box-sizing: border-box; }
:root {
  --cafe:#3b2420; --oxido:#b4452b; --oxido2:#8f3523; --crema:#f8edd1; --arena:#eadfcf; --tinta:#2b1d1a; --suave:#736255; --ocre:#e0a24a; --verde:#7f9a3e;
  /* Franja de awayo (rombos andinos) y anillo tejido: los acentos que unen todas las piezas */
  --awayo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='12'%3E%3Cpath fill='%233b2420' d='M0 0h28v12H0z'/%3E%3Cpath fill='%23e0a24a' d='M0 0h28v1.6H0zM0 10.4h28V12H0z'/%3E%3Cpath fill='%23b4452b' d='M7 2.4 10.6 6 7 9.6 3.4 6z'/%3E%3Cpath fill='%237f9a3e' d='M21 2.4 24.6 6 21 9.6 17.4 6z'/%3E%3Cpath fill='%23f8edd1' d='M7 4.6 8.4 6 7 7.4 5.6 6zM21 4.6 22.4 6 21 7.4 19.6 6z'/%3E%3Cpath fill='%23e0a24a' d='M14 4.2 15.8 6 14 7.8 12.2 6zM0 4.2 1.8 6 0 7.8zM28 4.2 26.2 6 28 7.8z'/%3E%3C/svg%3E");
  --telar: repeating-conic-gradient(#b4452b 0 7.5deg, #e0a24a 7.5deg 15deg, #3b2420 15deg 22.5deg, #7f9a3e 22.5deg 30deg);
  --anillo: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4.5px));
}
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html.bloqueo, html.bloqueo body { overflow: hidden; }   /* con una ventana abierta, el fondo no se desplaza */
body {
  margin: 0; min-height: 100vh; min-height: 100dvh; padding: 16px; position: relative; overflow-x: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-family: 'Fredoka', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; color: var(--tinta);
  background-color: #29170d;
  -webkit-tap-highlight-color: transparent;
}
/* Fondo fijo y ajustado a la pantalla también en iPhone (Safari ignora background-attachment: fixed y lo estira a todo el largo) */
body::before { content: ""; position: fixed; inset: 0; z-index: -1; background: #29170d url("../fondo-helpet.jpg") center top / cover no-repeat; }
body.con-dock { padding-bottom: calc(92px + env(safe-area-inset-bottom)); }
img { max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
.hidden { display: none !important; }

@keyframes pulso { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
@keyframes ping { 75%, 100% { transform: scale(1.9); opacity: 0; } }
@keyframes aviso {
  0%, 100% { box-shadow: 0 8px 20px -6px rgba(220,38,38,.55), 0 0 0 0 rgba(248,113,113,.6); }
  50% { box-shadow: 0 8px 20px -6px rgba(220,38,38,.55), 0 0 0 7px rgba(248,113,113,0); }
}
@keyframes girar { to { transform: rotate(1turn); } }
@keyframes latido { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.14); } }
@keyframes subir { from { opacity: 0; transform: translateY(14px); } }
@keyframes aterrizar { from { opacity: 0; transform: translateY(-20px) scale(.94); } }
@keyframes flotar { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes foto-pop { from { opacity: 0; transform: scale(.6); } 70% { transform: scale(1.04); } }
@keyframes surgir { from { opacity: 0; transform: translateY(18px) scale(.97); } }
@keyframes velo { from { opacity: 0; } }
@keyframes deslizar { from { transform: translateY(100%); } }
@keyframes onda { from { opacity: .32; transform: rotate(45deg) scale(0); } to { opacity: 0; transform: rotate(45deg) scale(30); } }   /* la onda es un rombo */
@keyframes sacudir { 0%, 100% { transform: translateX(0); } 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
@keyframes brincar { 0%, 100% { transform: none; } 40% { transform: translateY(-4px) rotate(-8deg); } 70% { transform: rotate(6deg); } }
/* Lenguaje andino del movimiento: tejer (franjas que avanzan hilo a hilo), desenrollar (como un awayo que se
   despliega), la pushka (el huso de hilar que gira y se frena), puntadas (bordado) y la mixtura del carnaval */
@keyframes tejer { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes deshilar { to { opacity: 0; } }
@keyframes desenrollar { from { opacity: 0; transform: perspective(800px) rotateX(-70deg); } 55% { opacity: 1; } }
@keyframes puntada { to { stroke-dashoffset: -13; } }
@keyframes saltito { 0%, 100% { transform: none; } 40% { transform: translateY(-9px) rotate(-5deg); } 70% { transform: translateY(2px); } }
@keyframes pop { 0%, 100% { transform: none; } 50% { transform: scale(1.35); } }
@keyframes timbre { 0%, 100% { transform: none; } 15%, 45%, 75% { transform: rotate(-18deg); } 30%, 60%, 90% { transform: rotate(18deg); } }
@keyframes guino { 0%, 100% { transform: none; } 40% { transform: scale(1.3) rotate(-14deg); } 70% { transform: scale(.94) rotate(6deg); } }
@keyframes megafono { 0%, 100% { transform: none; } 20%, 60% { transform: rotate(-14deg) scale(1.15); } 40%, 80% { transform: rotate(10deg) scale(1.15); } }
@keyframes caer { 0% { transform: translateY(-7px); opacity: 0; } 60% { transform: translateY(2px); opacity: 1; } 100% { transform: none; } }
@keyframes puntito { 0% { transform: rotate(45deg) scale(.3); } 60% { transform: rotate(45deg) scale(1.35); } 100% { transform: rotate(45deg) scale(1); } }
@keyframes halo { 0% { box-shadow: 0 8px 16px -6px rgba(3,105,161,.75), 0 0 0 0 rgba(56,189,248,.6); } 70%, 100% { box-shadow: 0 8px 16px -6px rgba(3,105,161,.75), 0 0 0 10px rgba(56,189,248,0); } }
@keyframes estampa { 0% { opacity: 0; transform: translate(-50%, -50%) rotate(var(--r)) scale(1.8); } 15% { opacity: 1; transform: translate(-50%, -50%) rotate(var(--r)) scale(.9); } 25% { transform: translate(-50%, -50%) rotate(var(--r)) scale(1); } 100% { opacity: 0; transform: translate(-50%, -50%) rotate(var(--r)) scale(1); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* Cargando: huella dentro de un anillo tejido que gira */
.cargando { position: relative; width: 84px; height: 84px; display: grid; place-items: center; color: var(--crema); font-size: 30px; }
.cargando::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--telar); -webkit-mask: var(--anillo); mask: var(--anillo); animation: girar 2.4s linear infinite; }
.cargando i { animation: latido 1.1s ease-in-out infinite; }

/* ---------- Piezas reutilizables (mismo lenguaje visual que registro.html) ---------- */
.card { position: relative; background: #fff; border: 1px solid var(--arena); border-radius: 20px; box-shadow: 0 1px 0 rgba(59,36,32,.05), 0 10px 22px -16px rgba(59,36,32,.5); overflow: hidden; }
.card-h { display: flex; align-items: center; gap: 10px; padding: 9px 12px; background: linear-gradient(to right, #fffaf0, #fff); border-bottom: 1px solid #f3eadb; }
.card-h h2 { margin: 0; font-size: 13.5px; font-weight: 600; color: var(--cafe); flex: 1; }
.card-b { padding: 11px 12px 12px; display: grid; gap: 9px; }
.ttl { flex: 1; min-width: 0; }
.ttl small { display: block; font-size: 9.5px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--suave); line-height: 1.1; }
.ttl b { display: block; margin-top: 2px; font-size: 15px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--oxido2); line-height: 1.2; overflow-wrap: anywhere; }
.pill { font-size: 9.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; background: #f5ece0; color: var(--suave); white-space: nowrap; }
.pill.req { background: #ffe9d6; color: var(--oxido2); }
.ico { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; color: #fff; font-size: 13px; flex: none; box-shadow: inset 0 -2px 0 rgba(0,0,0,.16); }
.ico.grande { width: 56px; height: 56px; border-radius: 18px; font-size: 24px; margin: 0 auto; }
.ico.amber { background: linear-gradient(135deg, #fbbf24, #d97706); }
.ico.sky { background: linear-gradient(135deg, #38bdf8, #0369a1); }
.ico.rose { background: linear-gradient(135deg, #fb7185, #be123c); }
.ico.green { background: linear-gradient(135deg, #34d399, #047857); }
.ico.blue { background: linear-gradient(135deg, #60a5fa, #1d4ed8); }
.hint { margin: 0; font-size: 10.5px; line-height: 1.3; color: var(--suave); text-align: center; }
.hint i { color: #e0a24a; margin-right: 3px; }
.hint.resalta { color: var(--oxido2); font-weight: 600; }
.g2 { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 8px; }
.fila { display: flex; gap: 8px; }
.fila > .btn { flex: 1 1 0; width: auto; min-width: 0; }
.fila > .btn-afiche { flex-grow: 1.4; }
.fld { width: 100%; padding: 10px 11px; border-radius: 12px; border: 1.5px solid var(--arena); background: #fffdf8; font: 400 16px/1.25 'Fredoka', system-ui, sans-serif; color: var(--tinta); outline: none; transition: border-color .15s, box-shadow .15s; }
.fld:focus { border-color: #e08a2c; box-shadow: 0 0 0 3px rgba(224,138,44,.2); background: #fff; }
.fld.center { text-align: center; font-family: ui-monospace, monospace; font-weight: 700; font-size: 24px; letter-spacing: .3em; }
.fld.mal { border-color: #e11d48; box-shadow: 0 0 0 3px rgba(225,29,72,.15); animation: sacudir .4s; }
/* PIN: el texto del campo no se ve; encima, cuatro puntos que se llenan, se ponen rojos (error) o verdes (entró) */
.pin-caja { position: relative; }
.pin-caja .fld { color: transparent; caret-color: transparent; }
.pin-caja .fld::placeholder { color: transparent; }
.pin-caja.mal { animation: sacudir .4s; }
.pin-caja.mal .fld { border-color: #e11d48; box-shadow: 0 0 0 3px rgba(225,29,72,.15); }
.pin-puntos { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 20px; pointer-events: none; }
.pin-puntos span { width: 14px; height: 14px; border-radius: 3px; transform: rotate(45deg); border: 2px solid #e2cfae; transition: background .15s, border-color .15s; }
.pin-puntos span:nth-child(1) { --c: var(--oxido); } .pin-puntos span:nth-child(2) { --c: var(--ocre); }
.pin-puntos span:nth-child(3) { --c: var(--verde); } .pin-puntos span:nth-child(4) { --c: var(--cafe); }
.pin-puntos span.lleno { background: var(--c); border-color: var(--c); animation: puntito .3s cubic-bezier(.2,.8,.2,1); }
.pin-caja.mal .pin-puntos span { background: #e11d48; border-color: #e11d48; }
.pin-caja.bien .fld { border-color: #10b981; box-shadow: 0 0 0 3px rgba(16,185,129,.18); }
.pin-caja.bien .pin-puntos span { background: #10b981; border-color: #10b981; animation: puntito .35s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--n, 0) * 70ms); }

/* Botones (con onda al tocar: ver «INTERACCIÓN» en el script) */
.btn { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; gap: 7px; width: 100%; padding: 10px 12px; border: 0; border-radius: 14px; font: 600 14px/1.15 'Fredoka', system-ui, sans-serif; text-align: center; color: #fff; cursor: pointer; transition: transform .12s, filter .15s; }
.btn::after { content: ""; position: absolute; left: var(--x, 50%); top: var(--y, 50%); width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 3px; background: currentColor; opacity: 0; pointer-events: none; }
.btn.onda::after { animation: onda .6s ease-out; }
/* Cada ícono reacciona a su manera al tocarlo: el teléfono suena, WhatsApp guiña, el megáfono grita... */
.btn.onda i:not(.fa-spin) { animation: pop .4s ease-out; }
.btn-call.onda i:not(.fa-spin), .btn-vet.onda i:not(.fa-spin), #btn-call-secondary.onda i:not(.fa-spin) { animation: timbre .6s ease-in-out; }
.btn-wa.onda i:not(.fa-spin) { animation: guino .5s ease-out; }
.btn-afiche.onda i:not(.fa-spin) { animation: megafono .6s ease-in-out; }
#btn-carnet.onda i:not(.fa-spin), .btn-gps.onda i:not(.fa-spin) { animation: caer .45s ease-out; }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .65; }
.btn:focus-visible, .dueno:focus-visible, .x:focus-visible, #pet-photo:focus-visible { outline: 3px solid rgba(224,138,44,.6); outline-offset: 2px; }
@media (hover: hover) { .btn:hover { filter: brightness(1.06); transform: translateY(-1px); } .btn:active { transform: scale(.98); } }
.btn i { font-size: 16px; }
.btn-wa { background: linear-gradient(135deg, #047857, #065f46); box-shadow: 0 6px 14px -6px rgba(6,95,70,.75); }
.btn-call { background: linear-gradient(135deg, #2563eb, #1e40af); box-shadow: 0 6px 14px -6px rgba(30,64,175,.7); }
.btn-gps { padding: 12px; font-size: 14.5px; background: linear-gradient(135deg, #0369a1, #075985); box-shadow: 0 8px 16px -6px rgba(7,89,133,.75); }
#btn-gps:not(:disabled) { animation: halo 2s ease-out infinite; }   /* «¡La encontré!» llama la atención con un halo */
.btn-ambar { background: linear-gradient(135deg, #c2410c, #9a3412); box-shadow: 0 6px 14px -6px rgba(154,52,18,.7); }
.btn-line { background: #fff; color: var(--cafe); border: 1.5px solid #e6d9c4; }
.btn-line i { color: #6366f1; }
.btn-afiche { background: #fff; color: #be123c; border: 1.5px solid #fda4af; font-size: 13px; }
.btn-afiche i { color: #e11d48; }
.btn-share { background: #fff; color: var(--cafe); border: 1.5px solid #e6d9c4; font-size: 13px; }
.btn-share i { color: var(--oxido); }
.btn-share.hecho { color: #047857; border-color: #6ee7b7; background: #ecfdf5; }
.btn-share.hecho i { color: #059669; animation: pop .4s ease-out; }
.btn-vet { background: #fff; color: #be123c; border: 1.5px solid #fda4af; padding: 8px 12px; font-size: 13px; }
.btn-vet i { color: #e11d48; }
.btn-mini { flex: none; width: auto; padding: 8px 12px; font-size: 12.5px; border-radius: 12px; background: linear-gradient(135deg, #0369a1, #075985); box-shadow: 0 6px 12px -6px rgba(7,89,133,.7); }
.btn-mini i { font-size: 13px; }
.enlace { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--oxido); }

/* ---------- Placa sin registrar / sin conexión ---------- */
.vacio { position: relative; overflow: hidden; width: 100%; max-width: 384px; padding: 60px 22px 24px; border-radius: 28px; text-align: center; display: grid; gap: 12px; background-color: #fbf6e3; background-image: url("../fondoinfo.jpeg"); border: 1px solid rgba(248,237,209,.4); box-shadow: 0 25px 50px -12px rgba(0,0,0,.6); animation: subir .5s cubic-bezier(.2,.8,.2,1) both; }
.vacio::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 12px; background: var(--awayo) repeat-x left center / auto 12px; animation: tejer .9s .3s cubic-bezier(.45,0,.2,1) both; }
.vacio h2 { margin: 0; font: 800 22px/1.15 'DynaPuff', 'Fredoka', sans-serif; color: var(--cafe); }
.vacio p { margin: 0; font-size: 13px; color: var(--suave); }

/* ---------- Aviso de mascota perdida ---------- */
.alerta { width: 100%; max-width: 384px; margin: 0 0 10px; padding: 9px 14px; border-radius: 18px; display: flex; align-items: center; justify-content: center; gap: 10px; text-align: center; color: #fff; background: linear-gradient(135deg, #dc2626, #b91c1c); border: 2px solid #fca5a5; animation: aviso 1.8s ease-in-out infinite; }
.alerta i { font-size: 22px; color: #fde047; }
.alerta b { display: block; font-size: 15px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; line-height: 1.15; }
.alerta small { display: block; font-size: 12px; font-weight: 500; line-height: 1.2; opacity: .95; }

/* ---------- Corona Helpet (insignia con alas) ---------- */
#corona-helpet { position: relative; z-index: 30; width: 92%; max-width: 340px; margin: 0 auto -46px; pointer-events: none; user-select: none; -webkit-user-select: none; animation: aterrizar .6s cubic-bezier(.2,.8,.2,1) both; }
#corona-helpet img { display: block; width: 100%; height: auto; filter: drop-shadow(0 0 1.5px rgba(248,237,209,.95)) drop-shadow(0 6px 10px rgba(0,0,0,.4)); animation: flotar 6s ease-in-out .6s infinite; }

/* ---------- Tarjeta principal ---------- */
.shell { width: 100%; max-width: 384px; margin: 16px 0 4px; border-radius: 28px; overflow: hidden; position: relative; background-color: #fbf6e3; background-image: url("../fondoinfo.jpeg"); border: 1px solid rgba(248,237,209,.4); box-shadow: 0 25px 50px -12px rgba(0,0,0,.6); animation: subir .55s cubic-bezier(.2,.8,.2,1) both; }
.hero { position: relative; height: 142px; overflow: hidden; display: flex; align-items: flex-start; justify-content: center; padding-top: 36px; background: #3b2420; }
/* La imagen es 36 px más alta que la cabecera: al bajar se desliza más lento que la página (paralaje) */
.hero > img { position: absolute; left: 0; top: -36px; width: 100%; height: calc(100% + 36px); object-fit: cover; object-position: center bottom; will-change: transform; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(59,36,32,.3), transparent 50%); pointer-events: none; }
.awayo { position: relative; z-index: 1; height: 12px; background: var(--awayo) repeat-x left center / auto 12px; box-shadow: 0 3px 6px -2px rgba(59,36,32,.35); animation: tejer 1s .35s cubic-bezier(.45,0,.2,1) both; }   /* se teje al cargar y avanza al bajar */
.sello { position: relative; z-index: 2; display: inline-flex; align-items: center; gap: 6px; padding: 5px 14px; border-radius: 999px; font-size: 11px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; white-space: nowrap; color: var(--cafe); background: rgba(255,255,255,.96); border: 1px solid rgba(252,211,77,.9); box-shadow: 0 4px 10px -2px rgba(59,36,32,.4); }
.sello i { color: #d97706; }
.sello.perdida { color: #fff; background: rgba(220,38,38,.97); border-color: #fca5a5; animation: pulso 1.6s ease-in-out infinite; }
.sello.perdida i { color: #fff; }

.foto { position: relative; z-index: 2; display: flex; justify-content: center; margin-top: -66px; }
.foto-box { position: relative; animation: foto-pop .6s .15s cubic-bezier(.2,.8,.2,1) both; }
/* Anillo tejido alrededor de la foto (en modo perdido: franjas de alerta que giran más rápido) */
.foto-box::before { content: ""; position: absolute; inset: -8px; border-radius: 50%; background: var(--telar); -webkit-mask: var(--anillo); mask: var(--anillo); animation: girar 60s linear infinite; pointer-events: none; }
.shell.perdida .foto-box::before { background: repeating-conic-gradient(#dc2626 0 10deg, #fde047 10deg 20deg); animation-duration: 14s; }
/* Al tocar, el anillo gira rápido y se va frenando, como una pushka (el huso de hilar) */
.shell .foto-box.pushka::before { animation: girar 1.3s cubic-bezier(.15,.75,.25,1); }
#pet-photo { display: block; width: 128px; height: 128px; border-radius: 50%; object-fit: cover; background: #fff1d6; border: 4px solid #fff; cursor: zoom-in; box-shadow: 0 14px 26px -8px rgba(59,36,32,.65); transition: transform .25s cubic-bezier(.2,.8,.2,1); }
@media (hover: hover) { #pet-photo:hover { transform: scale(1.04) rotate(-2deg); } }
#pet-photo:active { transform: scale(.96); }
.punto { position: absolute; right: 6px; bottom: 6px; width: 24px; height: 24px; border-radius: 50%; background: #10b981; border: 3px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.3); }
.punto.perdida { background: #dc2626; animation: ping 1.4s cubic-bezier(0,0,.2,1) infinite; }

#pet-name { margin: 10px 0 0; padding: 0 14px; text-align: center; font-family: 'DynaPuff', 'Fredoka', cursive; font-weight: 800; font-size: 30px; line-height: 1.1; letter-spacing: .04em; text-transform: uppercase; color: var(--cafe); text-shadow: 0 2px 0 #fff, 0 4px 0 var(--arena), 0 7px 10px rgba(59,36,32,.22); overflow-wrap: anywhere; text-wrap: balance; animation: subir .5s .25s cubic-bezier(.2,.8,.2,1) both; }
/* Cada letra del nombre es un «saltito»: ondean al cargar y al tocar el nombre */
#pet-name { cursor: pointer; -webkit-user-select: none; user-select: none; }
#pet-name .palabra { display: inline-block; white-space: nowrap; }
#pet-name .letra { display: inline-block; }
#pet-name.ola .letra { animation: saltito .55s cubic-bezier(.3,.7,.4,1.4) both; animation-delay: calc(var(--n, 0) * 45ms); }
#sub-status { margin: 5px 0 0; padding: 0 18px; text-align: center; font-size: 13px; font-weight: 500; letter-spacing: .01em; line-height: 1.3; color: var(--oxido); text-wrap: balance; animation: subir .5s .3s cubic-bezier(.2,.8,.2,1) both; }
/* Aviso para el dueño: una cinta con puntadas, como un bordado; el ojo parpadea al aparecer */
@keyframes parpadeo { 0%, 100% { transform: none; } 45%, 55% { transform: scaleY(.1); } }
.aviso-dueno { display: flex; align-items: center; justify-content: center; gap: 6px; width: max-content; max-width: calc(100% - 36px); margin: 10px auto 0; padding: 5px 12px; border-radius: 999px; border: 1.5px dashed #d9a35a; background: #fff8ea; font-size: 11.5px; font-weight: 500; line-height: 1.25; color: var(--cafe); text-align: center; animation: subir .5s .55s cubic-bezier(.2,.8,.2,1) both; }
.aviso-dueno i { flex: none; color: var(--oxido); animation: parpadeo .5s 1.3s ease-in-out 2; }
#cuidados-nota { text-align: left; font-size: 11.5px; }
#sub-status.perdida { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #b91c1c; animation: pulso 1.6s ease-in-out infinite; }

.cuerpo { padding: 12px 12px 12px; display: grid; gap: 9px; }
/* Las piezas entran una tras otra (--i lo pone mostrarPerfil). El carnet no: se captura como imagen */
.cuerpo > :not(.carnet) { animation: subir .5s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(.32s + var(--i, 0) * 70ms); }
/* Con el script: cada pieza aparece cuando entra en la pantalla al bajar (ver revelarAlBajar) */
.cuerpo.revela > :not(.carnet) { animation: none; transform-origin: 50% 0; }
.cuerpo.revela > :not(.carnet):not(.visto) { opacity: 0; transform: perspective(800px) rotateX(-70deg); }
.cuerpo.revela > .visto { animation: desenrollar .75s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--d, 0) * 90ms); }
/* Cada tarjeta se «teje»: una franja de awayo la recorre de izquierda a derecha y luego se deshila */
.cuerpo.revela > .card.visto::before { content: ""; position: absolute; z-index: 1; left: 0; right: 0; top: 0; height: 6px; background: var(--awayo) repeat-x left center / auto 6px; pointer-events: none;
  animation: tejer .7s cubic-bezier(.45,0,.2,1) both, deshilar .6s ease-in forwards; animation-delay: calc(var(--d, 0) * 90ms + .25s), calc(var(--d, 0) * 90ms + 1.5s); }

/* Ficha técnica 2×2 */
.datos { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 8px; }
.dato { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 7px 9px; background: #fff; border: 1px solid var(--arena); border-radius: 16px; box-shadow: 0 1px 0 rgba(59,36,32,.04), 0 8px 16px -14px rgba(59,36,32,.5); transition: transform .18s, box-shadow .18s; }
.dato .ico { width: 28px; height: 28px; border-radius: 9px; font-size: 12px; }
.dato:active { transform: scale(.97); }
.dato:active .ico { animation: brincar .45s; }
@media (hover: hover) { .dato:hover { transform: translateY(-2px); box-shadow: 0 1px 0 rgba(59,36,32,.04), 0 12px 20px -12px rgba(59,36,32,.45); } .dato:hover .ico { animation: brincar .45s; } }
.dato > div { min-width: 0; }
.dato.ancho { grid-column: 1 / -1; }
.dato small { display: block; font-size: 9.5px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--suave); line-height: 1.1; }
.dato b { display: block; margin-top: 1px; font-size: 14.5px; font-weight: 600; line-height: 1.15; color: var(--cafe); overflow-wrap: anywhere; }

/* Salud */
.sem { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; border: 1px solid; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.sem .dot { width: 9px; height: 9px; border-radius: 50%; flex: none; animation: pulso 1.8s ease-in-out infinite; }
.sem-ok { background: #ecfdf5; color: #047857; border-color: #a7f3d0; } .sem-ok .dot { background: #10b981; }
.sem-warn { background: #fffbeb; color: #b45309; border-color: #fde68a; } .sem-warn .dot { background: #f59e0b; }
.sem-bad { background: #fff1f2; color: #be123c; border-color: #fecdd3; } .sem-bad .dot { background: #f43f5e; }
.sem-none { background: #f8f5f0; color: #6b5d52; border-color: #e6dccd; } .sem-none .dot { display: none; }
.fechas { display: grid; gap: 6px; }
.fecha { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 12px; background: #f1faf5; border: 1px solid #cdeedd; font-size: 12.5px; color: #14532d; }
.fecha i { width: 16px; text-align: center; color: #059669; }
.fecha span { flex: 1; font-weight: 500; }
.fecha span small { display: block; font-size: 10.5px; font-weight: 600; color: #059669; }
.fecha span small:empty { display: none; }
.fecha b { font-weight: 600; color: #065f46; }
.fecha.warn { background: #fffbeb; border-color: #fde68a; color: #78350f; } .fecha.warn i, .fecha.warn small { color: #d97706; } .fecha.warn b { color: #92400e; }
.fecha.bad { background: #fff1f2; border-color: #fecdd3; color: #881337; } .fecha.bad i, .fecha.bad small { color: #e11d48; } .fecha.bad b { color: #9f1239; }

/* Ficha médica básica */
.med { display: flex; gap: 8px; padding: 7px 10px; border-radius: 12px; background: #fff7f7; border: 1px solid #fde0e0; font-size: 12.5px; line-height: 1.3; }
.med .em { flex: none; font-size: 15px; line-height: 1.25; }
.med small { display: block; font-size: 9.5px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: #9f1239; }
.med p { margin: 0; color: #4a2a2a; overflow-wrap: anywhere; }

/* Invitación al canal: una sola fila, sin robarle protagonismo a la ficha */
.fila-canal { display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
.fila-canal .ttl b { font-size: 13px; letter-spacing: 0; text-transform: none; color: var(--cafe); }

.dueno { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 0 auto; padding: 6px 10px; border: 0; border-radius: 10px; background: none; font-size: 12px; font-weight: 500; color: var(--suave); cursor: pointer; }
.dueno:hover { color: var(--oxido); }

/* ---------- Carnet digital (se exporta como imagen) ---------- */
.carnet { position: relative; overflow: hidden; width: 350px; margin: 0 auto; padding: 24px; border-radius: 24px; color: #fff; font-family: 'Fredoka', sans-serif; background: linear-gradient(135deg, #c2410c, #9a3412); }
.carnet-glow { position: absolute; right: -40px; bottom: -40px; width: 160px; height: 160px; border-radius: 50%; background: rgba(255,255,255,.1); pointer-events: none; }
.carnet-top { display: flex; align-items: center; justify-content: space-between; padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px solid rgba(255,255,255,.2); }
.carnet-brand { display: flex; align-items: center; gap: 8px; }
.carnet-brand i { font-size: 24px; }
.carnet-brand span { font-size: 18px; font-weight: 700; letter-spacing: .05em; }
.cp { padding: 4px 10px; border-radius: 999px; font-size: 10px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; }
.cp-ok { background: #047857; border: 1px solid #34d399; }
.cp-warn { background: #b45309; border: 1px solid #fbbf24; }
.cp-bad { background: #e11d48; border: 1px solid #fb7185; }
.cp-none { background: rgba(100,116,139,.8); border: 1px solid transparent; }
.carnet-pet { display: flex; align-items: center; gap: 16px; }
.carnet-pet img { flex: none; width: 80px; height: 80px; border-radius: 16px; object-fit: cover; background: rgba(255,255,255,.2); border: 2px solid rgba(255,255,255,.5); }
.carnet-pet h2 { margin: 0; font-size: 20px; font-weight: 600; line-height: 1.15; }
.carnet-pet p { margin: 2px 0 0; font-size: 12px; color: rgba(255,255,255,.85); }
.carnet-pet p.carnet-id { display: inline-block; margin-top: 8px; padding: 2px 8px; border-radius: 8px; font: 11px ui-monospace, monospace; color: #fff; background: rgba(0,0,0,.2); }
.carnet-qr { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; padding: 12px; border-radius: 16px; text-align: left; color: #1e293b; background: #fff; }
.carnet-qr b { display: block; font-size: 10px; font-weight: 700; }
.carnet-qr span { display: block; margin-top: 2px; font-size: 10px; color: #64748b; }
#carnet-qrcode { padding: 6px; border-radius: 12px; background: #f1f5f9; }

/* ---------- Pie ---------- */
.pie { position: relative; overflow: hidden; width: 100%; max-width: 384px; margin: 16px 0 4px; padding: 16px 14px 10px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 12px; text-align: center; font-size: 12px; color: #ead8b8; background: rgba(26,14,9,.68); border: 1px solid rgba(248,237,209,.14); border-radius: 20px; }
.pie::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px; background: var(--awayo) repeat-x left center / auto 6px; opacity: .85; animation: tejer .9s .6s cubic-bezier(.45,0,.2,1) both; }
.pie .soporte { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; font-weight: 600; color: #a7f3d0; background: rgba(16,185,129,.16); border: 1px solid rgba(110,231,183,.45); transition: background .15s; }
.pie .soporte:hover { background: rgba(16,185,129,.28); }
.pie small { flex-basis: 100%; font-size: 10.5px; color: #a8917a; }
.pie .legal { color: inherit; font-weight: 500; text-decoration: underline; }

/* ---------- Barra de contacto flotante (aparece al bajar más allá de la tarjeta del dueño) ---------- */
.dock { position: fixed; left: 50%; bottom: 0; z-index: 40; width: min(384px, calc(100% - 24px)); margin-bottom: calc(10px + env(safe-area-inset-bottom)); padding: 14px 8px 8px; display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 8px; overflow: hidden; border-radius: 22px; background: rgba(41,23,13,.84); border: 1px solid rgba(248,237,209,.18); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 18px 40px -12px rgba(0,0,0,.75); transform: translate(-50%, calc(100% + 40px)); transition: transform .38s cubic-bezier(.2,.8,.2,1); }
.dock::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px; background: var(--awayo) repeat-x left center / auto 6px; }
.dock.ver { transform: translate(-50%, 0); }
.dock.ver::before { animation: tejer .55s .15s cubic-bezier(.45,0,.2,1) both; }

/* ---------- Aviso breve (reemplaza a los alert) ---------- */
/* Mixtura: chakanas, rombos y huellitas que saltan y caen como en el carnaval andino (ver lanzarFiguras) */
.figura { position: fixed; z-index: 70; pointer-events: none; display: grid; place-items: center; filter: drop-shadow(0 1px 1px rgba(255,253,248,.9)) drop-shadow(0 3px 4px rgba(59,36,32,.3)); }
.figura svg { display: block; width: 100%; height: 100%; }
/* Sello bordado: al tocar un espacio vacío queda una huellita dentro de un rombo o una chakana con puntadas */
.sello-bordado { position: fixed; z-index: 70; pointer-events: none; width: 46px; height: 46px; display: grid; place-items: center; font-size: 15px; color: rgba(180,69,43,.8); --r: 0deg; animation: estampa 1.5s ease-out forwards; }
.sello-bordado.clara { color: rgba(248,237,209,.75); }
.sello-bordado svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.sello-bordado path { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-dasharray: 3.5 3; stroke-linecap: round; animation: puntada .9s linear infinite; }

.toast { position: fixed; left: 50%; bottom: calc(100px + env(safe-area-inset-bottom)); z-index: 60; width: max-content; max-width: min(340px, calc(100% - 32px)); padding: 11px 16px 11px 14px; display: flex; align-items: center; gap: 9px; border-radius: 16px; font-size: 13.5px; font-weight: 500; line-height: 1.3; color: var(--crema); background: #2b1a12; border: 1px solid rgba(224,162,74,.45); box-shadow: 0 16px 34px -10px rgba(0,0,0,.7); opacity: 0; pointer-events: none; transform: translate(-50%, 16px); transition: opacity .25s, transform .3s cubic-bezier(.2,.8,.2,1); }
.toast.ver { opacity: 1; transform: translate(-50%, 0); }
.toast { overflow: hidden; }
.toast::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px; background: var(--awayo) repeat-x left center / auto 5px; }
.toast.ver::before { animation: tejer .5s .1s cubic-bezier(.45,0,.2,1) both; }
.toast i { flex: none; font-size: 17px; color: var(--ocre); }
.toast.ok i { color: #34d399; }
.toast.error i { color: #fb7185; }

/* ---------- Ventanas (modales) ---------- */
.modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(20,10,6,.84); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); animation: velo .2s ease-out both; }
.sheet { position: relative; overflow: hidden; width: 100%; max-width: 320px; padding: 30px 18px 18px; display: grid; gap: 12px; text-align: center; background: #fffdf8; border: 1px solid var(--arena); border-radius: 24px; box-shadow: 0 30px 60px -20px rgba(0,0,0,.7); animation: surgir .32s cubic-bezier(.2,.8,.2,1) both; }
.sheet::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 8px; background: var(--awayo) repeat-x left center / auto 8px; animation: tejer .6s .12s cubic-bezier(.45,0,.2,1) both; }
.sheet h3 { margin: 0; font-size: 17px; font-weight: 600; color: var(--cafe); }
.sheet p { margin: 3px 0 0; font-size: 12.5px; color: var(--suave); }
.sheet .paso { display: grid; gap: 12px; }
.fld.center.codigo { font-size: 20px; letter-spacing: .15em; }
.fld.center.ph::placeholder { letter-spacing: .02em; font: 500 15px 'Fredoka', system-ui, sans-serif; }
.x { position: absolute; top: 16px; right: 10px; width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: 50%; background: #f3eadb; color: var(--suave); font-size: 14px; cursor: pointer; transition: transform .2s; }
.x:hover { transform: rotate(90deg); }

#modal-medico { align-items: flex-end; padding: 0; }
.hoja { width: 100%; max-width: 440px; max-height: 86vh; max-height: 86dvh; display: flex; flex-direction: column; overflow: hidden; background: #fffdf8; border-radius: 26px 26px 0 0; box-shadow: 0 -20px 50px -20px rgba(0,0,0,.6); animation: deslizar .38s cubic-bezier(.2,.8,.2,1) both; }
.hoja::before { content: ""; flex: none; height: 8px; background: var(--awayo) repeat-x left center / auto 8px; animation: tejer .6s .2s cubic-bezier(.45,0,.2,1) both; }
@media (min-width: 640px) { #modal-medico { align-items: center; padding: 16px; } .hoja { border-radius: 26px; animation-name: surgir; } }
.hoja-h { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: linear-gradient(to right, #fffaf0, #fff); border-bottom: 1px solid #f3eadb; }
.hoja-h .ttl small { font-size: 9.5px; }
.hoja-h h3 { margin: 0; font-size: 15px; font-weight: 600; color: var(--cafe); line-height: 1.15; }
.hoja-h .btn { width: auto; padding: 7px 12px; font-size: 12.5px; border-radius: 12px; }
.hoja-h .x { position: static; flex: none; }
.hoja-h { position: relative; touch-action: none; cursor: grab; }   /* se arrastra hacia abajo para cerrar */
.asa { position: absolute; left: 50%; top: 4px; width: 38px; height: 4px; margin-left: -19px; border-radius: 4px; background: #e2d3bd; }
@media (min-width: 640px) { .asa { display: none; } }
#modal-medical-list { flex: 1; overflow-y: auto; padding: 12px 14px; display: grid; gap: 8px; align-content: start; }
.hoja-vet { margin: 0 14px 12px; }
.hoja-nota { margin: 0; padding: 8px 14px 10px; border-top: 1px solid #f3eadb; font-size: 10.5px; color: var(--suave); }
/* Historial como línea de tiempo: hilo punteado y una cuenta por consulta */
.linea { display: grid; gap: 8px; margin-left: 9px; padding-left: 16px; border-left: 2px dashed #e7cfa5; }
.rec { position: relative; display: grid; gap: 4px; padding: 10px 12px; text-align: left; background: #fffaf0; border: 1px solid #f3e3c4; border-radius: 16px; animation: subir .4s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i, 0) * 60ms); }
.rec::before { content: ""; position: absolute; left: -24px; top: 16px; width: 12px; height: 12px; border-radius: 50%; background: var(--ocre); border: 3px solid #fffdf8; box-shadow: 0 0 0 1.5px #e7cfa5; }
.rec:first-child::before { background: var(--oxido); }
.rec-h { display: flex; align-items: center; gap: 8px; }
.rec-h b { flex: 1; min-width: 0; font-size: 12.5px; font-weight: 600; text-transform: uppercase; color: var(--cafe); overflow-wrap: anywhere; }
.rec p { margin: 0; font-size: 12.5px; color: #4a3b33; overflow-wrap: anywhere; }
.rec p i { width: 14px; margin-right: 3px; text-align: center; color: #d97706; }
.rec p.next { font-weight: 500; color: #047857; }
.rec p.next i { color: #059669; }
.lista-vacia { padding: 22px 12px; text-align: center; font-size: 12.5px; color: var(--suave); background: #fffaf0; border: 1.5px dashed #ecd9b6; border-radius: 16px; }
.lista-vacia i { display: block; margin-bottom: 4px; font-size: 22px; color: #e0b66a; }
.lista-vacia b { display: block; font-weight: 600; color: var(--cafe); }

#photo-modal { background: rgba(0,0,0,.9); cursor: zoom-out; }
.foto-grande { position: relative; width: 100%; max-width: 384px; text-align: center; cursor: default; }
.foto-grande .x { top: -42px; right: 0; width: 38px; height: 38px; background: rgba(40,28,24,.85); color: #fff; font-size: 18px; animation: velo .3s .25s both; }
.foto-grande img { display: block; width: 100%; max-height: 80vh; object-fit: contain; border-radius: 24px; border: 2px solid rgba(255,255,255,.2); box-shadow: 0 25px 50px -12px rgba(0,0,0,.6); will-change: transform; }   /* crece desde la foto de la tarjeta (zoomFoto) */

/* ---------- Afiche «¡SE BUSCA!» ----------
   Se exporta como imagen con html2canvas: solo colores, degradados lineales, bordes (también de puntadas),
   sombras, imágenes y SVG con colores fijos; nada de máscaras, recortes ni degradados cónicos. */
#afiche-modal { flex-direction: column; justify-content: flex-start; overflow-y: auto; background: rgba(20,10,6,.92); }
#afiche-modal > :first-child { margin-top: auto; }
#afiche-modal > :last-child { margin-bottom: auto; }
.barra { flex: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 14px; }
.barra .btn { width: auto; padding: 9px 14px; font-size: 13px; border-radius: 12px; }
.btn-img { background: linear-gradient(135deg, #047857, #065f46); box-shadow: 0 6px 14px -6px rgba(6,95,70,.7); }
.btn-gris { background: #4b3a33; }
#afiche-modal .poster { animation: surgir .4s cubic-bezier(.2,.8,.2,1) both; }
.poster { flex: none; position: relative; width: 100%; max-width: 384px; overflow: hidden; text-align: center; color: var(--tinta); font-family: 'Fredoka', system-ui, sans-serif;
  background-color: #fbf6e3; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Cpath d='M20 12l8 8-8 8-8-8z' fill='none' stroke='%23ecdcbf' stroke-width='1.5'/%3E%3Cpath d='M0 0l4 4-4 4zM40 0l-4 4 4 4zM0 40l4-4-4-4zM40 40l-4-4 4-4z' fill='%23ecdcbf'/%3E%3C/svg%3E"); border-radius: 22px; box-shadow: 0 25px 50px -12px rgba(0,0,0,.5);
  -webkit-print-color-adjust: exact; print-color-adjust: exact; }   /* al imprimir salen los colores y las franjas */
.poster-franja { height: 14px; background: var(--awayo) repeat-x left center / auto 14px; }
.poster-franja.delgada { height: 8px; background-size: auto 8px; }
.poster-cab { padding: 14px 14px 12px; color: var(--crema); background: linear-gradient(135deg, #c0392b, #8f3523); }
.poster-titulo { display: flex; align-items: center; justify-content: center; gap: 10px; }
.poster-titulo h2 { margin: 0; font: 800 clamp(28px, 10.5vw, 40px)/1 'DynaPuff', 'Fredoka', sans-serif; letter-spacing: .03em; white-space: nowrap; color: #fff3d6; text-shadow: 0 3px 0 #3b2420, 0 6px 12px rgba(0,0,0,.35); }
.poster-titulo svg { flex: none; width: clamp(18px, 6vw, 26px); height: clamp(18px, 6vw, 26px); }
.poster-cab p { margin: 7px 0 0; font-size: 12.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #ffe8c4; }
.poster-cuerpo { padding: 16px 16px 14px; display: grid; gap: 10px; justify-items: center; }
/* Foto en un marco tejido */
.poster-marco { padding: 8px; border-radius: 22px; background: var(--awayo) repeat left top / auto 12px; box-shadow: 0 12px 24px -10px rgba(59,36,32,.55); }
.poster-marco img { display: block; width: 220px; height: 250px; object-fit: cover; border-radius: 15px; border: 3px solid #fbf6e3; background: #fff1d6; }
#poster-pet-name { margin: 2px 0 0; font: 800 32px/1.05 'DynaPuff', 'Fredoka', sans-serif; letter-spacing: .04em; text-transform: uppercase; color: var(--cafe); text-shadow: 0 2px 0 #fff, 0 4px 0 var(--arena); overflow-wrap: anywhere; }
/* Señas, dónde y cuándo: casillas con borde de puntadas */
.poster-datos { width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 6px; }
.poster-datos div { padding: 6px 4px; border-radius: 12px; background: #fff; border: 1.5px dashed #e0b66a; font-size: 12px; font-weight: 600; line-height: 1.2; color: var(--cafe); overflow-wrap: anywhere; }
.poster-datos small, .poster-pista small { display: block; margin-bottom: 1px; font-size: 9px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--oxido); }
.poster-pistas { width: 100%; display: grid; gap: 6px; }
.poster-pista { display: flex; align-items: center; gap: 9px; padding: 7px 10px; text-align: left; border-radius: 12px; background: #fff; border: 1.5px dashed #e0b66a; }
.poster-pista svg { flex: none; width: 20px; height: 20px; }
.poster-pista b { display: block; font-size: 14px; font-weight: 600; line-height: 1.2; color: #4a2a2a; overflow-wrap: anywhere; }
.poster-recompensa { width: 100%; margin: 0; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 10px; border-radius: 14px; font-size: 15px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #5b2a0e; background: linear-gradient(135deg, #fde68a, #e0a24a); border: 2px dashed #8f3523; }
.poster-recompensa svg { flex: none; width: 20px; height: 20px; }
.poster-llama { margin: 2px 0 0; font-size: 12.5px; font-weight: 600; color: var(--suave); }
.poster-tel { width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 11px 14px; border-radius: 999px; background: linear-gradient(135deg, #3b2420, #6b3a2c); border: 3px solid #e0a24a; box-shadow: 0 10px 18px -8px rgba(59,36,32,.6); }
.poster-tel svg { flex: none; width: 26px; height: 26px; }
#poster-phone-num { font: 800 clamp(18px, 6vw, 24px) ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .03em; white-space: nowrap; color: #fff3d6; }
.poster-qr { width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px; text-align: left; border-radius: 16px; background: #fff; border: 1.5px dashed #e0b66a; }
#poster-qr { flex: none; padding: 4px; background: #fff; border-radius: 8px; }
#poster-qr img, #poster-qr canvas { width: 72px; height: 72px; }   /* se dibuja a 216 px: nítido en la imagen y en papel */
.poster-qr b { display: block; font-size: 12.5px; font-weight: 700; line-height: 1.25; color: var(--cafe); }
.poster-qr span { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 10px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--suave); }
.poster-qr span img { width: 22px; height: 22px; border-radius: 50%; }
/* Para imprimir (clase que pone prepararImpresion): hoja ancha en dos columnas, foto | datos, que llena una A4.
   La imagen que se comparte sigue siendo la vertical, cómoda en el celular */
.poster.impreso { width: 600px; max-width: none; }
.poster.impreso .poster-cuerpo { grid-template-columns: auto minmax(0,1fr); grid-template-rows: auto auto auto 1fr; align-items: start; justify-items: stretch; column-gap: 18px; }
.poster.impreso .poster-recompensa { align-self: end; }   /* los datos quedan juntos arriba y la recompensa al pie de la foto */
.poster.impreso .poster-marco { grid-row: span 4; }
.poster.impreso .poster-marco img { width: 270px; height: 380px; }
.poster.impreso #poster-pet-name { text-align: left; font-size: 36px; }
.poster.impreso .poster-llama, .poster.impreso .poster-tel, .poster.impreso .poster-qr { grid-column: 1 / -1; }
/* Más grande en papel: título, datos, teléfono y QR */
.poster.impreso .poster-cab { padding: 18px 16px 14px; }
.poster.impreso .poster-titulo h2 { font-size: 48px; }
.poster.impreso .poster-titulo svg { width: 30px; height: 30px; }
.poster.impreso .poster-cab p { font-size: 14px; }
.poster.impreso .poster-cuerpo { gap: 12px; padding: 18px 18px 16px; }
.poster.impreso .poster-datos div { font-size: 13px; }
.poster.impreso .poster-pista b { font-size: 16px; }
.poster.impreso .poster-llama { font-size: 14px; }
.poster.impreso .poster-tel { padding: 14px; }
.poster.impreso .poster-tel svg { width: 32px; height: 32px; }
.poster.impreso #poster-phone-num { font-size: 32px; }
.poster.impreso .poster-qr b { font-size: 15px; }
.poster.impreso #poster-qr img, .poster.impreso #poster-qr canvas { width: 100px; height: 100px; }

@media print {
  @page { margin: 10mm; }
  html, body { background: #fff !important; overflow: visible !important; }
  body::before { display: none !important; }
  /* Solo se imprime el afiche, grande y centrado en la hoja */
  body { display: block !important; min-height: 0 !important; padding: 0 !important; }
  body > *:not(#afiche-modal) { display: none !important; }
  #afiche-modal { position: static; display: block; padding: 0; overflow: visible; background: none; -webkit-backdrop-filter: none; backdrop-filter: none; animation: none; }
  .no-print { display: none !important; }
  #printable-poster { zoom: var(--zoom-afiche, 1.25); max-width: none; margin: 0 auto; box-shadow: none; break-inside: avoid; animation: none; }
}
