/* IA Kids & Teens — pasaporte real y rangos («Rangos y pasaporte» v1.0, reemplaza las secciones 06 y 07 de la guía de estilo)
 * Portadas: Explorers azul marino #1D2B5E · Creators vino #4A1030 · dorado de estampado #E4C77A.
 * Páginas en crema #FBF8F1 con guilloché de óvalos entrelazados (14 × 22 px, trazo 0,6 px #E7D8BE).
 * El papel del pasaporte es papel: se mantiene claro también en el tema oscuro.
 */
:root {
  --pp-cream: #FBF8F1; --pp-guil: #E7D8BE; --pp-gold: #E4C77A; --pp-ink2: #23284A; --pp-soft: #6B6E86;
  --holo: linear-gradient(135deg, #9FE6C4, #E7D59A 30%, #F3AEDB 55%, #A9D8F0 80%, #B7F0D0);
  --guil: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='22'%3E%3Cg fill='none' stroke='%23E7D8BE' stroke-width='.6'%3E%3Cellipse cx='7' cy='11' rx='7' ry='11'/%3E%3Cellipse cx='0' cy='0' rx='7' ry='11'/%3E%3Cellipse cx='14' cy='0' rx='7' ry='11'/%3E%3Cellipse cx='0' cy='22' rx='7' ry='11'/%3E%3Cellipse cx='14' cy='22' rx='7' ry='11'/%3E%3C/g%3E%3C/svg%3E");
  --guil-w: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='22'%3E%3Cg fill='none' stroke='%23FFFFFF' stroke-opacity='.55' stroke-width='.6'%3E%3Cellipse cx='7' cy='11' rx='7' ry='11'/%3E%3Cellipse cx='0' cy='0' rx='7' ry='11'/%3E%3Cellipse cx='14' cy='0' rx='7' ry='11'/%3E%3Cellipse cx='0' cy='22' rx='7' ry='11'/%3E%3Cellipse cx='14' cy='22' rx='7' ry='11'/%3E%3C/g%3E%3C/svg%3E");
  --leather: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.1' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .35 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ───────── Visor ───────── */
.ppv-page { max-width: 760px; margin-inline: auto; }
.ppv { display: flex; flex-direction: column; gap: 14px; }
.ppv-top { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.ppv-title { font-size: 1.35rem; margin: 0; }
.ppv-sel { position: relative; display: inline-flex; align-items: center; }
.ppv-sel select { text-align: center; text-align-last: center; width: auto; min-width: 0; box-shadow: none; appearance: none; font: 700 1.2rem var(--font); color: var(--ink); background: none; border: 0; padding: 4px 30px 4px 8px; border-radius: 10px; cursor: pointer; }
.ppv-sel svg { position: absolute; right: 6px; pointer-events: none; width: 20px; height: 20px; }
.ppv-sel select:focus-visible { outline: 3px solid var(--violet); }
.ppv-dots { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; max-width: 100%; }
.ppv-dot { width: 9px; height: 9px; border-radius: 99px; border: 0; padding: 0; background: var(--line-2); cursor: pointer; transition: width .2s, background .2s; }
.ppv-dot.is-visa { width: 7px; height: 7px; align-self: center; }
.ppv-dot.on { background: var(--violet); width: 20px; }
.ppv-dot:focus-visible { outline: 3px solid var(--violet); outline-offset: 2px; }
.ppv-count { min-height: 1.2em; }
.ppv-stage { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; --hx: 50%; --hy: 50%; }
.ppv-arrow { width: 44px; height: 44px; border-radius: 99px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow); }
.ppv-arrow:disabled { opacity: .35; cursor: default; }
.ppv-arrow:focus-visible { outline: 3px solid var(--violet); outline-offset: 2px; }
.ppv-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; border-radius: 18px; outline: none; perspective: 1400px; }
.ppv-track::-webkit-scrollbar { display: none; }
.ppv-track:focus-visible { outline: 3px solid var(--violet); outline-offset: 4px; }
.ppv-track.is-closed { overflow-x: hidden; }
.ppv-slide { flex: 0 0 100%; scroll-snap-align: center; display: grid; place-items: center; padding: 12px 14px 30px; }
.ppv-actions { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.ppv-back { min-width: min(100%, 320px); }
@media (max-width: 560px) {
  .ppv-stage { grid-template-columns: minmax(0, 1fr); }
  .ppv-arrow { display: none; }
}

/* ───────── Página ───────── */
.pgbox { width: min(100%, 380px); container-type: inline-size; }
.pg { position: relative; width: 100%; aspect-ratio: 88 / 125; border-radius: 6px 14px 14px 6px; overflow: hidden; color: var(--pp-ink2); font-family: var(--font); box-shadow: 0 1px 1px rgba(0, 0, 0, .06), 0 14px 26px -16px rgba(11, 18, 42, .38), inset 10px 0 14px -12px rgba(60, 40, 0, .25); }
.pg-paper { background-color: var(--pp-cream); background-image: var(--guil); padding: 6.5cqw 6cqw 5cqw; display: flex; flex-direction: column; gap: 3cqw; }
.pg-rep { display: block; text-align: center; font: 700 2.9cqw/1 var(--mono); letter-spacing: .28em; color: #8C7A55; }
.pg-foot { margin-top: auto; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.pg-foot .btn { background: rgba(255, 255, 255, .8); color: var(--pp-ink2); border-color: #D9CFB8; }

/* Portada: color sólido + ruido feTurbulence en blanco al 35 % (overlay) + sombra del lomo a la izquierda */
.ppc-box { container-type: inline-size; width: 100%; aspect-ratio: 88 / 125; }
.ppc-btn .ppc-box { height: 100%; }
.ppc { --cv: #1D2B5E; --gd: #E4C77A; position: relative; isolation: isolate; width: 100%; height: 100%; border-radius: 6px 16px 16px 6px; overflow: hidden; background: var(--cv); color: var(--gd); display: flex; flex-direction: column; align-items: center; padding: 11cqw 7cqw 8cqw; gap: 1.6cqw;
  box-shadow: inset 14px 0 18px -10px rgba(0, 0, 0, .55), inset -2px 0 0 rgba(255, 255, 255, .06), 0 22px 46px -20px rgba(0, 0, 0, .6); }
.ppc::before { content: ""; position: absolute; inset: 0; background-image: var(--leather); mix-blend-mode: overlay; z-index: -1; pointer-events: none; }
.ppc::after { content: ""; position: absolute; inset: 0 auto 0 0; width: 5.5%; background: linear-gradient(90deg, rgba(0, 0, 0, .35), rgba(0, 0, 0, 0)); pointer-events: none; }
.ppc-word { font: 800 13.6cqw/1 var(--font); letter-spacing: .02em; background: linear-gradient(180deg, #F1DC9E, var(--gd) 55%, #C9A955); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cv-negro .ppc-word { background: linear-gradient(180deg, #F2F4F8, #C9CDD6 60%, #9CA2AE); -webkit-background-clip: text; background-clip: text; }
.cv-dorada .ppc-word { background: none; color: var(--gd); }
.ppc-rep { font: 700 3.1cqw/1.2 var(--mono); letter-spacing: .24em; text-align: center; }
.ppc-ed { font: 800 2.9cqw/1 var(--font); letter-spacing: .3em; margin-top: 1cqw; padding: 1.2cqw 2.4cqw; border: 1px solid currentColor; border-radius: 99px; }
.ppc-crest { width: 64%; margin-top: 5cqw; }
.ppc-crest .crest, .pb-crest .crest { width: 100%; height: auto; display: block; }
.ppc-chip { width: 18%; margin-top: auto; }
.ppc-chip svg { width: 100%; height: auto; display: block; }
.cv-noche { background-image: radial-gradient(1.2px 1.2px at 12% 18%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 78% 12%, #fff 50%, transparent 51%), radial-gradient(1.4px 1.4px at 88% 44%, #E4C77A 50%, transparent 51%), radial-gradient(1px 1px at 22% 62%, #fff 50%, transparent 51%), radial-gradient(1.2px 1.2px at 70% 78%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 40% 90%, #E4C77A 50%, transparent 51%), radial-gradient(1px 1px at 52% 30%, #fff 50%, transparent 51%), radial-gradient(1.1px 1.1px at 8% 88%, #fff 50%, transparent 51%), radial-gradient(120% 80% at 50% 0%, #22306E 0, #121A3D 60%); }
.cv-esmeralda { background-image: radial-gradient(120% 90% at 30% 0%, #127257, #0E5A45 60%, #0A4535); }
.cv-dorada { background-image: linear-gradient(135deg, #B8943F, #F1DC9E 40%, #C9A955 62%, #EAD08E 82%, #B8943F); }
.cv-dorada::after { width: 100%; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .55) 45%, transparent 60%) no-repeat; background-size: 250% 100%; animation: ppShine 4.5s ease-in-out infinite; }
@keyframes ppShine { 0% { background-position: 130% 0; } 60%, 100% { background-position: -130% 0; } }
.cv-negro { background-image: radial-gradient(120% 90% at 30% 0%, #26262B, #17171A 65%); }
.ppc-void { clip-path: polygon(0 0, 78% 0, 100% 16%, 100% 100%, 0 100%); }
.ppc-sm { width: 190px; }
.ppc-xs { width: 74px; }
.ppc-xs .ppc { padding: 9px 4px 7px; gap: 1px; border-radius: 3px 8px 8px 3px; }
.ppc-xs .ppc-word { font-size: 10px; letter-spacing: 0; }
.ppc-xs .ppc-rep, .ppc-xs .ppc-ed { display: none; }
.ppc-xs .ppc-crest { width: 72%; margin-top: 7px; }

/* Portada cerrada: se abre con giro 3D sobre el lomo (500 ms) */
.pg-cover-wrap { position: relative; width: 100%; aspect-ratio: 88 / 125; perspective: 1600px; }
.pg-cover-wrap > .pg { position: absolute; inset: 0; width: 100%; }
.pg-inside { align-items: center; justify-content: center; text-align: center; gap: 6cqw; }
.pg-inside p { font-size: 3.6cqw; color: var(--pp-soft); margin: 0; max-width: 80%; }
.pg-inside .crest { width: 40%; opacity: .5; }
.ppc-btn { position: absolute; inset: 0; padding: 0; border: 0; background: none; cursor: pointer; transform-origin: left center; transform-style: preserve-3d; transition: transform .5s cubic-bezier(.4, .1, .3, 1); border-radius: 6px 16px 16px 6px; }
.ppc-btn:focus-visible { outline: 3px solid var(--violet); outline-offset: 4px; }
.ppc-btn.opening { transform: rotateY(-160deg); }
.ppc-btn:hover .ppc { filter: brightness(1.05); }

/* ───────── Página de datos ───────── */
.pg-datos { gap: 2.4cqw; }
.rosette { position: absolute; top: 7cqw; right: 4cqw; width: 30cqw; opacity: .55; pointer-events: none; }
.pd-top { display: flex; gap: 4cqw; align-items: flex-start; position: relative; }
.pd-photo { position: relative; flex: none; width: 34cqw; }
.pd-photo > .avatar { width: 34cqw; height: 34cqw; display: block; border-radius: 99px; box-shadow: 0 0 0 1.2cqw #fff, 0 0 0 1.6cqw #C9A955; }
.pd-photo .pd-medal { position: absolute; right: -1cqw; bottom: 0; --s: 11cqw !important; z-index: 2; }
.pd-pet { position: absolute; left: -2cqw; bottom: -2cqw; width: 12cqw; height: 12cqw; object-fit: contain; background: #fff; border-radius: 99px; border: 1px solid #D9CFB8; }
.pd-langs { list-style: none; margin: 0; padding: 0; font: 700 2.5cqw/1.34 var(--mono); letter-spacing: .12em; color: #B7A57F; }
.pp-wave { width: 100%; height: 5cqw; display: block; }
.pd-fields { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 2.2cqw 4cqw; padding-right: 9cqw; }
.pd-fields .span2 { grid-column: 1 / -1; }
.pd-fields dt { font: 700 2.3cqw/1 var(--mono); letter-spacing: .18em; color: #8C7A55; text-transform: uppercase; }
.pd-fields dd { margin: .8cqw 0 0; font: 700 4.1cqw/1.15 var(--font); letter-spacing: .02em; overflow-wrap: anywhere; }
.pd-fields dd.pd-big { font-size: 5.6cqw; }
.pd-fields dd.mono { font-family: var(--mono); font-size: 3.7cqw; }
.pd-sign dd { height: 17cqw; }
.pd-sign .firma { height: 100%; width: auto; max-width: 100%; display: block; }
.pd-nosign { font-size: 3cqw; color: var(--pp-soft); font-style: italic; }
.pd-mrz { position: absolute; top: 20cqw; right: 2.2cqw; bottom: 6cqw; writing-mode: vertical-rl; display: flex; gap: 1.2cqw; font: 500 2.6cqw/1 var(--mono); letter-spacing: .1em; color: #6F6A7E; white-space: nowrap; overflow: hidden; }
.pd-sticker { position: absolute; left: 64cqw; top: 70cqw; width: 19cqw; transform: rotate(-8deg); filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .2)); }
.pd-inkseal { position: absolute; right: 12cqw; bottom: 16cqw; width: 22cqw; transform: rotate(10deg); opacity: .78; mix-blend-mode: multiply; }
.holo-sticker, .ink-seal { width: 100%; height: auto; display: block; }

/* ───────── Ficha y sellos especiales ───────── */
.pf-list { margin: 0; display: grid; gap: 3cqw; }
.pf-list dt { font: 700 2.4cqw/1 var(--mono); letter-spacing: .18em; color: #8C7A55; text-transform: uppercase; }
.pf-list dd { margin: 1cqw 0 0; font: 600 3.9cqw/1.35 var(--font); }
.pf-draw { margin: 0; align-self: center; background: #fff; padding: 2cqw 2cqw 1cqw; box-shadow: 0 6px 14px -8px rgba(0, 0, 0, .35); transform: rotate(-3deg); width: 44cqw; }
.pf-draw img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; display: block; }
.pf-draw figcaption { font: 500 2.4cqw/1.3 var(--mono); text-align: center; color: var(--pp-soft); padding-top: 1cqw; }
.sp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4cqw 3cqw; }
.sp-item { --sc: #5647E7; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 1cqw; }
.sp-seal { width: 24cqw; height: 24cqw; border-radius: 99px; display: grid; place-items: center; color: var(--sc); border: .9cqw double var(--sc); box-shadow: inset 0 0 0 1.4cqw var(--pp-cream), inset 0 0 0 1.8cqw var(--sc); transform: rotate(-6deg); mix-blend-mode: multiply; }
.sp-seal svg { width: 9cqw; height: 9cqw; }
.sp-item strong { font-size: 3.4cqw; line-height: 1.2; }
.sp-item span:last-child { font-size: 2.7cqw; color: var(--pp-soft); }
.sp-gold .sp-seal { color: #8A6A1F; border-color: #B08A2E; background: radial-gradient(circle at 35% 30%, #FFF6D6, #F1DC9E 45%, #D8B862); box-shadow: inset 0 0 0 1.4cqw rgba(255, 255, 255, .5), 0 2px 6px rgba(120, 90, 20, .35); mix-blend-mode: normal; }
.sp-empty .sp-seal { border-style: dashed; border-width: .5cqw; box-shadow: none; color: #C5B899; --sc: #C5B899; }
.sp-empty strong, .sp-empty span:last-child { color: #A99C7E; }

/* ───────── Visas de misión ───────── */
.pg-visa { gap: 3cqw; }
.visa { --fam: #5647E7; position: relative; display: flex; flex-direction: column; gap: 2.6cqw; padding: 4cqw 4cqw 7cqw; border: 0; border-radius: 3cqw 3cqw 0 0; color: #1E2040; text-decoration: none; text-align: left; font: inherit; cursor: pointer; width: 100%;
  background: var(--guil-w), var(--holo); background-size: auto, 220% 220%; background-position: 0 0, var(--hx, 50%) var(--hy, 50%); transition: background-position .25s ease-out, transform .15s;
  -webkit-mask: linear-gradient(#000 0 0) top / 100% calc(100% - 2.2cqw) no-repeat, radial-gradient(circle at 2.2cqw 0, #000 2.2cqw, transparent calc(2.2cqw + .5px)) bottom / 4.4cqw 2.2cqw repeat-x;
  mask: linear-gradient(#000 0 0) top / 100% calc(100% - 2.2cqw) no-repeat, radial-gradient(circle at 2.2cqw 0, #000 2.2cqw, transparent calc(2.2cqw + .5px)) bottom / 4.4cqw 2.2cqw repeat-x; }
a.visa:hover, button.visa:hover { transform: translateY(-2px); }
.visa:focus-visible { outline: 3px solid var(--violet); outline-offset: 3px; }
.visa-hd { display: flex; justify-content: space-between; gap: 3cqw; align-items: flex-start; }
.visa-hd small, .visa-st small { display: block; font: 700 2.3cqw/1 var(--mono); letter-spacing: .16em; color: rgba(30, 32, 64, .7); }
.visa-hd strong { display: block; font: 800 4.6cqw/1.15 var(--font); margin-top: 1cqw; }
.visa-no { font: 700 2.8cqw/1 var(--mono); letter-spacing: .12em; white-space: nowrap; }
.visa-body { display: grid; grid-template-columns: 1fr 34cqw; gap: 3cqw; align-items: start; }
.visa-st strong { display: block; font: 800 4.2cqw/1.1 var(--font); margin: 1cqw 0; }
.visa-img { margin: 0; width: 34cqw; aspect-ratio: 1; border-radius: 3cqw; overflow: hidden; background: rgba(255, 255, 255, .7); display: grid; place-items: center; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .8); }
.visa-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.visa-img > * { width: 100%; height: 100%; }
.visa-img .illus, .visa-img .mission-art { border-radius: 0; }
.visa-seal { position: absolute; left: 22cqw; top: 26cqw; width: 30cqw; transform: rotate(-12deg); opacity: .85; mix-blend-mode: multiply; pointer-events: none; }
.visa-langs { font: 700 2cqw/1.5 var(--mono); letter-spacing: .06em; color: rgba(30, 32, 64, .72); padding-right: 22cqw; }
.visa-sticker { position: absolute; right: 3cqw; bottom: 5cqw; width: 19cqw; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .25)); overflow: hidden; border-radius: 99px; }
.visa-sticker::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .85) 50%, transparent 65%) no-repeat; background-size: 300% 100%; background-position: 150% 0; }
.v-way { background: var(--guil-w), linear-gradient(rgba(251, 248, 241, .6), rgba(251, 248, 241, .6)), var(--holo); background-size: auto, auto, 220% 220%; background-position: 0 0, 0 0, var(--hx, 50%) var(--hy, 50%); }
.v-way .visa-img { opacity: .6; }
.v-way:hover .visa-img, .v-way:focus-visible .visa-img { opacity: .85; }
.visa-way { align-self: flex-start; font: 700 2.8cqw/1 var(--mono); letter-spacing: .12em; padding: 1.4cqw 2.4cqw; border-radius: 99px; background: rgba(255, 255, 255, .8); }
.pencil-tag { position: absolute; right: 4cqw; bottom: 8cqw; transform: rotate(-4deg); font: 600 4.2cqw/1 'Comic Sans MS', 'Chalkboard SE', 'Segoe Print', var(--font); color: #3E3A5E; padding: 1.4cqw 3cqw; border: 1.5px solid #3E3A5E; border-radius: 3cqw 1cqw 3cqw 1cqw; background: rgba(255, 255, 255, .55); }
.v-pend { background: rgba(255, 255, 255, .6); border: 2px dashed #CDBF9F; border-radius: 3cqw; -webkit-mask: none; mask: none; align-items: center; padding: 4cqw 4cqw 6cqw; cursor: default; color: #8C7A55; }
.v-pend .visa-hd { width: 100%; }
.v-pend .visa-hd strong { color: #8C7A55; }
.visa-q { width: 26cqw; height: 26cqw; border-radius: 99px; border: 2px dashed #CDBF9F; display: grid; place-items: center; font: 800 12cqw/1 var(--font); color: #B7A57F; margin-top: 4cqw; }
.visa-when { margin: 2cqw 0 0; font: 600 3.6cqw/1.3 var(--font); text-align: center; }
.visa-wm { margin-top: auto; text-align: center; font: 800 11cqw/1 var(--font); letter-spacing: .08em; color: transparent; -webkit-text-stroke: 1px #E1D2B1; }
.visa-mrz { display: flex; flex-direction: column; gap: .8cqw; font: 500 2.9cqw/1 var(--mono); letter-spacing: .12em; color: #6F6A7E; white-space: nowrap; overflow: hidden; }
.v-pend + .visa-mrz { margin-top: auto; }

/* El momento de la visa: el sello cae con un golpe suave y el sticker brilla una vez */
.vm .visa-seal { animation: sealDrop .55s cubic-bezier(.2, 1.5, .45, 1) .45s both; }
.vm .visa { animation: thud .3s ease-out .9s; }
.vm .visa-sticker::after { animation: stickerShine 1.1s ease-in-out 1.2s 1 both; }
@keyframes sealDrop { from { transform: rotate(-12deg) scale(2.4); opacity: 0; } to { transform: rotate(-12deg) scale(1); opacity: .85; } }
@keyframes thud { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(3px); } }
@keyframes stickerShine { from { background-position: 150% 0; } to { background-position: -150% 0; } }
.vm-card { position: fixed; z-index: 60; left: 50%; transform: translateX(-50%); bottom: calc(24px + env(safe-area-inset-bottom, 0px)); width: min(calc(100% - 32px), 460px); background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 16px 18px; text-align: center; box-shadow: 0 20px 50px -18px rgba(11, 18, 42, .55); display: flex; flex-direction: column; gap: 6px; animation: vmUp .35s ease-out 1.6s both; }
.vm-card p { margin: 0 0 6px; }
.vm-t { font-size: 1.25rem; }
@media (max-width: 960px) { .vm-card { bottom: calc(86px + env(safe-area-inset-bottom, 0px)); } }
@keyframes vmUp { from { opacity: 0; transform: translate(-50%, 16px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ───────── Contraportada ───────── */
.pg-back { padding: 12cqw 9cqw; gap: 5cqw; justify-content: center; text-align: center; }
.pb-crest { width: 36%; opacity: .9; }
.pb-own { font: 600 4.2cqw/1.45 var(--font); margin: 0; }
.pb-own strong { font-weight: 800; }
.pb-no { font: 700 3.4cqw/1 var(--mono); letter-spacing: .2em; }
.pb-closed { font: 600 2.8cqw/1.3 var(--mono); letter-spacing: .1em; opacity: .85; }

/* ───────── Rangos: medalla ───────── */
.rk-medal { --s: 56px; position: relative; flex: none; display: inline-grid; place-items: center; width: var(--s); height: var(--s); vertical-align: middle; }
.rk-face { position: relative; z-index: 1; width: 100%; height: 100%; border-radius: 99px; display: grid; place-items: center; color: #5A4210; background: radial-gradient(circle at 34% 28%, #FFF4CF, #F1DC9E 38%, #D6B35C 70%, #B08A2E); box-shadow: inset 0 0 0 calc(var(--s) * .06) rgba(255, 255, 255, .45), inset 0 calc(var(--s) * -.05) calc(var(--s) * .08) rgba(120, 80, 10, .35), 0 2px 5px rgba(80, 60, 10, .3); }
.rk-face svg { width: 48%; height: 48%; stroke-width: 2.2; }
.rk-ribbon { position: absolute; left: 50%; bottom: calc(var(--s) * -.28); width: calc(var(--s) * .56); height: calc(var(--s) * .5); transform: translateX(-50%); background: linear-gradient(90deg, var(--rk1) 0 50%, var(--rk2) 50%); clip-path: polygon(0 0, 100% 0, 100% 100%, 75% 80%, 50% 100%, 25% 80%, 0 100%, 0 0); }
.rk-exp { --rk1: #1D2B5E; --rk2: #5647E7; }
.rk-cre { --rk1: #4A1030; --rk2: #B02F8C; }
.rk-n5 .rk-face { background: radial-gradient(circle at 34% 28%, #FFFFFF, #FFF0B8 30%, #E9C75A 62%, #B08A2E); }
.rk-medal.spin .rk-face { animation: medalSpin 1.2s cubic-bezier(.3, .8, .3, 1) .2s 1 both; }
@keyframes medalSpin { from { transform: rotateY(0) scale(.6); } 70% { transform: rotateY(340deg) scale(1.06); } to { transform: rotateY(360deg) scale(1); } }
.side-rank { display: inline-flex; align-items: center; gap: 6px; }
.side-rank .rk-ribbon { display: none; }

.rankup { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.rk-stage { padding: 12px 0 30px; perspective: 600px; }
.rankup h2 { margin: 0; font-size: 1.5rem; text-wrap: balance; }
.rk-phrase { font-size: 1.05rem; margin: 0; text-wrap: balance; }
.rk-gifts { display: grid; gap: 10px; width: 100%; }
.rk-gift { display: flex; align-items: center; gap: 12px; text-align: left; background: var(--surface-2); border-radius: 16px; padding: 10px 12px; }
.rk-gift small { display: block; font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.rk-gift em { display: block; font-style: normal; font-size: .82rem; color: var(--violet); }
.rk-pp { width: 88px; height: 88px; flex: none; border-radius: 16px; display: grid; place-items: center; background: #1D2B5E; color: var(--pp-gold); }
.rk-cre .rk-pp { background: #4A1030; }
.rk-pp svg { width: 40px; height: 40px; }

.rk-path { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 10px; }
.rk-step { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: start; padding: 12px 12px 18px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); }
.rk-step.cur { border-color: var(--violet); box-shadow: 0 0 0 2px var(--violet-soft); }
.rk-step.next .rk-face { filter: grayscale(.9) opacity(.55); }
.rk-step.next .rk-ribbon { opacity: .35; }
.rk-q { margin: 2px 0 6px; font-style: italic; color: var(--ink-2); }
.rk-rw { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: .85rem; }
.rk-rw li { display: flex; gap: 6px; align-items: flex-start; }
.rk-rw svg { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--violet); }
.rk-lock svg { width: 18px; height: 18px; color: var(--muted); }
.lv-row .rk-medal { margin-bottom: 10px; }

/* ───────── Mi perfil → Mi pasaporte ───────── */
.cv-pick { display: flex; flex-wrap: wrap; gap: 12px; }
.cv-opt { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px; border-radius: 16px; border: 2px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; width: 118px; text-align: center; }
.cv-opt span { font-weight: 600; font-size: .82rem; line-height: 1.2; }
.cv-opt small { font-size: .74rem; color: var(--muted); display: inline-flex; align-items: center; gap: 4px; }
.cv-opt small svg { width: 12px; height: 12px; }
.cv-opt.sel { border-color: var(--violet); box-shadow: 0 0 0 3px var(--violet-soft); }
.cv-opt:disabled { cursor: not-allowed; opacity: .6; }
.cv-opt:disabled .ppc { filter: grayscale(.8); }
.cv-opt:focus-visible, .ink-opt:focus-visible { outline: 3px solid var(--violet); outline-offset: 2px; }
.ink-pick { display: flex; flex-wrap: wrap; gap: 10px; }
.ink-opt { width: 40px; height: 40px; border-radius: 99px; border: 3px solid var(--surface); background: var(--ink); box-shadow: 0 0 0 2px var(--line-2); cursor: pointer; }
.ink-opt.sel { box-shadow: 0 0 0 3px var(--violet); }
.firma-prev { display: inline-block; background: var(--pp-cream); border-radius: 10px; padding: 4px 10px; height: 54px; }
.firma-prev .firma { height: 100%; width: auto; }
.old-pp { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.old-pp li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.old-mini .ppc-xs { width: 48px; }
.old-mini .ppc-xs .ppc { padding: 6px 3px 5px; }
.old-mini .ppc-xs .ppc-word { font-size: 6.4px; }
.old-mini .ppc-xs .ppc-crest { margin-top: 4px; }
.rn-old, .rn-new { container-type: inline-size; }

/* Firma con el dedo */
.sig-pad { position: relative; background: var(--pp-cream); background-image: var(--guil); border: 1px solid #E1D6BD; border-radius: 14px; aspect-ratio: 300 / 110; width: 100%; max-width: 520px; }
.sig-pad canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: crosshair; border-radius: 14px; }
.sig-line { position: absolute; left: 8%; right: 8%; bottom: 22%; border-bottom: 1.5px dashed #BFAF8C; pointer-events: none; }
.sig-hint { position: absolute; left: 8%; bottom: 8%; font: 700 .7rem var(--mono); letter-spacing: .2em; color: #A99C7E; text-transform: uppercase; pointer-events: none; }
.sig-pad.has .sig-hint { opacity: 0; }

/* Registro, paso 9 */
.issue-cover { animation: pop .6s ease-out; }
.issue .card { width: 100%; text-align: left; }

/* Espacio familiar: renovación */
.renew-fam { margin-top: 12px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.renew-fam.is-ready { border: 2px solid var(--violet); background: var(--violet-soft); }

/* ───────── Ceremonia de renovación ───────── */
.modal-renew .modal-backdrop { background: rgba(4, 6, 20, .92); }
.modal-renew .modal-card { background: #0A0D26; color: #fff; width: min(100%, 560px); align-items: center; text-align: center; min-height: min(620px, calc(100vh - 32px)); justify-content: center; }
.renew { display: flex; flex-direction: column; align-items: center; gap: 18px; width: 100%; }
.rn-1 { font-size: 1.25rem; font-weight: 700; margin: 0; text-wrap: balance; animation: fadeIn .8s ease-out both; }
.rn-1 span { color: var(--pp-gold); }
.rn-stage { position: relative; width: 100%; height: 330px; perspective: 1400px; }
.rn-old, .rn-new { position: absolute; top: 10px; left: 50%; width: 190px; transform: translateX(-50%); transition: transform .9s cubic-bezier(.4, .1, .3, 1), opacity .9s, clip-path .6s; }
.rn-old .ppc { transition: clip-path .6s ease-in; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 0 0); }
.renew.p2 .rn-old .ppc { clip-path: polygon(0 0, 76% 0, 100% 17%, 100% 100%, 0 100%); }
.renew.p3 .rn-old { transform: translateX(calc(-50% - 88px)) rotate(-8deg) scale(.8); opacity: .8; }
.rn-new { opacity: 0; transform: translateX(10%) scale(.9); }
.renew.p3 .rn-new { opacity: 1; transform: translate(calc(-50% + 58px), 40px) rotate(4deg) scale(.92); }
.rn-new > .pg, .rn-new > .ppc-box { position: absolute; inset: 0 auto auto 0; width: 190px; aspect-ratio: 88 / 125; }
.rn-new .rn-cover { transform-origin: left center; transition: transform .6s cubic-bezier(.4, .1, .3, 1); backface-visibility: hidden; }
.renew.p3b .rn-new .rn-cover { transform: rotateY(-160deg); }
.rn-inside { justify-content: flex-start; align-items: center; }
.rn-seal { width: 62%; margin-top: 12cqw; transform: rotate(-12deg) scale(2.4); opacity: 0; mix-blend-mode: multiply; transition: transform .45s cubic-bezier(.2, 1.5, .45, 1) .35s, opacity .3s .35s; }
.renew.p3b .rn-seal { transform: rotate(-12deg) scale(1); opacity: .9; }
.rn-4 { opacity: 0; transform: translateY(10px); transition: opacity .6s, transform .6s; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.rn-4 h2 { margin: 0; font-size: 1.6rem; }
.rn-4 p { margin: 0; color: #C9CCF2; }
.rn-4 .small { max-width: 44ch; }
.renew.p4 .rn-4 { opacity: 1; transform: none; }
.rn-skip { color: #9EA3D6; font-size: .85rem; background: none; border: 0; text-decoration: underline; cursor: pointer; }
.rn-static .rn-old, .rn-static .rn-new, .rn-static .rn-seal, .rn-static .rn-4, .rn-static .rn-cover, .rn-static .ppc { transition: none !important; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Con «reducir animaciones», el pasaporte se abre sin giro */
.reduce-motion .ppc-btn, .reduce-motion .rn-cover { transition: none !important; }
.reduce-motion .cv-dorada::after { animation: none; }
@media (prefers-reduced-motion: reduce) { .ppc-btn, .rn-old, .rn-new, .rn-cover, .rn-seal { transition: none !important; } .cv-dorada::after, .rk-medal.spin .rk-face { animation: none; } }
.renew-fam fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.renew-fam legend { padding: 0; margin-bottom: 6px; }
#mi-pasaporte h3 { margin-top: 10px; }
.issue-pp .row { justify-content: center; text-align: left; align-items: center; }
.issue-pp .stack-s { align-items: center; }
