/* ============================================================
   Aparicio · v4 · app de familia
   ============================================================ */

@font-face{
  font-family:"Montserrat";
  src:url("montserrat.woff2") format("woff2");
  font-weight:100 900;
  font-style:normal;
  font-display:swap;
}

:root{
  --bg:#f6f8fb;
  --surface:#ffffff;
  --ink:#1b2430;
  --muted:#5f6d7e;
  --muted-2:#7e8b9c;
  --line:#e5eaf1;
  --brand:#1f6f63;
  --brand-2:#2a8274;
  --brand-soft:#e6f3ef;
  --coral:#e86152;
  --coral-soft:#ffede8;
  --amber:#d99a2b;
  --amber-soft:#fff5dd;
  --blue:#4f7df3;
  --blue-soft:#eaf1ff;
  --lilac:#8b7be8;
  --lilac-soft:#f0edff;
  --rose:#e85d8a;
  --rose-soft:#ffeaf1;
  --shadow:0 8px 24px -18px rgba(27,36,48,.28);
  --shadow-lg:0 24px 54px -30px rgba(27,36,48,.38);
  --radio:16px;
  --barra-h:64px;
  /* compatibilidad con v2/v3 */
  --papel:var(--bg);
  --papel-2:#edf2f7;
  --papel-3:#e1e8f0;
  --tinta:var(--ink);
  --tinta-2:var(--muted);
  --tinta-3:var(--muted-2);
  --linea:var(--line);
  --verde:var(--brand);
  --verde-2:var(--brand-2);
  --terra:var(--coral);
  --blanco:var(--surface);
  --serif:"Montserrat",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  --sans:"Montserrat",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
}

*{box-sizing:border-box}
html,body{background:var(--bg)}
body{
  margin:0;
  color:var(--ink);
  font-family:var(--sans);
  font-size:15.5px;
  line-height:1.5;
  letter-spacing:0;
  -webkit-font-smoothing:antialiased;
}
h1,h2,h3,h4{font-family:var(--sans);font-weight:800;letter-spacing:-.02em;text-wrap:balance}
p{text-wrap:pretty}
button{font-family:inherit}
a{color:inherit}
::selection{background:var(--brand-soft);color:var(--ink)}

/* ---------- botones ---------- */
.btn{
  height:42px;padding:0 16px;border-radius:12px;
  border:1px solid var(--line);background:var(--surface);
  font-size:14px;font-weight:800;letter-spacing:0;color:var(--ink);
  transition:background .16s ease,border-color .16s ease,transform .12s ease;
}
.btn:hover{border-color:var(--brand);background:var(--brand-soft)}
.btn:active{transform:scale(.98)}
.btn-primario{background:var(--brand);border-color:var(--brand);color:#fff}
.btn-primario:hover{background:var(--brand-2);border-color:var(--brand-2)}
.btn-suave{background:var(--brand-soft);border-color:var(--brand-soft);color:var(--brand)}
.btn-suave:hover{background:#d9eee8;border-color:#d9eee8}
.btn-mini{height:36px;padding:0 13px;font-size:13px}
.btn-icono{width:40px;height:40px;padding:0;border-color:transparent;background:transparent;color:var(--muted);border-radius:12px}
.btn-icono:hover{background:var(--bg);border-color:transparent;color:var(--ink)}
.btn-icono svg{width:20px;height:20px;stroke-width:1.8}
.btn-icono span{display:none}
.btn-fantasma{background:var(--surface);height:38px;padding:0 13px;font-size:12.5px;color:var(--muted);border-color:var(--line)}
.btn-ayuda{width:36px;height:36px;border:0;background:transparent;color:var(--muted);border-radius:50%;font-family:var(--sans);font-size:17px;font-weight:800}
.btn-ayuda:hover{background:var(--bg);color:var(--ink)}
.btn[disabled]{opacity:.45;pointer-events:none}
:focus-visible{outline:2px solid var(--brand);outline-offset:2px;border-radius:6px}

/* ---------- barra ---------- */
.barra{
  height:calc(var(--barra-h) + env(safe-area-inset-top));
  padding:env(safe-area-inset-top) 20px 0;
  background:rgba(255,255,255,.94);
  border-bottom:1px solid var(--line);
  backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);
}
.marca{gap:9px;min-width:0}
.marca-icono{width:38px;height:25px;object-fit:contain;display:block;flex:0 0 38px}
.marca-texto strong{font-size:19px;font-weight:800;letter-spacing:-.03em;color:var(--ink);line-height:1}
.marca-texto small{display:none}
.barra-acciones{gap:2px}
.barra-acciones .btn-fantasma{border:1px solid var(--line);background:var(--surface)}

/* ---------- pestañas ---------- */
.tabs{
  top:14px;gap:2px;padding:4px;
  background:var(--surface);border:1px solid var(--line);border-radius:14px;
  box-shadow:0 10px 30px -28px rgba(27,36,48,.5);
}
.tabs button{
  padding:8px 15px;border-radius:10px;
  font-size:13px;font-weight:800;color:var(--muted);
}
.tabs button.activo{background:var(--brand-soft);color:var(--brand)}
.tabs button:not(.activo):hover{background:var(--bg);color:var(--ink)}

/* ---------- vistas ---------- */
.vista{
  width:min(1100px,100%);
  padding:100px 24px calc(48px + env(safe-area-inset-bottom));
  background:transparent;
}
.vista-inicio{max-width:1100px;padding-top:104px}
.vista-cab{justify-content:flex-start;margin:0 0 18px}
.vista-cab h2{font-size:28px;font-weight:800;letter-spacing:-.025em}
#arbol{background:transparent}
#escena{background:var(--bg)}

/* ---------- dashboard ---------- */
.dash{max-width:1040px;margin:0 auto}
.dash-cab{display:flex;align-items:flex-end;justify-content:space-between;gap:16px}
.dash-cab-txt{min-width:0}
.dash-fecha{margin:0 0 3px;color:var(--muted-2);font-size:12.5px;font-weight:700}
.dash-cab h1{margin:0;font-size:30px;line-height:1.1;font-weight:800;letter-spacing:-.025em}
.dash-lema{margin:4px 0 0;color:var(--muted);font-size:14px;font-weight:600}
.dash-avatares{display:flex;align-items:center;padding-bottom:2px;flex:0 0 auto}
.dash-av{width:44px;height:44px;border-radius:50%;object-fit:cover;border:3px solid var(--bg);margin-left:-11px;background:var(--surface);box-shadow:0 3px 8px -5px rgba(27,36,48,.4)}
.dash-av:first-child{margin-left:0}

/* hero */
.dash-hero{
  position:relative;overflow:hidden;margin:18px 0;
  display:flex;align-items:center;gap:18px;
  padding:22px 24px;border-radius:22px;
  background:var(--brand);color:#fff;
  box-shadow:0 18px 34px -24px rgba(31,111,99,.9);
}
.dash-hero::before{content:"";position:absolute;width:240px;height:240px;border-radius:50%;background:rgba(255,255,255,.07);right:-90px;top:-120px}
.dash-hero::after{content:"";position:absolute;width:150px;height:150px;border-radius:50%;background:rgba(255,255,255,.05);left:38%;bottom:-110px}
.hero-fecha{
  position:relative;z-index:1;flex:0 0 64px;width:64px;height:72px;border-radius:14px;
  background:rgba(255,255,255,.14);border:1px solid rgba(255,255,255,.16);
  display:flex;flex-direction:column;align-items:center;justify-content:center;line-height:1;
}
.hero-fecha b{font-size:27px;font-weight:800;letter-spacing:-.03em}
.hero-fecha small{margin-top:4px;font-size:10px;font-weight:800;letter-spacing:.12em}
.hero-txt{position:relative;z-index:1;flex:1;min-width:0}
.hero-kicker{margin:0 0 3px;font-size:10.5px;font-weight:800;letter-spacing:.12em;text-transform:uppercase;color:rgba(255,255,255,.74)}
.hero-txt h2{margin:0 0 4px;color:#fff;font-size:23px;line-height:1.12;font-weight:800;letter-spacing:-.02em}
.hero-txt p{margin:0 0 12px;color:rgba(255,255,255,.82);font-size:13px;font-weight:600;line-height:1.35}
.btn-hero{
  height:40px;padding:0 15px;border:0;border-radius:12px;
  background:#fff;color:var(--brand);font-size:13px;font-weight:800;
}
.btn-hero:hover{background:#f1faf7}
.hero-avatar{
  position:relative;z-index:1;flex:0 0 88px;width:88px;height:88px;border-radius:50%;
  border:3px solid rgba(255,255,255,.9);background:rgba(255,255,255,.16);
  display:grid;place-items:center;overflow:hidden;
  font-size:32px;font-weight:800;color:#fff;
}
.hero-avatar img{width:100%;height:100%;object-fit:cover}
.hero-icono{
  position:relative;z-index:1;flex:0 0 74px;width:74px;height:74px;border-radius:20px;
  background:#fff9f0;display:grid;place-items:center;box-shadow:0 10px 24px -18px rgba(0,0,0,.45);
}
.hero-icono img{width:54px;height:54px;display:block}

/* accesos */
.dash-accesos{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:0 0 18px}
.acceso{
  display:flex;align-items:center;gap:11px;
  padding:12px 13px;border:1px solid var(--line);border-radius:16px;
  background:var(--surface);text-align:left;cursor:pointer;
  box-shadow:0 5px 16px -14px rgba(27,36,48,.32);
  transition:transform .15s ease,box-shadow .15s ease,border-color .15s ease;
}
.acceso:hover{transform:translateY(-2px);box-shadow:0 12px 24px -18px rgba(27,36,48,.35);border-color:#d7dfe8}
.acceso:active{transform:scale(.985)}
.acceso-ico{width:42px;height:42px;flex:0 0 42px;border-radius:12px;display:grid;place-items:center}
.acceso-ico svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.ico-mint{background:var(--brand-soft);color:var(--brand)}
.ico-peach{background:var(--coral-soft);color:var(--coral)}
.ico-blue{background:var(--blue-soft);color:var(--blue)}
.ico-amber{background:var(--amber-soft);color:var(--amber)}
.ico-lilac{background:var(--lilac-soft);color:var(--lilac)}
.ico-rose{background:var(--rose-soft);color:var(--rose)}
.acceso-txt{min-width:0}
.acceso-txt strong{display:block;font-size:14px;font-weight:800;line-height:1.2}
.acceso-txt small{display:block;margin-top:1px;color:var(--muted);font-size:11.5px;font-weight:600;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* tarjetas del dashboard */
.dash-grid{display:grid;grid-template-columns:1.1fr .9fr;gap:14px;align-items:start}
.tarjeta{
  background:var(--surface);border:1px solid var(--line);border-radius:18px;
  padding:16px;box-shadow:var(--shadow);
}
.tarjeta-cab{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px}
.tarjeta-cab h2{margin:0;font-size:16px;font-weight:800;letter-spacing:-.01em}
.enlace{
  border:0;background:transparent;padding:4px 0;color:var(--brand);
  font-size:12px;font-weight:800;cursor:pointer;white-space:nowrap;
}
.enlace:hover{text-decoration:underline;text-underline-offset:3px}

/* cumpleaños */
.fila-cumple{
  display:flex;align-items:center;gap:10px;width:100%;
  padding:9px 0;border:0;border-top:1px solid var(--line);
  background:transparent;text-align:left;cursor:pointer;
}
.fila-cumple:first-child{border-top:0}
.fila-cumple:hover .cumple-datos strong{color:var(--brand)}
.fecha-chip{
  width:42px;height:42px;flex:0 0 42px;border-radius:12px;
  background:var(--coral-soft);color:var(--coral);
  display:flex;flex-direction:column;align-items:center;justify-content:center;line-height:1;
}
.fecha-chip b{font-size:17px;font-weight:800;letter-spacing:-.02em}
.fecha-chip small{margin-top:3px;font-size:8.5px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}
.avatar-cumple{width:36px;height:36px;flex:0 0 36px;border-radius:50%;object-fit:cover;background:var(--paper-2,var(--papel-2));border:1px solid var(--line)}
.avatar-cumple.inicial{display:grid;place-items:center;background:var(--brand-soft);color:var(--brand);font-size:14px;font-weight:800;border:0}
.cumple-datos{min-width:0;flex:1}
.cumple-datos strong{display:block;font-size:13.5px;font-weight:800;line-height:1.25;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cumple-datos small{display:block;margin-top:1px;color:var(--muted);font-size:11.5px;font-weight:600}
.vacio-card{padding:14px 4px 8px;text-align:center;color:var(--muted);font-size:12.5px;line-height:1.45}
.vacio-card strong{display:block;color:var(--ink);font-size:14px;font-weight:800;margin-bottom:2px}

/* muro mini */
.mini-post{padding:8px 0;border-top:1px solid var(--line)}
.mini-post:first-child{border-top:0;padding-top:0}
.mini-cab{display:flex;align-items:center;gap:8px;margin-bottom:4px}
.mini-avatar{width:28px;height:28px;flex:0 0 28px;border-radius:50%;object-fit:cover;background:var(--brand-soft);color:var(--brand);display:grid;place-items:center;font-size:11px;font-weight:800;border:0}
.mini-cab strong{font-size:12px;font-weight:800}
.mini-cab small{font-size:10.5px;color:var(--muted-2);margin-left:auto}
.mini-post p{margin:0;color:var(--muted);font-size:12.5px;line-height:1.4}
.mini-foto{width:100%;height:104px;object-fit:cover;border-radius:11px;margin-top:7px;display:block}
.mini-vacio{padding:12px 2px 6px;text-align:center;color:var(--muted);font-size:12.5px;line-height:1.45}
.mini-vacio .btn{margin-top:10px}

/* familia */
.familia-stats{display:flex;gap:22px;margin:4px 0 12px}
.familia-stats strong{display:block;font-size:25px;font-weight:800;line-height:1;letter-spacing:-.03em}
.familia-stats small{display:block;margin-top:3px;color:var(--muted);font-size:10.5px;font-weight:700;line-height:1.2}
.familia-sueltas{
  display:block;width:100%;margin:0 0 10px;padding:9px 11px;border:1px solid var(--line);
  border-radius:10px;background:var(--bg);color:var(--muted);font-size:11.5px;font-weight:700;text-align:left;cursor:pointer;
}
.familia-sueltas:hover{border-color:var(--brand);color:var(--brand)}
.dash-familia .btn{width:100%;height:38px;font-size:12.5px}
.dash-pie{display:flex;justify-content:center;align-items:center;gap:16px;margin:20px 0 0;color:var(--muted);font-size:12px;font-weight:700}
.dash-pie a,.pie-link{border:0;background:none;color:var(--muted);font:inherit;cursor:pointer;text-decoration:none;padding:0}
.dash-pie a:hover,.pie-link:hover{color:var(--brand);text-decoration:underline;text-underline-offset:3px}

/* avisos */
.avisos{
  display:flex;align-items:center;gap:11px;
  max-width:none;margin:0;padding:16px;
  background:var(--surface);border:1px solid var(--line);border-radius:18px;box-shadow:var(--shadow);
}
.avisos-ico{width:42px;height:42px;flex:0 0 42px;border-radius:12px;background:var(--amber-soft);color:var(--amber);display:grid;place-items:center}
.avisos-ico svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.avisos-texto{min-width:0}
.avisos-texto strong{font-family:var(--sans);font-size:13.5px;font-weight:800}
.avisos-texto p{font-size:11.5px;color:var(--muted);line-height:1.35;margin:2px 0 0}
.avisos .btn{height:36px;padding:0 12px;font-size:12px;white-space:nowrap}

/* ---------- árbol ---------- */
.f3{--male-color:var(--brand-soft);--female-color:var(--coral-soft);--genderless-color:var(--paper-2)}
.f3 div.card-inner{
  border:1px solid var(--line);border-radius:14px;background:var(--surface);
  box-shadow:0 6px 18px -16px rgba(27,36,48,.35);
}
.f3 div.card-male .card-inner,
.f3 div.card-female .card-inner,
.f3 div.card-genderless .card-inner{background:var(--surface);border-top:1px solid var(--line);box-shadow:0 6px 18px -16px rgba(27,36,48,.35)}
.f3 div.card-main .card-inner{outline:2px solid var(--brand);outline-offset:2px;box-shadow:0 10px 24px -18px rgba(27,36,48,.4)}
.f3 div.card:hover .card-inner{box-shadow:0 12px 26px -18px rgba(27,36,48,.4)}
.f3 div.card-image-rect div.card-label{font-family:var(--sans);font-size:17px;line-height:1.14;color:var(--ink);padding:0 5px}
.f3 div.card-image-rect div.card-label > div:first-child{font-weight:800;letter-spacing:-.01em}
.f3 div.card-image-rect div.card-label > div:last-child{font-size:11.5px;color:var(--muted);font-weight:600;margin-top:2px}
.f3 .person-icon{width:48px;height:48px;border-radius:10px;background:var(--brand-soft);color:var(--brand);display:grid;place-items:center}
.f3 .person-icon svg{width:30px;height:30px}
.f3 .link{stroke:#cbd5e1!important;stroke-width:1.3!important}
.f3 .link.f3-path-to-main{stroke:var(--brand)!important;stroke-width:2!important}
.f3 .card-main-outline{stroke:var(--brand);stroke-width:1.5;opacity:.2}
.controles{border:1px solid var(--line);border-radius:14px;background:var(--surface);box-shadow:var(--shadow)}
.controles button{border-radius:10px;color:var(--muted)}
.controles button:hover{background:var(--bg);color:var(--ink)}
.pie{background:rgba(255,255,255,.92);border:1px solid var(--line);border-radius:999px;color:var(--muted);font-weight:700}

/* ---------- ficha ---------- */
.panel{width:min(480px,100%);padding:22px 24px calc(40px + env(safe-area-inset-bottom));background:var(--surface)}
.panel-cerrar{border-color:var(--line);background:var(--surface);color:var(--muted)}
.ficha-cab{gap:15px;margin:2px 0 8px}
.ficha-foto{width:92px;height:92px;flex-basis:92px;border-radius:16px;background:var(--brand-soft);border:0;color:var(--brand);font-family:var(--sans);font-size:34px;font-weight:800}
.ficha-id h2{font-size:26px;font-weight:800;line-height:1.08;margin:0 0 4px;letter-spacing:-.025em}
.ficha-id .fechas{font-size:13.5px;color:var(--muted);font-weight:600;margin:0 0 4px}
.ficha-id .lugar{font-size:12.5px;color:var(--muted);font-weight:600;margin:0}
.ficha-media .retrato{aspect-ratio:16/10;border-radius:16px}
.ficha-media .btn-foto{right:10px;bottom:10px;height:32px;font-size:12px;background:rgba(255,255,255,.94);border-color:rgba(255,255,255,.94);color:var(--ink)}
.panel h2{font-size:26px;font-weight:800}
.panel .fechas{font-size:13.5px;color:var(--muted);font-weight:600}
.panel .apodo{font-size:.5em;color:var(--muted);font-weight:600}
.panel .oficio{font-size:13px;color:var(--muted);font-weight:600;margin:-2px 0 12px}
.panel .bio{font-family:var(--sans);font-size:14.5px;line-height:1.55;color:var(--muted);margin:12px 0 16px;font-weight:500}
.seccion{font-size:10.5px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:var(--muted-2);margin:18px 0 7px}
.chip{border:1px solid var(--line);background:var(--bg);border-radius:11px;padding:8px 11px;font-size:13px;font-weight:700;color:var(--ink)}
.chip:hover{background:var(--brand-soft);border-color:var(--brand-soft);color:var(--brand)}
.chip .rol{font-size:9px;font-weight:800;color:var(--muted-2)}
.galeria img{border-radius:11px;border:1px solid var(--line)}
.btn-foto{height:32px;font-size:12px;background:var(--surface);border-color:var(--line);color:var(--muted);font-weight:800}
.panel-acciones .btn{height:46px;font-size:13px;font-weight:800;border-radius:12px}
.panel-acciones .btn-primario{background:var(--brand);border-color:var(--brand)}

/* ---------- calendario ---------- */
.mes-titulo h2{font-size:32px;font-weight:800;letter-spacing:-.03em}
.mes-titulo small{color:var(--coral);font-size:12px;font-weight:800;letter-spacing:.08em}
.mes-flecha{width:40px;height:40px;border-color:var(--line);background:var(--surface);color:var(--muted)}
.mes-flecha:hover{border-color:var(--brand);color:var(--brand)}
.calendario{
  max-width:600px;margin:0 auto 16px;gap:3px;padding:12px;
  background:var(--surface);border:1px solid var(--line);border-radius:18px;box-shadow:var(--shadow);
}
.calendario .dow{font-size:9.5px;color:var(--muted-2);font-weight:800}
.calendario .dia{border-radius:9px;font-family:var(--sans);font-size:13px;font-weight:700;color:var(--muted);min-height:44px;padding-top:6px}
.calendario .dia.hoy{background:var(--brand-soft);border-color:var(--brand-soft);color:var(--brand)}
.calendario .dia.con{background:var(--coral-soft);border-color:var(--coral-soft);color:var(--ink)}
.calendario .dia.con:hover{background:#ffe0d8}
.calendario .dia .puntos i{background:var(--coral)}
.lista-cumples{max-width:600px;margin:0 auto;gap:7px}
.cumple{padding:10px 12px;border-radius:14px;background:var(--surface);border:1px solid var(--line);box-shadow:0 4px 14px -14px rgba(27,36,48,.3)}
.cumple:hover{border-color:#d3dce6}
.cumple .dia-num{font-size:24px;font-weight:800;color:var(--coral);width:36px;flex-basis:36px}
.cumple .avatar{width:42px;height:42px;flex-basis:42px;background:var(--brand-soft)}
.cumple strong{font-size:14px;font-weight:800}
.cumple small{font-size:11.5px;color:var(--muted);font-weight:600}
.cumple .edad{font-size:13px;color:var(--brand);font-weight:800}
.vacio-cumples{padding:30px 18px;border-radius:16px;background:var(--surface);border:1px dashed #d6dfe8;color:var(--muted);font-weight:600}

/* ---------- muro ---------- */
.muro-intro{max-width:46ch;margin:-6px auto 16px;text-align:center;font-size:13px;color:var(--muted);font-weight:600}
.muro-form{border-radius:18px;padding:14px;margin-bottom:18px;background:var(--surface);border:1px solid var(--line);box-shadow:var(--shadow)}
.muro-form textarea{min-height:76px;padding:6px 4px;font-size:15px;line-height:1.5;resize:none;color:var(--ink)}
.muro-form textarea::placeholder{color:#93a0b0}
.muro-form-pie{padding-top:10px;margin-top:8px;border-top:1px solid var(--line)}
.muro-adjuntar{font-size:12.5px;color:var(--brand);font-weight:800;text-decoration:none}
.muro-adjuntar::before{font-size:17px}
.muro-form .btn-primario{height:38px;font-size:12.5px;padding:0 16px}
.muro-lista{gap:10px}
.post{border-radius:18px;padding:16px;border:1px solid var(--line);background:var(--surface);box-shadow:var(--shadow)}
.post header{gap:10px;margin-bottom:8px}
.post-avatar{width:40px;height:40px;flex-basis:40px;font-size:16px;font-weight:800}
.post-quien strong{font-size:13.5px;font-weight:800}
.post-quien small{font-size:10.5px;color:var(--muted-2);font-weight:600}
.post-texto{font-size:14.5px;line-height:1.55;margin-bottom:10px;color:var(--ink);font-weight:500}
.post-foto,.post-video{border-radius:12px;max-height:560px;object-fit:cover}
.post-pendiente{font-size:12px;color:var(--coral);font-weight:700}
.post-borrar{color:var(--muted-2)}

/* ---------- fotos ---------- */
.mosaico{grid-template-columns:repeat(3,1fr);gap:8px}
.mosaico figure{border-radius:16px;border:1px solid var(--line);box-shadow:var(--shadow);background:var(--surface)}
.mosaico img{border-radius:15px}
.mosaico figcaption{font-size:11.5px;font-weight:700}
.mosaico .anio{background:rgba(255,255,255,.94);color:var(--ink);font-weight:800}
.vacio-fotos{grid-column:1/-1;border:1px solid var(--line);border-radius:18px;background:var(--surface);padding:44px 22px;text-align:center;box-shadow:var(--shadow)}
.vacio-fotos svg{stroke:var(--muted-2);margin-bottom:10px}
.vacio-fotos strong{font-family:var(--sans);font-size:20px;font-weight:800;margin-bottom:4px}
.vacio-fotos p{color:var(--muted);font-size:13px;font-weight:600;max-width:36ch;line-height:1.5}

/* ---------- modales y formularios ---------- */
.modal-caja{border-radius:22px;padding:24px;box-shadow:var(--shadow-lg)}
.modal h2{font-size:25px;font-weight:800;letter-spacing:-.02em}
.modal .intro{font-size:13.5px;color:var(--muted);font-weight:600;line-height:1.5}
.campo label{font-size:11px;font-weight:800;letter-spacing:.05em;color:var(--muted-2)}
.campo input,.campo textarea,.campo select{border-radius:12px;background:var(--bg);border-color:var(--line);height:48px;font-size:14.5px;font-weight:600;color:var(--ink)}
.campo textarea{height:auto;min-height:96px}
.campo input:focus,.campo textarea:focus,.campo select:focus{background:var(--surface);border-color:var(--brand)}
.campo .ayuda{color:var(--muted-2);font-size:11.5px;font-weight:600}
.modal-pie .btn{height:46px;border-radius:12px}
.radio-sexo label{border-radius:12px;background:var(--bg);font-weight:700}
.radio-sexo label:has(input:checked){background:var(--brand-soft);border-color:var(--brand)}
.progreso i.hecho{background:var(--brand)}
.resultado{border-radius:12px}
.resultado:hover{background:var(--bg)}
.soltar{border-radius:14px;background:var(--bg);border-color:#d6dfe8}

/* ---------- juego ---------- */
.juego-head{padding-right:44px}
.juego-head h2{font-size:25px;font-weight:800}
.juego-intro{font-size:13px;color:var(--muted);font-weight:600;line-height:1.5}
.juego-opcion{border-radius:16px;border-color:var(--line);background:var(--surface);padding:12px 13px;box-shadow:var(--shadow)}
.juego-opcion:hover{background:var(--brand-soft);border-color:var(--brand-soft)}
.juego-opcion .ico{width:40px;height:40px;flex:0 0 40px;border-radius:12px;background:var(--brand-soft);color:var(--brand);font-size:16px;font-weight:800}
.juego-opcion:nth-child(2) .ico{background:var(--blue-soft);color:var(--blue)}
.juego-opcion:nth-child(3) .ico{background:var(--amber-soft);color:var(--amber)}
.juego-opcion:nth-child(4) .ico{background:var(--lilac-soft);color:var(--lilac)}
.juego-opcion strong{font-size:13.5px;font-weight:800}
.juego-opcion small{font-size:11.5px;color:var(--muted);font-weight:600}
.juego-marca{font-size:10.5px;font-weight:800;color:var(--muted-2)}
.juego-ranking h3{font-size:10.5px;font-weight:800;letter-spacing:.08em;color:var(--muted-2)}
.juego-fila{font-size:13px;font-weight:700}
.juego-fila .puesto{color:var(--coral);font-weight:800}
.juego-fila .puntos{color:var(--brand);font-weight:800}
.juego-fila.yo{background:var(--brand-soft)}
.juego-vacio{font-size:12px;color:var(--muted);font-weight:600}
.juego-barra{padding-right:54px}
.juego-barra .tiempo,.juego-barra .marcador{font-size:11.5px;font-weight:700;color:var(--muted)}
.juego-barra .tiempo b,.juego-barra .marcador b{font-family:var(--sans);font-size:19px;font-weight:800;color:var(--ink)}
.juego-progreso{background:#e9eef4}
.juego-progreso i{background:var(--brand)}
.juego-pregunta{font-size:26px;font-weight:800;line-height:1.15;letter-spacing:-.02em}
.juego-foto{border-radius:14px;max-height:240px}
.juego-opts .btn{height:56px;border-radius:12px;font-size:14px;font-weight:800;background:var(--surface);border-color:var(--line)}
.juego-opts .btn:hover{background:var(--bg)}
.juego-opts .btn.correcta{background:var(--brand);border-color:var(--brand);color:#fff}
.juego-opts .btn.fallada{background:var(--coral-soft);border-color:var(--coral);color:var(--coral)}
.juego-racha{color:var(--coral);font-weight:800}
.juego-resultado > .puntos{font-family:var(--sans);font-size:64px;font-weight:800;color:var(--brand);letter-spacing:-.04em}
.juego-resultado > .etiqueta{font-size:10.5px;font-weight:800;letter-spacing:.12em;color:var(--muted-2)}
.juego-resultado h2{font-size:26px;font-weight:800}
.juego-resultado p{color:var(--muted);font-weight:600;font-size:13.5px}
.juego-resultado .rango{background:var(--brand-soft);color:var(--brand);font-size:12.5px;font-weight:800}
.juego-nombre input{border-radius:12px;background:var(--bg);border-color:var(--line);font-weight:600}
.juego-nombre .btn{height:44px;border-radius:12px}

/* ---------- móvil ---------- */
@media (max-width:900px){
  .dash-grid{grid-template-columns:1fr}
  .dash-cab{align-items:flex-start}
  .dash-cab h1{font-size:27px}
  .dash-av{width:40px;height:40px}
  .vista-inicio{padding-top:24px}
  .portada{text-align:left}
}
@media (max-width:720px){
  :root{--barra-h:60px}
  .barra{padding:env(safe-area-inset-top) 14px 0}
  .marca-icono{width:34px;height:22px;flex-basis:34px}
  .marca-texto strong{font-size:18px}
  .barra-acciones{gap:0}
  .btn-icono{width:38px;height:38px}
  .btn-fantasma{height:36px;padding:0 11px;font-size:11.5px}
  .btn-ayuda{width:34px;height:34px;font-size:16px}
  .tabs{
    top:auto;bottom:0;left:0;right:0;transform:none;
    border-radius:0;border:0;border-top:1px solid var(--line);
    padding:6px 4px calc(5px + env(safe-area-inset-bottom));
    background:rgba(255,255,255,.98);
    box-shadow:0 -8px 24px -24px rgba(27,36,48,.35);
    justify-content:space-around;
  }
  .tabs button{
    flex:1;display:flex;flex-direction:column;align-items:center;gap:3px;
    padding:4px 2px;font-size:9.5px;border-radius:9px;font-weight:800;
  }
  .tabs .tab-ico{display:block;width:19px;height:19px}
  .tabs button.activo{background:transparent;color:var(--brand)}
  .tabs button.activo .tab-ico{background:var(--brand-soft);width:19px;height:19px;padding:4px;box-sizing:content-box;border-radius:9px}
  .vista{padding:24px 14px calc(94px + env(safe-area-inset-bottom))}
  .vista-inicio{padding-top:22px}
  .dash-cab{gap:10px}
  .dash-fecha{font-size:11.5px}
  .dash-cab h1{font-size:24px}
  .dash-lema{font-size:12.5px}
  .dash-av{width:36px;height:36px;border-width:2.5px;margin-left:-9px}
  .dash-hero{padding:18px;gap:12px;border-radius:18px;margin:14px 0}
  .hero-fecha{flex-basis:56px;width:56px;height:64px;border-radius:12px}
  .hero-fecha b{font-size:23px}
  .hero-fecha small{font-size:9px}
  .hero-txt h2{font-size:19px}
  .hero-txt p{font-size:12px;margin-bottom:10px}
  .hero-avatar{flex-basis:70px;width:70px;height:70px;font-size:26px}
  .hero-icono{flex-basis:62px;width:62px;height:62px;border-radius:16px}
  .hero-icono img{width:46px;height:46px}
  .btn-hero{height:37px;font-size:12px;border-radius:10px}
  .dash-accesos{grid-template-columns:1fr 1fr;gap:8px}
  .acceso{padding:10px;gap:9px;border-radius:14px}
  .acceso-ico{width:38px;height:38px;flex-basis:38px;border-radius:10px}
  .acceso-ico svg{width:19px;height:19px}
  .acceso-txt strong{font-size:12.5px}
  .acceso-txt small{font-size:10.5px}
  .dash-grid{gap:10px}
  .tarjeta{padding:14px;border-radius:16px}
  .tarjeta-cab h2{font-size:15px}
  .fila-cumple{padding:8px 0}
  .fecha-chip{width:38px;height:38px;flex-basis:38px;border-radius:10px}
  .fecha-chip b{font-size:15px}
  .cumple-datos strong{font-size:12.5px}
  .dash-pie{font-size:11px;gap:13px}
  .avisos{padding:13px;border-radius:16px}
  .avisos-ico{width:38px;height:38px;flex-basis:38px;border-radius:10px}
  .avisos-texto strong{font-size:12.5px}
  .avisos-texto p{font-size:10.5px}
  .avisos .btn{height:34px;font-size:11px;padding:0 10px}
  .modal-caja{border-radius:20px 20px 0 0;padding:20px 16px calc(18px + env(safe-area-inset-bottom))}
  .panel{height:92vh;padding:16px 18px calc(26px + env(safe-area-inset-bottom))}
  .ficha-foto{width:78px;height:78px;flex-basis:78px;font-size:30px;border-radius:14px}
  .ficha-id h2{font-size:23px}
  .mosaico{grid-template-columns:repeat(2,1fr);gap:7px}
  .calendario{padding:9px;border-radius:16px}
  .calendario .dia{min-height:42px;font-size:12px}
  .juego-pregunta{font-size:23px}
  .juego-opts .btn{height:54px;font-size:13px}
  .juego-resultado > .puntos{font-size:58px}
  .juego-nombre{flex-direction:row}
  .juego-nombre .btn{width:auto}
}
@media (max-width:370px){
  .hero-avatar{display:none}
  .marca-texto strong{font-size:17px}
  .btn-ayuda{display:none}
  .dash-accesos{gap:7px}
  .acceso{padding:9px}
  .acceso-ico{width:35px;height:35px;flex-basis:35px}
  .acceso-txt strong{font-size:12px}
  .acceso-txt small{font-size:10px}
}
@media (prefers-reduced-motion:reduce){
  .acceso,.btn{transition:none}
}
.mini-video{display:grid;place-items:center;background:#24313f;color:#fff;font-size:12px;font-weight:800;letter-spacing:.02em}
.mini-vacio strong{display:block;color:var(--ink);font-size:13px;font-weight:800;margin-bottom:2px}
.panel-acciones .btn[data-ficha="borrar"]{color:var(--coral);border-color:#f2ccc6}
.panel-acciones .btn[data-ficha="borrar"]:hover{background:var(--coral-soft);border-color:var(--coral)}
.pendientes-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:4px}
.pendiente{display:flex;align-items:center;gap:9px;padding:10px;border:1px solid var(--line);border-radius:12px;background:var(--bg);text-align:left;cursor:pointer}
.pendiente:hover{border-color:var(--brand);background:var(--brand-soft)}
.pendiente-ico{width:34px;height:34px;flex:0 0 34px;border-radius:10px;display:grid;place-items:center}
.pendiente-ico svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.pendiente strong{display:block;font-size:19px;font-weight:800;line-height:1}
.pendiente small{display:block;margin-top:2px;color:var(--muted);font-size:10.5px;font-weight:700}
.pendientes-nota{margin:9px 0 0;color:var(--muted);font-size:11px;font-weight:600}
