/* ============================================================================
   EduDog · hoja de estilos única
   ---------------------------------------------------------------------------
   Lenguaje visual PLANO, de aplicación nativa. Las reglas son cuatro:

     1. Nada de contornos. El color de fondo separa las piezas, no un marco.
     2. Nada de sombras duras. Como mucho una sombra muy suave, y solo en lo
        que de verdad flota por encima (modal, aviso).
     3. Separadores de un píxel, como en las listas de iOS y Android.
     4. Una sola tipografía, pesos normales para leer y semibold para titular.

   El azul es el color principal. El naranja, el oro y el resto solo aparecen
   para distinguir categorías y estados, nunca para decorar.

   Sin dependencias, sin build. Modo claro y oscuro.
   ========================================================================= */

/* ------------------------------------------------------------- variables */
:root {
  /* fondos y superficies */
  --paper:        #F2F5F9;   /* el fondo de la aplicación */
  --paper-2:      #E8EDF4;
  --surface:      #FFFFFF;   /* tarjetas, filas, barras */
  --surface-2:    #F6F8FB;   /* campos, estados pulsados */
  --line:         #E4E9F0;   /* el separador de un píxel */
  --line-2:       #D3DBE6;

  /* tinta */
  --ink:          #121826;
  --ink-2:        #5A6779;
  --ink-3:        #8A97A8;

  /* El contorno y la sombra dura del estilo anterior ya no existen. Las
     variables se quedan apuntando a nada para que ningún resto dibuje
     un marco por su cuenta. */
  --trazo:        transparent;
  --trazo-2:      transparent;
  --dur:          none;
  --dur-s:        none;
  --dur-g:        none;

  /* color principal */
  --brand:        #1A6FE0;
  --brand-pr:     #1559BC;   /* el mismo azul, pulsado */
  --brand-dk:     #1559BC;   /* azul para texto e iconos sobre fondo claro */
  --brand-lt:     #E9F1FD;   /* tinte, para fondos */
  --brand-ink:    #FFFFFF;

  /* acento */
  --accent:       #F7821B;
  --accent-dk:    #B85E06;
  --accent-lt:    #FEF1E2;
  --accent-ink:   #3A2308;

  /* estados */
  --oro:          #F5B723;   /* dominado, logros, experiencia */
  --oro-dk:       #9A6B06;
  --oro-lt:       #FEF4DC;
  --danger:       #E04358;
  --danger-dk:    #B22B3F;
  --danger-lt:    #FDE9EC;
  --info:         #16A7C0;
  --info-dk:      #0C7E93;
  --info-lt:      #E2F6FA;
  --lila:         #7C5CE0;
  --lila-dk:      #5B3FBF;
  --lila-lt:      #EEE9FD;

  /* escala de espaciado: seis pasos y ninguno más */
  --e1: 4px; --e2: 8px; --e3: 14px; --e4: 22px; --e5: 34px; --e6: 52px;

  /* geometría */
  --borde:    1px;
  --borde-s:  1px;
  --radio:    14px;
  --radio-s:  10px;
  --radio-l:  18px;

  /* elevación: solo dos niveles, y los dos casi invisibles */
  --elev-1: 0 1px 2px rgba(16, 24, 40, .06);
  --elev-2: 0 8px 28px rgba(16, 24, 40, .14);

  /* compatibilidad con los nombres antiguos */
  --radius:   var(--radio);
  --radius-s: var(--radio-s);
  --radius-l: var(--radio-l);
  --shadow-1: var(--elev-1);
  --shadow-2: var(--elev-1);
  --shadow-3: var(--elev-2);

  --enlace:   #1A6FE0;
  --enlace-h: #1559BC;

  /* Una sola familia. Inter es la tipografía de interfaz neutra por
     excelencia; si no carga, se cae al tipo del sistema, que en un móvil
     es exactamente lo que queremos. */
  --font-d: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
  --font-b: var(--font-d);

  /* escena de las animaciones: planas, sin contorno */
  --scene-top:    #E7F1FB;
  --scene-bot:    #F4F7FA;
  --scene-glow:   #FDEFD9;
  --scene-floor:  #F0E3CE;
  --scene-line:   #C9D3E0;
  --scene-shadow: rgba(18, 24, 38, .10);
  --dog-1: #E8A24E;  /* cuerpo */
  --dog-2: #D08A36;  /* patas del lado opuesto */
  --dog-3: #B5741F;  /* oreja */
  --dog-4: #FBE3C0;  /* hocico */
  --dog-5: #2A3242;  /* nariz, ojo, boca */
  --tongue: #F4788D;
  --man-1: #5C93D6;
  --man-2: #4A7CB8;
  --man-3: #3A6494;
  --prop-1: #9AAEC4;
  --prop-2: #CEDCEA;
}

:root[data-theme="dark"],
html.dark {
  --paper:        #0E1420;
  --paper-2:      #151D2B;
  --surface:      #18202E;
  --surface-2:    #202A3A;
  --line:         #27313F;
  --line-2:       #35435A;

  --ink:          #E9EEF6;
  --ink-2:        #A5B2C4;
  --ink-3:        #78869A;

  --brand:        #4C9BFF;
  --brand-pr:     #3B84E0;
  --brand-dk:     #7FBAFF;
  --brand-lt:     #14263C;
  --brand-ink:    #06121F;
  --enlace:       #6FB0FF;
  --enlace-h:     #A0CDFF;

  --accent:       #FF9838;
  --accent-dk:    #FFB46B;
  --accent-lt:    #33220E;
  --accent-ink:   #1E1204;

  --oro:          #F5C044;
  --oro-dk:       #F2CE77;
  --oro-lt:       #322710;
  --danger:       #F2607A;
  --danger-dk:    #FF90A4;
  --danger-lt:    #33181F;
  --info:         #3ECADF;
  --info-dk:      #74DEEE;
  --info-lt:      #0F2B33;
  --lila:         #9C81F5;
  --lila-dk:      #BCA8FF;
  --lila-lt:      #221B3A;

  --elev-1: 0 1px 2px rgba(0, 0, 0, .34);
  --elev-2: 0 8px 28px rgba(0, 0, 0, .5);

  --scene-top:    #16202E;
  --scene-bot:    #1B2431;
  --scene-glow:   #33280F;
  --scene-floor:  #2B2417;
  --scene-line:   #2E3A4A;
  --scene-shadow: rgba(0, 0, 0, .45);
  --dog-1: #DE9C4C;
  --dog-2: #BF7F30;
  --dog-3: #9E6819;
  --dog-4: #EBD2AC;
  --dog-5: #0F151F;
  --man-1: #5E9BD8;
  --man-2: #4A80B8;
  --man-3: #36618F;
  --prop-1: #6F8AA8;
  --prop-2: #46607E;
}

/* ---------------------------------------------------------------- reset */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font-b);
  font-size: 16px;
  line-height: 1.5;
  font-weight: 400;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, svg { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }
/* El color de enlace va por variable: con un selector como
   :root[data-theme="dark"] a  ganaba por especificidad a .tabbar a. */
a { color: var(--enlace); font-weight: 500; text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--enlace-h); }
h1, h2, h3, h4 {
  font-family: var(--font-d); line-height: 1.22;
  margin: 0 0 .4em; letter-spacing: -.011em;
}
h1 { font-size: 1.75rem; font-weight: 700; letter-spacing: -.021em; }
h2 { font-size: 1.25rem; font-weight: 650; letter-spacing: -.014em; }
h3 { font-size: 1.0625rem; font-weight: 650; }
h4 { font-size: .9375rem; font-weight: 600; }
p { margin: 0 0 .8em; }
ul, ol { margin: 0 0 1em; padding-left: 1.2em; }
li { margin-bottom: .35em; }
strong, b { font-weight: 600; }
code, kbd {
  font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .86em;
  background: var(--surface-2); border: 1px solid var(--line);
  padding: .05em .4em; border-radius: 6px; font-weight: 500;
}
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--brand-lt); color: var(--ink); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ============================================================================
   Armazón
   ---------------------------------------------------------------------------
   Esto es una aplicación, no un sitio web: no hay barra lateral ni cabecera de
   página. Una sola columna del ancho de un móvil, centrada a cualquier tamaño
   de pantalla, con la navegación pegada abajo, a lo ancho, como en un móvil.
   ========================================================================= */
.app { min-height: 100vh; }

main#main {
  width: 100%; max-width: 560px; margin: 0 auto;
  min-height: 100vh; background: var(--paper);
}
/* En una pantalla ancha, una línea de un píxel marca dónde acaba la
   aplicación. Nada más: ni marco, ni sombra, ni relieve. */
@media (min-width: 600px) {
  body { background: var(--paper-2); }
  main#main { border-inline: 1px solid var(--line); }
  :root[data-theme="dark"] body { background: #080C14; }
}

.wrap { padding: var(--e3) var(--e3) 108px; }
.wrap.narrow { padding-inline: var(--e3); }

/* ------------------------------------------------- cabecera contextual */
/* El patrón de título grande: arriba solo la flecha de volver, y cuando el
   contenido sube, el título aparece en la barra. Es lo que hacen las dos
   plataformas y es la señal más clara de que esto no es una web. */
.top {
  position: sticky; top: 0; z-index: 60;
  width: 100%; max-width: 560px; margin: 0 auto;
  display: flex; align-items: center; gap: var(--e2);
  padding: max(6px, env(safe-area-inset-top)) 6px 6px;
  min-height: 52px;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid transparent;
  transition: border-color .18s;
}
.top[hidden] { display: none; }
.top-atras {
  width: 40px; height: 40px; flex: 0 0 40px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  background: transparent; color: var(--brand); border: 0; padding: 0;
  transition: background .14s;
}
.top-atras:active { background: var(--paper-2); }
.top-atras svg { width: 24px; height: 24px; }
.top-atras[hidden] { display: none; }
.top-t {
  flex: 1; min-width: 0; font-weight: 600; font-size: 1.0625rem; text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  opacity: 0; transform: translateY(5px); transition: opacity .18s, transform .18s;
}
.top.con-titulo .top-t { opacity: 1; transform: none; }
.top.con-titulo { border-bottom-color: var(--line); }
.top-acc { flex: 0 0 40px; display: flex; gap: var(--e2); justify-content: flex-end; }

/* La marca solo se ve en la pantalla de acceso. */
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--ink); }
.brand-mark {
  width: 56px; height: 56px; flex: 0 0 56px; border-radius: 16px;
  background: var(--brand); color: #fff; display: grid; place-items: center;
  border: 0; box-shadow: none;
}
.brand-mark svg { width: 32px; height: 32px; }
.brand-name { font-size: 1.4rem; font-weight: 700; letter-spacing: -.02em; }
.brand-sub { font-size: .68rem; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-3); font-weight: 600; }
.side, .side-foot, .nav, .nav-h, .nav-badge, .topbar, #dogcard { display: none !important; }
.main { margin: 0; }

/* --------------------------------------------------------------- botones */
/* Plano: color sólido, esquinas suaves, y al pulsar solo se oscurece. Ni
   relieve, ni contorno, ni hundimiento. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; min-height: 44px; border-radius: var(--radio-s);
  background: var(--surface-2); color: var(--ink);
  border: 0; box-shadow: none;
  font-family: var(--font-b); font-weight: 600; font-size: .9375rem;
  letter-spacing: -.006em;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .14s, opacity .14s;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { color: var(--ink); background: var(--paper-2); }
.btn:active { background: var(--line); }
.btn svg { width: 19px; height: 19px; }
.btn.primary { background: var(--brand); color: var(--brand-ink); }
.btn.primary:hover { background: var(--brand-pr); color: var(--brand-ink); }
.btn.primary:active { background: var(--brand-pr); opacity: .88; }
.btn.accent { background: var(--accent); color: var(--accent-ink); }
.btn.accent:hover { background: var(--accent); opacity: .9; }
.btn.oro { background: var(--oro); color: var(--accent-ink); }
.btn.oro:hover { background: var(--oro); opacity: .9; }
.btn.ghost { background: transparent; color: var(--brand); }
.btn.ghost:hover { background: var(--brand-lt); color: var(--brand); }
.btn.ghost:active { background: var(--brand-lt); opacity: .8; }
.btn.sm { padding: 7px 13px; min-height: 40px; font-size: .84rem; border-radius: 9px; }
.btn.block { width: 100%; }
.btn.grande { min-height: 52px; font-size: 1rem; border-radius: var(--radio-s); font-weight: 650; }
.btn.danger { background: var(--danger); color: #fff; }
.btn.danger:hover { background: var(--danger-dk); color: #fff; }
:root[data-theme="dark"] .btn.danger,
:root[data-theme="dark"] .btn.danger:hover { color: #1A0A0E; }
.btn[disabled] { opacity: .42; pointer-events: none; }

.icon-btn {
  width: 40px; height: 40px; flex: 0 0 40px;
  display: grid; place-items: center; border-radius: 50%;
  background: transparent; color: var(--ink-2);
  border: 0; box-shadow: none;
  cursor: pointer; transition: background .14s, color .14s;
  -webkit-tap-highlight-color: transparent;
}
.icon-btn:hover { color: var(--ink); background: var(--paper-2); }
.icon-btn:active { background: var(--line); }
.icon-btn svg { width: 22px; height: 22px; }

/* --------------------------------------------------------- contenedores */
.card {
  background: var(--surface);
  border: 0; border-radius: var(--radio);
  box-shadow: none;
  padding: var(--e4); margin-bottom: var(--e3);
}
.card.pad-s { padding: var(--e3); }
/* Dentro de una rejilla o de una pila el hueco lo pone el contenedor: si la
   tarjeta suma además su propio margen, los huecos salen al doble. */
.grid > .card, .stack > .card, .lista > .card { margin-bottom: 0; }
.card.flush { padding: 0; overflow: hidden; }
.grid { display: grid; gap: var(--e3); }
.g2 { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); }
.g4 { grid-template-columns: repeat(auto-fill, minmax(185px, 1fr)); }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row.tight { gap: 6px; }
.between { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.mt { margin-top: var(--e5); }
.mt-s { margin-top: var(--e3); }
.mb0 { margin-bottom: 0; }

.eyebrow {
  font-size: .6875rem; text-transform: uppercase; letter-spacing: .09em;
  font-weight: 650; color: var(--ink-3); margin-bottom: 5px;
}
.lead { font-size: 1rem; color: var(--ink-2); font-weight: 400; }
.muted { color: var(--ink-3); }
.small { font-size: .875rem; }
.tiny { font-size: .78rem; }

/* ----------------------------------------------------------------- chips */
/* Etiqueta plana: fondo en tinte, texto del mismo color en oscuro. Sin
   contorno y sin sombra: es una etiqueta, no un botón. */
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--paper-2); color: var(--ink-2);
  border: 0; border-radius: 7px;
  padding: 3px 9px; font-size: .78rem; font-weight: 600;
  box-shadow: none; line-height: 1.45;
}
.chip.brand  { background: var(--brand-lt);  color: var(--brand-dk); }
.chip.accent { background: var(--accent-lt); color: var(--accent-dk); }
.chip.oro    { background: var(--oro-lt);    color: var(--oro-dk); }
.chip.danger { background: var(--danger-lt); color: var(--danger-dk); }
.chip.info   { background: var(--info-lt);   color: var(--info-dk); }
.chip.line   { background: transparent; color: var(--ink-3); box-shadow: inset 0 0 0 1px var(--line); }
.chip.dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
a.chip { text-decoration: none; }
a.chip:hover { background: var(--line); color: var(--ink); }

/* Filtro: control segmentado. Plano, sin relieve, el activo en azul. */
.fchip {
  background: var(--surface); color: var(--ink-2);
  border: 0; border-radius: 9px;
  padding: 8px 14px; min-height: 40px; font-size: .84rem; font-weight: 600;
  cursor: pointer; box-shadow: inset 0 0 0 1px var(--line);
  transition: background .14s, color .14s, box-shadow .14s;
  -webkit-tap-highlight-color: transparent;
}
.fchip:hover { color: var(--ink); background: var(--surface-2); }
.fchip:active { background: var(--paper-2); }
.fchip.on { background: var(--brand); color: var(--brand-ink); box-shadow: none; }

/* -------------------------------------------------------- formularios */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label { font-size: .84rem; font-weight: 600; color: var(--ink-2); }
input[type="text"], input[type="number"], input[type="date"], input[type="search"],
input[type="email"], input[type="password"], input[type="tel"], input[type="url"],
input[type="time"], select, textarea {
  font: inherit; font-weight: 400; color: var(--ink);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radio-s); padding: 12px 13px; width: 100%;
  min-height: 46px; box-shadow: none;
  transition: border-color .14s, box-shadow .14s, background .14s;
}
textarea { resize: vertical; min-height: 92px; line-height: 1.55; }
input::placeholder, textarea::placeholder { color: var(--ink-3); font-weight: 400; }
input:focus, select:focus, textarea:focus {
  outline: none; background: var(--surface);
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-lt);
}
.search { position: relative; }
.search svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 19px; height: 19px; color: var(--ink-3); pointer-events: none; }
.search input { padding-left: 41px; border-radius: var(--radio-s); }

/* Interruptor con la forma del sistema. */
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 500; font-size: .9375rem; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track {
  width: 50px; height: 30px; border-radius: 30px; background: var(--line-2);
  border: 0; position: relative; transition: background .2s; flex: 0 0 50px;
}
.switch .track::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 26px; height: 26px;
  border-radius: 50%; background: #fff; border: 0;
  box-shadow: 0 1px 3px rgba(16, 24, 40, .22);
  transition: transform .2s;
}
.switch input:checked + .track { background: var(--brand); }
.switch input:checked + .track::after { transform: translateX(20px); }
.switch input:focus-visible + .track { outline: 2px solid var(--brand); outline-offset: 2px; }

.checks { list-style: none; padding: 0; margin: 0; }
.checks li { margin: 0; border-bottom: 1px solid var(--line); }
.checks li:last-child { border-bottom: 0; }
.ck { display: flex; align-items: flex-start; gap: 12px; padding: 12px 2px; cursor: pointer; min-height: 48px; }
.ck input { position: absolute; opacity: 0; width: 0; height: 0; }
.ck .box {
  flex: 0 0 24px; width: 24px; height: 24px; border-radius: 7px; margin-top: 1px;
  border: 1.5px solid var(--line-2); background: var(--surface);
  display: grid; place-items: center; box-shadow: none; transition: .14s;
}
.ck .box svg { width: 15px; height: 15px; opacity: 0; transform: scale(.5); transition: .15s; color: #fff; }
.ck input:checked + .box { background: var(--brand); border-color: var(--brand); }
.ck input:checked + .box svg { opacity: 1; transform: scale(1); }
.ck input:checked ~ .ck-t { color: var(--ink-3); }
.ck-t { font-size: .9375rem; font-weight: 500; }
.ck-t small { display: block; font-weight: 400; color: var(--ink-3); font-size: .83rem; }

/* ----------------------------------------------------------------- notas */
/* Un bloque de color plano. El color dice de qué va; no hace falta marco. */
.note {
  border: 0; border-radius: var(--radio-s);
  background: var(--brand-lt); color: var(--ink); box-shadow: none;
  padding: var(--e3) var(--e3); margin-bottom: var(--e3); font-weight: 400;
}
.note > *:last-child { margin-bottom: 0; }
.note .nt { font-weight: 650; display: block; margin-bottom: 2px; font-size: .9375rem; color: var(--brand-dk); }
.note.warn { background: var(--accent-lt); }
.note.warn .nt { color: var(--accent-dk); }
.note.stop { background: var(--danger-lt); }
.note.stop .nt { color: var(--danger-dk); }
.note.info { background: var(--info-lt); }
.note.info .nt { color: var(--info-dk); }
.note.plain { background: var(--surface-2); }
.note.plain .nt { color: var(--ink-2); }

/* -------------------------------------------------------------- escenas */
.scene {
  border-radius: var(--radio); overflow: hidden;
  border: 0; background: var(--surface);
  box-shadow: none; max-width: 720px; margin-inline: auto;
}
.scene-stage { position: relative; background: var(--scene-bot); }
.scene-svg { width: 100%; height: auto; display: block; }
.scene-svg.thumb { border-radius: 0; }
/* Las ilustraciones van planas: el filtro que les pintaba el contorno grueso
   ya no existe (se quitó de anim.js). */
.sc-dog, .sc-man { filter: none; }
.scene-cap { padding: 13px 16px 2px; }
.scene-cap-t { margin: 0 0 3px; font-size: .9375rem; font-weight: 500; }
.scene-cap-t b { color: var(--brand-dk); font-weight: 650; }
.scene-cap-h { margin: 0; font-size: .84rem; color: var(--ink-3); font-weight: 400; }
.scene-bar { display: flex; align-items: center; gap: 6px; padding: 10px 12px 12px; }
.sc-btn {
  width: 40px; height: 40px; flex: 0 0 40px; border-radius: 50%;
  background: var(--surface-2); color: var(--ink-2);
  border: 0; box-shadow: none;
  display: grid; place-items: center; cursor: pointer;
  transition: background .14s, color .14s;
  -webkit-tap-highlight-color: transparent;
}
.sc-btn:hover { color: var(--ink); background: var(--paper-2); }
.sc-btn:active { background: var(--line); }
.sc-btn.primary { background: var(--brand); color: var(--brand-ink); }
.sc-btn.primary:hover { background: var(--brand-pr); color: var(--brand-ink); }
.sc-speed { width: auto; flex: none; border-radius: 20px; padding: 0 11px; height: 40px; font-size: .8rem; font-weight: 600; }
/* Los puntos NO se parten en dos líneas: si no caben, la tira se desliza.
   Un ejercicio de nueve pasos con los puntos en dos filas descoloca la barra
   entera y se nota enseguida que es una web. */
.sc-dots {
  display: flex; gap: 2px; flex: 1 1 0; min-width: 0; justify-content: center;
  flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
}
.sc-dots::-webkit-scrollbar { display: none; }
/* El punto que se ve mide nueve píxeles, pero el botón que se toca mide
   veintidós por cuarenta: el dedo no tiene por qué apuntar al dibujo. */
.sc-dot {
  width: 22px; height: 40px; padding: 0; border-radius: 0;
  background: transparent; border: 0; cursor: pointer; flex: 0 0 auto; position: relative;
  -webkit-tap-highlight-color: transparent;
}
.sc-dot::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px;
  border-radius: 50%; background: var(--line-2); transition: background .14s;
}
.sc-dot.on::after { background: var(--brand); }
.marca-in { animation: pop .4s cubic-bezier(.2, 1.4, .4, 1); transform-origin: 50% 100%; }

/* ---------------------------------------------------------------- pasos */
.steps { list-style: none; padding: 0; margin: 0; counter-reset: st; }
.steps > li {
  position: relative; padding: 0 0 18px 42px; counter-increment: st;
}
.steps > li::before {
  content: counter(st);
  position: absolute; left: 0; top: 0;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--brand-lt); color: var(--brand-dk);
  border: 0; box-shadow: none;
  display: grid; place-items: center;
  font-weight: 650; font-size: .875rem;
}
.steps > li::after {
  content: ""; position: absolute; left: 13.5px; top: 32px; bottom: 4px;
  width: 1px; background: var(--line);
}
.steps > li:last-child { padding-bottom: 0; }
.steps > li:last-child::after { display: none; }
.steps > li p { margin: 0 0 .4em; }
.steps > li p:last-child { margin-bottom: 0; }
.steps .mark {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--oro-lt); color: var(--oro-dk);
  border: 0; border-radius: 7px;
  padding: 3px 9px; font-size: .78rem; font-weight: 600; margin-top: 4px;
}
.steps .mark svg { width: 14px; height: 14px; flex: 0 0 14px; }

/* -------------------------------------------------------------- listas */
.dl { display: grid; gap: 0; margin: 0; }
.dl > div { display: grid; grid-template-columns: 150px 1fr; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.dl > div:last-child { border-bottom: 0; }
.dl dt { font-weight: 600; font-size: .84rem; color: var(--ink-3); margin: 0; }
.dl dd { margin: 0; font-size: .9375rem; }

.tbl { width: 100%; border-collapse: collapse; font-size: .9rem; }
/* Una tabla ancha se desliza dentro de su caja, no rompe la página. */
.tbl-wrap .tbl { min-width: 420px; }
.tbl th, .tbl td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl th { font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); font-weight: 600; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl-wrap {
  overflow-x: auto; border: 0;
  border-radius: var(--radio); background: var(--surface); box-shadow: none;
}

/* ------------------------------------------------------------ medidores */
.ring { display: block; }
.ring circle { fill: none; stroke-linecap: round; transform: rotate(-90deg); transform-origin: 50% 50%; }
.ring .bg { stroke: var(--line); }
.ring .fg { stroke: var(--brand); transition: stroke-dashoffset .7s cubic-bezier(.3, 1, .4, 1); }
.ring-box { position: relative; display: grid; place-items: center; }
.ring-box .val { position: absolute; font-size: 1.25rem; font-weight: 650; }

.bar {
  height: 8px; border-radius: 20px; background: var(--line);
  border: 0; overflow: hidden; padding: 0;
}
.bar > i {
  display: block; height: 100%; border-radius: 20px;
  background: var(--brand);
  transition: width .6s cubic-bezier(.3, 1, .4, 1);
}
.bar.accent > i { background-color: var(--accent); }
.bar.oro > i { background-color: var(--oro); }
.bar.rojo > i { background-color: var(--danger); }
.bar.ambar > i { background-color: var(--accent); }

.stat { display: flex; flex-direction: column; gap: 2px; }
.stat .v { font-size: 1.875rem; font-weight: 700; line-height: 1.1; letter-spacing: -.02em; }
.stat .k { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); font-weight: 600; }

/* ---------------------------------------------------------------- hero */
.hero {
  background: var(--brand); color: #fff;
  border: 0; border-radius: var(--radio);
  box-shadow: none; padding: 26px 24px; position: relative; overflow: hidden;
}
.hero h1, .hero h2 { color: #fff; }
.hero p { color: rgba(255, 255, 255, .88); font-weight: 400; }
.hero::after { display: none; }
.hero .btn { background: #fff; color: var(--brand-dk); }
.hero .btn:hover { background: #fff; opacity: .92; color: var(--brand-dk); }
.hero .btn.ghost { background: rgba(255, 255, 255, .16); color: #fff; box-shadow: none; }
/* En oscuro el azul de marca es CLARO, así que el texto blanco encima no se
   lee. Se invierte: relleno azul claro, tinta oscura. */
:root[data-theme="dark"] .hero { color: var(--brand-ink); }
:root[data-theme="dark"] .hero h1,
:root[data-theme="dark"] .hero h2 { color: var(--brand-ink); }
:root[data-theme="dark"] .hero p { color: var(--brand-ink); opacity: .82; }
:root[data-theme="dark"] .hero .btn { background: var(--brand-ink); color: var(--brand); }
:root[data-theme="dark"] .hero .btn:hover { background: var(--brand-ink); color: var(--brand); opacity: .9; }
:root[data-theme="dark"] .hero .btn.ghost { background: rgba(0, 0, 0, .18); color: var(--brand-ink); }

/* ------------------------------------------------------ tarjetas de ejercicio */
.ex-card {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 0;
  border-radius: var(--radio); box-shadow: none;
  text-decoration: none; color: var(--ink);
  transition: background .14s;
}
.ex-card:hover { background: var(--surface-2); color: var(--ink); }
.ex-card:active { background: var(--paper-2); }
.ex-card .ex-thumb {
  background: var(--scene-bot); aspect-ratio: 560/320; overflow: hidden; position: relative;
}
.ex-card .ex-thumb svg { width: 100%; height: 100%; }
.ex-card .ex-body { padding: 12px 14px 15px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.ex-card h3 { margin: 0; font-size: 1rem; color: var(--ink); font-weight: 600; }
.ex-card .ex-d { font-size: .86rem; color: var(--ink-3); margin: 0; flex: 1; font-weight: 400; }
.ex-done {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--oro); display: grid; place-items: center;
  border: 0; box-shadow: none;
}
.ex-done svg { width: 15px; height: 15px; color: var(--accent-ink); }
.ex-num {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  background: rgba(255, 255, 255, .88); color: var(--ink-2);
  border: 0; border-radius: 6px;
  font-size: .7rem; font-weight: 600; padding: 1px 7px;
}
:root[data-theme="dark"] .ex-num { background: rgba(0, 0, 0, .5); color: var(--ink); }

/* ----------------------------------------------------------- acordeones */
.acc {
  border: 0; border-radius: var(--radio);
  background: var(--surface); overflow: hidden; box-shadow: none;
}
.acc + .acc { margin-top: 8px; }
.acc > summary {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 40px 13px 14px; cursor: pointer; font-weight: 600;
  list-style: none; position: relative; min-height: 52px;
  -webkit-tap-highlight-color: transparent;
}
.acc > summary:active { background: var(--surface-2); }
.acc > summary > :first-child { flex: 0 0 auto; }
.acc-t { flex: 1; min-width: 0; line-height: 1.3; font-size: .9375rem; }
.acc-t small { display: block; font-weight: 400; font-size: .8rem; color: var(--ink-3); }
.acc > summary::-webkit-details-marker { display: none; }
.acc > summary::after {
  content: ""; position: absolute; right: 17px; top: 50%;
  width: 8px; height: 8px; margin-top: -5px;
  border-right: 1.5px solid var(--ink-3); border-bottom: 1.5px solid var(--ink-3);
  transform: rotate(45deg); transition: transform .18s;
}
.acc[open] > summary::after { transform: rotate(-135deg); margin-top: -2px; }
.acc[open] > summary { border-bottom: 1px solid var(--line); }
.acc .acc-in { padding: 14px; }
.acc .acc-in > *:last-child { margin-bottom: 0; }

/* ------------------------------------------------------- serie de cinco */
.pds { display: flex; gap: 8px; }
.pds button {
  width: 48px; height: 48px; border-radius: var(--radio-s);
  background: var(--surface-2); color: var(--ink-3);
  border: 1px solid var(--line); box-shadow: none;
  font-size: 1.05rem; font-weight: 650; cursor: pointer;
  transition: background .14s, color .14s, border-color .14s;
  -webkit-tap-highlight-color: transparent;
}
.pds button:active { background: var(--paper-2); }
.pds button[data-v="1"] { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.pds button[data-v="0"] { background: var(--danger); border-color: var(--danger); color: #fff; }
:root[data-theme="dark"] .pds button[data-v="0"] { color: #1A0A0E; }

.verdict {
  border: 0; border-radius: var(--radio-s);
  box-shadow: none; padding: 13px 15px; font-weight: 500; font-size: .9375rem;
}
.verdict.up { background: var(--oro-lt); color: var(--oro-dk); }
.verdict.same { background: var(--accent-lt); color: var(--accent-dk); }
.verdict.down { background: var(--danger-lt); color: var(--danger-dk); }

.timer-v { font-size: 3.2rem; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.counter { display: flex; align-items: center; gap: 12px; }
.counter .c-v { font-size: 2rem; font-weight: 700; min-width: 2.2ch; text-align: center; font-variant-numeric: tabular-nums; }

/* --------------------------------------------------------------- diario */
.log-day { border-left: 1px solid var(--line); padding: 0 0 18px 18px; position: relative; }
.log-day::before {
  content: ""; position: absolute; left: -5px; top: 6px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--brand); border: 0;
}
.log-date { font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 650; color: var(--ink-3); }

/* --------------------------------------------------------------- planes */
.week {
  border: 0; border-radius: var(--radio);
  background: var(--surface); overflow: hidden; box-shadow: none;
}
.week + .week { margin-top: 8px; }
.week-h { display: flex; align-items: center; gap: 12px; padding: 13px 14px; cursor: pointer; list-style: none; min-height: 56px; }
.week-h::-webkit-details-marker { display: none; }
.week-n {
  flex: 0 0 40px; width: 40px; height: 40px; border-radius: var(--radio-s);
  background: var(--brand-lt); color: var(--brand-dk);
  border: 0; box-shadow: none;
  display: grid; place-items: center; font-weight: 650; font-size: 1rem;
}
.week-t { font-weight: 600; font-size: .9375rem; }
.week-s { font-size: .82rem; color: var(--ink-3); font-weight: 400; }
.week-in { padding: 0 14px 14px; }

/* ------------------------------------------------------------ ficha perro */
.dogcard {
  display: flex; gap: 12px; align-items: center; padding: 10px 12px;
  border-radius: var(--radio); background: var(--surface);
  border: 0; box-shadow: none;
  text-decoration: none; color: var(--ink);
}
.dogcard:hover { color: var(--ink); background: var(--surface-2); }
.dogcard .av {
  flex: 0 0 46px; width: 46px; height: 46px; border-radius: 50%; overflow: hidden;
  background: var(--accent-lt); display: grid; place-items: center;
  border: 0;
}
.dogcard .av img { width: 100%; height: 100%; object-fit: cover; }
.dogcard .av svg { width: 26px; height: 26px; color: var(--accent-dk); }
.dogcard > span:last-child { min-width: 0; }
.dogcard .n { display: block; font-weight: 600; font-size: .9375rem; line-height: 1.3; }
.dogcard .m { display: block; font-size: .8rem; color: var(--ink-3); font-weight: 400; line-height: 1.35; }

/* ------------------------------------------------------------- pestañas */
/* Control segmentado, como el de un móvil: una fila de píldoras planas. */
.tabs { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 18px; padding-bottom: 2px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button {
  background: var(--surface); border: 0;
  border-radius: 9px; box-shadow: inset 0 0 0 1px var(--line);
  padding: 8px 14px; min-height: 40px; font-weight: 600; font-size: .86rem;
  color: var(--ink-2); cursor: pointer; white-space: nowrap;
  transition: background .14s, color .14s, box-shadow .14s;
  -webkit-tap-highlight-color: transparent;
}
.tabs button:active { background: var(--surface-2); }
.tabs button.on { background: var(--brand); color: var(--brand-ink); box-shadow: none; }

/* La barra de abajo es la navegación de la aplicación: pegada al borde
   inferior, a lo ancho de la columna, con una línea de un píxel arriba y el
   fondo translúcido. Exactamente como en un móvil. */
.tabbar {
  display: flex; position: fixed; z-index: 70;
  left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 560px;
  bottom: 0;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border: 0; border-top: 1px solid var(--line); border-radius: 0;
  box-shadow: none;
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}
.tabbar[hidden] { display: none; }
.tabbar a {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 4px 2px 3px; text-decoration: none; color: var(--ink-3);
  font-size: .6875rem; font-weight: 500; border-radius: 8px;
  border: 0; min-height: 46px; justify-content: center;
  -webkit-tap-highlight-color: transparent;
  transition: color .14s;
}
.tabbar a svg { width: 25px; height: 25px; }
.tabbar a.on { color: var(--brand); background: transparent; font-weight: 600; }
:root[data-theme="dark"] .tabbar a.on { color: var(--brand); }

/* ------------------------------------------------------- modal y aviso */
.modal {
  position: fixed; inset: 0; z-index: 100; display: none;
  align-items: center; justify-content: center; padding: 16px;
  background: rgba(18, 24, 38, .42); backdrop-filter: blur(2px);
  overflow-y: auto;
}
.modal.on { display: flex; }
.modal > .card { animation: modalIn .24s cubic-bezier(.2, .9, .3, 1); margin: auto; box-shadow: var(--elev-2); }

.toast {
  position: fixed; left: 50%; bottom: calc(80px + env(safe-area-inset-bottom)); transform: translate(-50%, 12px);
  z-index: 120; background: var(--ink); color: var(--paper);
  border: 0; border-radius: 10px;
  box-shadow: var(--elev-2); padding: 11px 18px; font-weight: 500; font-size: .9rem;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
  width: max-content; max-width: min(440px, calc(100vw - 28px)); text-align: center;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.toast.mal { background: var(--danger); color: #fff; }

.view { animation: viewIn .26s cubic-bezier(.2, .9, .3, 1); }

/* -------------------------------------------------- señales corporales */
.sig { display: grid; grid-template-columns: 86px 1fr; gap: 14px; align-items: start; padding: 13px 0; border-bottom: 1px solid var(--line); }
.sig:last-child { border-bottom: 0; }
.sig .ic {
  width: 86px; height: 66px; border-radius: var(--radio-s); background: var(--surface-2);
  border: 0; display: grid; place-items: center; overflow: hidden;
}
.sig .ic svg { width: 100%; height: 100%; }
.sig h4 { margin: 0 0 2px; }
.sig p { margin: 0; font-size: .88rem; color: var(--ink-2); font-weight: 400; }

/* ------------------------------------------------------- socialización */
.soc-item { padding: 11px 0; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.soc-item:last-child { border-bottom: 0; }
.soc-t { flex: 1 1 190px; font-size: .9375rem; font-weight: 500; }
.soc-item.done .soc-t { color: var(--ink-3); }
.soc-opts { display: flex; gap: 6px; flex: 0 1 auto; }
.soc-b { padding: 7px 11px; font-size: .78rem; min-height: 40px; }
.soc-b.on.cauteloso { background: var(--accent); color: var(--accent-ink); }
.soc-b.on.evitativo { background: var(--danger); color: #fff; }
.soc-b.on.relajado, .soc-b.on.curioso { background: var(--brand); color: var(--brand-ink); }

/* ------------------------------------------------------------- migas */
.crumb { display: flex; align-items: center; gap: 8px; font-size: .84rem; color: var(--ink-3); margin-bottom: 12px; flex-wrap: wrap; font-weight: 500; }
.crumb a { color: var(--ink-3); text-decoration: none; }
.crumb a:hover { color: var(--brand); }

.hr { height: 1px; background: var(--line); border: 0; border-radius: 0; margin: 24px 0; }

/* ======================================================================= */
/*  Pantallas propias de la aplicación                                     */
/* ======================================================================= */

/* --------------------------------------------------------------- acceso */
.acceso {
  position: fixed; inset: 0; z-index: 90; overflow-y: auto;
  background: var(--paper);
  display: flex; align-items: flex-start; justify-content: center;
  padding: max(26px, env(safe-area-inset-top)) 16px calc(40px + env(safe-area-inset-bottom));
}
.acceso-caja { width: 100%; max-width: 420px; margin: auto; }
.acceso-marca { text-align: center; }
.acceso-marca .brand-mark { margin: 0 auto; }
.acceso-marca h1 { font-size: 2rem; }

/* ------------------------------------------------------------------ HUD */
/* El marcador va suelto sobre el fondo, sin caja: son cifras, no un widget. */
.hud {
  display: flex; align-items: center; gap: var(--e3);
  padding: var(--e1) 2px var(--e4);
  border: 0; background: none; box-shadow: none;
}
.hud-i {
  display: inline-flex; align-items: center; gap: 5px;
  font-weight: 650; font-size: .9375rem; color: var(--ink);
  text-decoration: none; flex: 0 0 auto; min-height: 40px;
}
.hud-i svg { width: 21px; height: 21px; }
.hud-i:nth-child(1) svg { color: var(--danger); }
.hud-i:nth-child(2) svg { color: var(--oro); }
.hud-i[href] { border-radius: 8px; padding: 3px 7px; margin: -3px -7px; }
.hud-i[href]:hover { background: var(--paper-2); color: var(--ink); }
.hud-i[href] svg { color: var(--accent); }
.hud-nivel { flex: 1 1 90px; min-width: 70px; display: flex; flex-direction: column; gap: 4px; }
.hud-nivel .tiny { color: var(--ink-3); font-weight: 600; line-height: 1; }
.hud-nivel .bar { height: 6px; }

/* ---------------------------------------------------- la sesión de hoy */
.hoy {
  display: flex; gap: 0; align-items: stretch; overflow: hidden;
  border-radius: var(--radio); padding: 0;
  background: var(--brand); color: #fff;
  border: 0; box-shadow: none;
  position: relative; flex-direction: column;
}
.hoy::before { display: none; }
.hoy.hecha { background: var(--oro); color: var(--accent-ink); }
.hoy.hecha .btn.ghost { background: rgba(0, 0, 0, .08); color: var(--accent-ink); }
.hoy h2, .hoy p { color: inherit; }
.hoy h2 { font-size: 1.375rem; font-weight: 700; }
.hoy p { opacity: .9; margin-bottom: .5em; font-weight: 400; }
.hoy .eyebrow { color: inherit !important; opacity: .78; }
.hoy-txt { flex: 1 1 auto; min-width: 0; position: relative; z-index: 2; padding: var(--e4); }
.hoy .btn { background: #fff; color: var(--brand-dk); width: 100%; }
.hoy .btn:hover { background: #fff; opacity: .92; color: var(--brand-dk); }
.hoy.hecha .btn { color: var(--accent-dk); }
.hoy .btn.ghost { background: rgba(255, 255, 255, .18); color: #fff; box-shadow: none; }
.hoy-perro {
  order: -1; flex: 0 0 auto; width: 100%; max-width: none; margin: 0;
  border: 0; border-radius: 0; background: var(--scene-bot);
  aspect-ratio: 560/292; overflow: hidden;
}
.hoy-perro svg { width: 100%; height: auto; }

/* Igual que el hero: en oscuro el azul de marca es claro y la tinta va
   oscura, no blanca. */
:root[data-theme="dark"] .hoy { color: var(--brand-ink); }
:root[data-theme="dark"] .hoy .btn { background: var(--brand-ink); color: var(--brand); }
:root[data-theme="dark"] .hoy .btn:hover { background: var(--brand-ink); color: var(--brand); opacity: .9; }
:root[data-theme="dark"] .hoy .btn.ghost { background: rgba(0, 0, 0, .2); color: var(--brand-ink); }
:root[data-theme="dark"] .hoy .hb { background: rgba(0, 0, 0, .2); }
:root[data-theme="dark"] .hoy .hb.ok { background: var(--brand-ink); }
:root[data-theme="dark"] .hoy .hb svg { color: var(--brand); }
:root[data-theme="dark"] .hoy.hecha { color: var(--accent-ink); }
:root[data-theme="dark"] .hoy.hecha .btn { background: var(--accent-ink); color: var(--oro); }
:root[data-theme="dark"] .hoy.hecha .hb.ok { background: var(--accent-ink); }
:root[data-theme="dark"] .hoy.hecha .hb svg { color: var(--oro); }

.hoy-bloques { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.hb {
  width: 22px; height: 22px; border-radius: 50%;
  border: 0; background: rgba(255, 255, 255, .28);
  display: grid; place-items: center;
}
.hb svg { width: 13px; height: 13px; color: var(--brand-dk); }
.hb.ok { background: #fff; }
.hoy.hecha .hb { background: rgba(0, 0, 0, .12); }
.hoy.hecha .hb.ok { background: #fff; }
.hoy.hecha .hb svg { color: var(--accent-dk); }

/* tipos de bloque, compartidos con la lección */
.t-repaso     { --tipo: var(--info-dk);  --tipo-lt: var(--info-lt); }
.t-nuevo      { --tipo: var(--brand-dk); --tipo-lt: var(--brand-lt); }
.t-consolidar { --tipo: var(--accent-dk);--tipo-lt: var(--accent-lt); }
.t-cierre     { --tipo: var(--lila-dk);  --tipo-lt: var(--lila-lt); }
.hoy .hb.t-repaso.ok     { background: var(--info-lt); }
.hoy .hb.t-consolidar.ok { background: var(--accent-lt); }
.hoy .hb.t-cierre.ok     { background: var(--lila-lt); }

/* ------------------------------------------------------------- sendero */
.unidad { margin-top: 26px; }
.unidad-h {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: var(--radio);
  background: var(--surface); border: 0; box-shadow: none;
}
.unidad-i {
  flex: 0 0 40px; width: 40px; height: 40px; border-radius: var(--radio-s);
  background: var(--brand-lt); color: var(--brand-dk); display: grid; place-items: center;
  border: 0; box-shadow: none;
}
.unidad-i svg { width: 22px; height: 22px; }

.sendero {
  position: relative; display: flex; flex-direction: column; align-items: center;
  gap: 0; padding: 20px 0 6px;
}
.sendero::before {
  content: ""; position: absolute; left: 50%; top: 14px; bottom: 14px; width: 2px;
  margin-left: -1px; border-radius: 2px; background: var(--line);
}
.nodo {
  position: relative; z-index: 2; width: 132px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  text-decoration: none; color: var(--ink); padding: 7px 0 14px;
  transition: opacity .12s;
  -webkit-tap-highlight-color: transparent;
}
.nodo:hover { color: var(--ink); }
.nodo:active { opacity: .7; }
.nodo.p-a { left: -92px; }
.nodo.p-b { left: 0; }
.nodo.p-c { left: 92px; }

/* El nodo es un círculo de color plano. Nada de relieve ni de hundimiento:
   el color y el icono ya dicen en qué estado está. */
.nodo-c {
  position: relative; width: 64px; height: 64px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface); border: 0;
  box-shadow: none;
  transition: background .14s;
}
.nodo-c svg { width: 28px; height: 28px; }
.nodo-c b { font-size: 1.35rem; line-height: 1; font-weight: 700; }
.nodo-t { font-size: .78rem; font-weight: 500; text-align: center; line-height: 1.25; max-width: 128px; color: var(--ink-2); }
.nodo-b {
  font-size: .625rem; font-weight: 650; text-transform: uppercase; letter-spacing: .05em;
  color: var(--danger-dk); background: var(--danger-lt);
  border: 0; border-radius: 6px; padding: 1px 7px;
}

.nodo.bloq { opacity: 1; }
.nodo.bloq .nodo-c { background: var(--line); box-shadow: none; }
.nodo.bloq .nodo-c svg { color: var(--ink-3); }
.nodo.bloq .nodo-t { color: var(--ink-3); }

.nodo.dom .nodo-c { background: var(--oro); }
.nodo.dom .nodo-c svg { color: var(--accent-ink); }

.nodo.oxi .nodo-c { background: var(--accent); }
.nodo.oxi .nodo-c svg { color: var(--accent-ink); }

.nodo.curso .nodo-c { background: var(--brand-lt); }
.nodo.curso .nodo-c b { color: var(--brand-dk); }

.nodo.libre .nodo-c { background: var(--brand-lt); }
.nodo.libre .nodo-c svg { color: var(--brand-dk); margin-left: 2px; }

/* el que toca hoy: azul sólido, y un anillo fino alrededor.
   Ojo con el nombre: .hoy ya es la tarjeta de la lección del día. */
.nodo.toca .nodo-c::before {
  content: ""; position: absolute; inset: -6px; border-radius: 50%;
  border: 2px solid var(--brand); opacity: .34; pointer-events: none;
}
.nodo.toca:not(.curso) .nodo-c { background: var(--brand); }
.nodo.toca:not(.curso) .nodo-c svg { color: var(--brand-ink); }
.nodo.toca .nodo-t { color: var(--ink); font-weight: 600; }
.nodo-b.toca { color: var(--brand-dk); background: var(--brand-lt); }

.nodo-anillo { position: absolute; left: -6px; top: -6px; width: 76px; height: 76px; }
.nodo-anillo circle {
  fill: none; stroke: var(--brand); stroke-width: 4; stroke-linecap: round;
  transform: rotate(-90deg); transform-origin: 50% 50%;
  transition: stroke-dashoffset .6s cubic-bezier(.3, 1, .4, 1);
}

.nodo.vence .nodo-c::after {
  content: ""; position: absolute; inset: -6px; border-radius: 50%;
  border: 2px solid var(--accent); animation: latido 2s ease-out infinite;
}
@keyframes latido {
  0%   { transform: scale(.9); opacity: .8; }
  70%  { transform: scale(1.18); opacity: 0; }
  100% { transform: scale(1.18); opacity: 0; }
}

/* --------------------------------------------------------- la lección */
.leccion {
  position: fixed; inset: 0; z-index: 80; background: var(--paper);
  display: flex; flex-direction: column;
}
.lec-top {
  flex: 0 0 auto; display: flex; align-items: center; gap: 12px;
  padding: max(10px, env(safe-area-inset-top)) 12px 11px;
  border-bottom: 1px solid var(--line); background: var(--surface);
}
.lec-barra { flex: 1; display: flex; gap: 4px; }
.lec-barra span {
  flex: 1; height: 6px; border-radius: 20px; background: var(--line);
  border: 0; transition: background .3s;
}
.lec-barra span.ok { background: var(--brand); }
.lec-barra span.ahora { background: var(--brand); opacity: .45; }

.lec-cuerpo {
  flex: 1 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 20px 16px 26px; max-width: 560px; width: 100%; margin: 0 auto;
}
.lec-cuerpo h1 { font-size: 1.6rem; }

.lec-tipo {
  display: inline-block; font-size: .6875rem; font-weight: 650;
  text-transform: uppercase; letter-spacing: .08em;
  color: var(--tipo, var(--brand-dk)); background: var(--tipo-lt, var(--brand-lt));
  border: 0; box-shadow: none;
  border-radius: 6px; padding: 4px 10px;
}
.fuerza { display: flex; flex-direction: column; gap: 5px; margin: 12px 0 4px; max-width: 320px; }

.lec-pie {
  flex: 0 0 auto; display: flex; gap: 10px; align-items: center;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line); background: var(--surface);
}
.lec-pie .btn { flex: 1; justify-content: center; min-height: 50px; font-size: 1rem; }
.lec-pie #lecSaltar { flex: 0 0 auto; }

.lec-fin { padding: 34px 18px calc(40px + env(safe-area-inset-bottom)); text-align: center; overflow-y: auto; }
.lec-fin-ico {
  width: 92px; height: 92px; border-radius: 50%; margin: 0 auto 16px;
  background: var(--oro-lt); display: grid; place-items: center;
  border: 0; box-shadow: none;
  animation: pop .5s cubic-bezier(.2, 1.4, .4, 1);
}
.lec-fin-ico svg { width: 46px; height: 46px; color: var(--oro-dk); }
.lec-fin .lead { max-width: 52ch; margin-inline: auto; }

/* ---------------------------------------------- sesión guiada (modal) */
.sesion-modal { width: 100%; max-width: 440px; max-height: 88vh; overflow-y: auto; }
.sesion-modal textarea { min-height: 72px; }

/* ------------------------------------------- estado de un ejercicio */
.estado-ej { background: var(--surface); }
.estado-ej .note { margin-top: 14px; }

/* ------------------------------------------------ fichas con icono */
.tile-i {
  flex: 0 0 44px; width: 44px; height: 44px; border-radius: var(--radio-s);
  background: var(--brand-lt); color: var(--brand-dk); display: grid; place-items: center;
  border: 0; box-shadow: none;
}
.tile-i svg { width: 23px; height: 23px; }
.tile-i.danger { background: var(--danger-lt); color: var(--danger-dk); }
.tile-i.oro { background: var(--oro-lt); color: var(--oro-dk); }
.tile-i.oro svg { color: inherit; }

/* Un logro sin conseguir NO se transparenta: sobre un fondo gris claro la
   tarjeta entera desaparece. Se apaga el texto y el icono, y la tarjeta sigue
   siendo una tarjeta. */
.logro { display: flex; gap: 12px; align-items: flex-start; }
.logro:not(.ok) .tile-i { background: var(--surface-2); box-shadow: none; color: var(--ink-3); }
.logro:not(.ok) b { color: var(--ink-3); font-weight: 600; }
.logro.ok { background: var(--surface); }
.logro.ok .tile-i { background: var(--oro-lt); color: var(--oro-dk); }

.perro-fila { display: flex; gap: 12px; align-items: center; }
.perro-fila.act { background: var(--brand-lt); }
.perro-fila .av {
  flex: 0 0 46px; width: 46px; height: 46px; border-radius: 50%; overflow: hidden;
  background: var(--accent-lt); display: grid; place-items: center;
  border: 0;
}
.perro-fila .av img { width: 100%; height: 100%; object-fit: cover; }
.perro-fila .av svg { width: 26px; height: 26px; color: var(--accent-dk); }

/* ------------------------------------------------ aviso de conexión */
.conexion {
  position: fixed; z-index: 75; left: 50%; transform: translateX(-50%);
  bottom: calc(76px + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 8px;
  padding: 8px 15px; border-radius: 9px;
  font-size: .82rem; font-weight: 500;
  background: var(--ink); color: var(--paper);
  border: 0; box-shadow: var(--elev-1);
}
.conexion svg { width: 17px; height: 17px; }
.conexion.off { background: var(--danger); color: #fff; }
.conexion.pend { background: var(--info-dk); color: #fff; }

/* ------------------------------------------------------- gráficas */
.g-svg { width: 100%; height: auto; display: block; overflow: visible; }
.g-rejilla { stroke: var(--line); stroke-width: 1; }
.g-eje { fill: var(--ink-3); font-size: 11px; font-family: var(--font-b); font-weight: 500; }
.g-barra { fill: var(--brand); stroke: none; }
.g-barra:hover { fill: var(--brand-pr); }
.g-barra.hoy { fill: var(--accent); }

/* ------------------------------------------ fuerza de cada señal */
.fuerzas { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.fuerza-f {
  display: grid; grid-template-columns: minmax(110px, 1.1fr) 2fr auto;
  gap: 12px; align-items: center; text-decoration: none; color: var(--ink);
}
a.fuerza-f:hover { color: var(--brand); }
.fuerza-t { font-size: .88rem; font-weight: 500; line-height: 1.35; }
.fuerza-t .nodo-b { margin-left: 4px; }
.fuerza-v { font-size: .84rem; font-weight: 600; font-variant-numeric: tabular-nums; min-width: 44px; text-align: right; color: var(--ink-2); }

/* --------------------------------------------- avisos del panel */
.aviso-adm { position: relative; padding-right: 44px; }
.aviso-x {
  position: absolute; top: 10px; right: 10px;
  width: 30px; height: 30px; border-radius: 50%;
  border: 0; background: transparent; color: var(--ink-3);
  cursor: pointer; font-size: 1rem; line-height: 1; box-shadow: none;
}
.aviso-x:hover { background: rgba(0, 0, 0, .06); color: var(--ink); }

/* ---------------------------------------------------- animaciones */
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes modalIn { from { transform: translateY(14px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes viewIn { from { transform: translateY(6px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ----------------------------------------------------------- impresión */
@media print {
  .side, .topbar, .tabbar, .scene-bar, .btn, .icon-btn, .conexion, .top { display: none !important; }
  .main { margin: 0; }
  .card { box-shadow: none; break-inside: avoid; }
  body { background: #fff; }
  main#main { border: 0; }
}

/* ============================================================================
   Componentes de maqueta
   ---------------------------------------------------------------------------
   Cabeceras compactas, listas agrupadas con separadores de un píxel, grupos de
   botones que no se parten en escalera y tiras de filtros que se deslizan.
   ========================================================================= */

/* --------------------------------------------------- cabecera de pantalla */
/* Título grande, como el de una aplicación. El icono es pequeño y en tinte:
   un cuadrado de color saturado al lado de un titular es lo que hacía que
   esto pareciera una plantilla. */
.cabecera {
  display: flex; align-items: center; gap: 12px; margin-bottom: var(--e2);
}
.cab-ico {
  flex: 0 0 44px; width: 44px; height: 44px; border-radius: var(--radio-s);
  display: grid; place-items: center;
  background: var(--brand-lt); color: var(--brand-dk);
  border: 0; box-shadow: none;
}
.cab-ico svg { width: 23px; height: 23px; }
.cab-txt { min-width: 0; }
.cab-txt .eyebrow { margin-bottom: 1px; }
.cab-txt h1 { margin: 0; font-size: 1.625rem; font-weight: 700; letter-spacing: -.022em; }
.cab-lead { font-size: .9375rem; color: var(--ink-2); font-weight: 400; margin: var(--e2) 0 var(--e4); max-width: 60ch; }

/* colores de la cabecera según la sección */
.cab-ico.acento { background: var(--accent-lt); color: var(--accent-dk); }
.cab-ico.oro    { background: var(--oro-lt);    color: var(--oro-dk); }
.cab-ico.info   { background: var(--info-lt);   color: var(--info-dk); }
.cab-ico.peligro{ background: var(--danger-lt); color: var(--danger-dk); }
.cab-ico.lila   { background: var(--lila-lt);   color: var(--lila-dk); }

/* ------------------------------------------------------ filas tocables */
/* Lista agrupada: un bloque blanco con las filas dentro separadas por una
   línea de un píxel. Es el patrón de ajustes de cualquier móvil, y es lo que
   más aleja esto de una web con tarjetas sueltas. */
.lista {
  display: flex; flex-direction: column; gap: 0;
  background: var(--surface); border-radius: var(--radio); overflow: hidden;
}
.fila {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; min-height: 64px;
  background: transparent; color: var(--ink); text-decoration: none;
  border: 0; border-radius: 0;
  box-shadow: none;
  transition: background .14s;
  -webkit-tap-highlight-color: transparent;
}
.fila + .fila { box-shadow: inset 0 1px 0 var(--line); }
.fila:hover { color: var(--ink); background: var(--surface-2); }
.fila:active { background: var(--paper-2); }
.fila-i {
  flex: 0 0 38px; width: 38px; height: 38px; border-radius: 9px;
  display: grid; place-items: center;
  background: var(--brand-lt); color: var(--brand-dk);
  border: 0; font-weight: 650; font-size: .95rem;
}
.fila-i svg { width: 21px; height: 21px; }
.fila-i.acento { background: var(--accent-lt); color: var(--accent-dk); }
.fila-i.oro    { background: var(--oro-lt);    color: var(--oro-dk); }
.fila-i.info   { background: var(--info-lt);   color: var(--info-dk); }
.fila-i.peligro{ background: var(--danger-lt); color: var(--danger-dk); }
.fila-i.lila   { background: var(--lila-lt);   color: var(--lila-dk); }
.fila-t { flex: 1; min-width: 0; line-height: 1.35; }
.fila-t b { display: block; font-size: .9375rem; font-weight: 600; }
.fila-t span {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  font-size: .82rem; color: var(--ink-3); font-weight: 400;
}
.fila-x { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; color: var(--ink-3); }
.fila-x::after {
  content: ""; width: 8px; height: 8px; flex: 0 0 8px;
  border-right: 1.5px solid var(--line-2); border-top: 1.5px solid var(--line-2);
  transform: rotate(45deg); border-radius: 1px;
}
.fila.sin-flecha .fila-x::after { display: none; }

/* -------------------------------------------------- grupos de botones */
.acciones { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.acciones .btn { width: 100%; }
.acciones.dos { grid-template-columns: repeat(2, 1fr); }
.acciones.par-ancho { grid-template-columns: 1fr 2fr; }

/* ------------------------------------------------------ tira de filtros */
.tira {
  display: flex; align-items: center; gap: 6px; overflow-x: auto;
  padding: 2px 2px 10px; scrollbar-width: none; scroll-snap-type: x proximity;
}
.tira::-webkit-scrollbar { display: none; }
.tira > * { flex: 0 0 auto; scroll-snap-align: start; }

/* ----------------------------------------------- sección con banda de color */
/* La banda de color es un tinte suave, no un bloque saturado: distingue la
   categoría sin gritar. */
.panel {
  border: 0; border-radius: var(--radio);
  background: var(--surface); box-shadow: none; overflow: hidden;
  margin-bottom: var(--e3);
}
.panel-h {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  background: transparent; border-bottom: 1px solid var(--line);
}
.panel-h .unidad-i { box-shadow: none; }
.panel-h-t { flex: 1; min-width: 0; }
.panel-h-t b { display: block; font-weight: 650; font-size: 1rem; letter-spacing: -.01em; }
.panel-h-t span { display: block; font-size: .8rem; color: var(--ink-3); font-weight: 400; }
.panel-in { padding: 12px 14px 14px; }
.panel-in > *:last-child { margin-bottom: 0; }

/* colores por categoría: solo el icono cambia de tinte */
.panel.c-fundamentos .unidad-i { background: var(--brand-lt);  color: var(--brand-dk); }
.panel.c-obediencia  .unidad-i { background: var(--accent-lt); color: var(--accent-dk); }
.panel.c-convivencia .unidad-i { background: var(--info-lt);   color: var(--info-dk); }
.panel.c-cuidados    .unidad-i { background: var(--danger-lt); color: var(--danger-dk); }
.panel.c-olfato      .unidad-i { background: var(--oro-lt);    color: var(--oro-dk); }
.panel.c-trucos      .unidad-i { background: var(--lila-lt);   color: var(--lila-dk); }
.panel .unidad-i svg { color: inherit; }

/* --------------------------------------------------------- datos sueltos */
/* Una cifra con su etiqueta. Plano y sin píldora: el icono en tinte ya
   separa un dato del siguiente. */
/* En rejilla, no en flex: con flex cada dato mide lo que mide su texto y las
   dos filas quedan desalineadas, que es exactamente el aire de «plantilla
   web» que queremos evitar. */
.datos { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.dato {
  display: flex; align-items: center; gap: 9px;
  background: var(--surface); border: 0;
  border-radius: var(--radio-s); padding: 9px 14px 9px 9px; box-shadow: none;
}
.dato-i {
  width: 32px; height: 32px; border-radius: 8px; flex: 0 0 32px;
  display: grid; place-items: center; background: var(--brand-lt); color: var(--brand-dk);
}
.dato-i svg { width: 18px; height: 18px; }
.dato-i.acento { background: var(--accent-lt); color: var(--accent-dk); }
.dato-i.oro { background: var(--oro-lt); color: var(--oro-dk); }
.dato-i.peligro { background: var(--danger-lt); color: var(--danger-dk); }
.dato-v { font-size: 1.125rem; font-weight: 700; line-height: 1.15; letter-spacing: -.015em; }
.dato-k { font-size: .72rem; font-weight: 500; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); }

/* ------------------------------------------------------ zonas táctiles */
/* Ojo: .chip.brand también lleva la clase «brand». Si esta regla no va
   acotada a la marca de verdad, todas las etiquetas azules se estiran a
   44 px y arrastran a sus vecinas. */
a.brand, .acceso .brand, .adm-marca { min-height: 44px; }
.nodo-t { overflow-wrap: anywhere; }

/* ------------------------------------------------------------- mascota */
.mascota { margin: 0 auto 6px; }
.mascota svg { width: 100%; height: auto; }
/* En las celebraciones y en las pantallas vacías el perro va sin escenario:
   solo el bicho, que es lo que se quiere mirar. */
.mascota .sc-bg, .mascota .sc-man { display: none; }
.card.vacio { text-align: center; padding: 26px 20px 28px; }
.card.vacio h3 { margin-bottom: .2em; }
.lec-fin .mascota { margin-bottom: -26px; }

/* ============================================================================
   Densidad
   ---------------------------------------------------------------------------
   La columna nunca pasa de 560 px, así que no hay dos maquetas: el ejercicio
   siempre se lee como fila, con la miniatura a la izquierda.
   ========================================================================= */
.g3 { grid-template-columns: 1fr; gap: 0; background: var(--surface); border-radius: var(--radio); overflow: hidden; }
.ex-card { flex-direction: row; align-items: stretch; border-radius: 0; }
.ex-card + .ex-card { box-shadow: inset 0 1px 0 var(--line); }
.ex-card .ex-thumb {
  flex: 0 0 104px; aspect-ratio: 560/320; align-self: center;
  margin: 10px 0 10px 10px; border-radius: 8px;
  border: 0; overflow: hidden;
}
.ex-card .ex-body { padding: 10px 14px 10px 12px; justify-content: center; gap: 4px; }
.ex-card h3 { font-size: .9375rem; }
.ex-card .ex-d {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; font-size: .81rem; flex: 0 1 auto;
}
.ex-card .row { gap: 5px; }
.ex-card .chip { font-size: .68rem; padding: 1px 7px; box-shadow: none; }
.ex-num { top: 6px; left: 6px; font-size: .66rem; padding: 0 6px; }
.ex-done { width: 22px; height: 22px; top: 6px; right: 6px; }
.ex-done svg { width: 12px; height: 12px; }
/* dentro de un panel la lista ya está dentro de un bloque blanco */
.panel .g3 { border-radius: 0; background: transparent; }
.panel .ex-card { box-shadow: none; }
.panel .ex-card + .ex-card { box-shadow: inset 0 1px 0 var(--line); }

/* --------------------------------------------------------- responsive */
/* Solo hay una maqueta. Lo que cambia con el ancho es la densidad. */
@media (max-width: 660px) {
  .chip, .btn, .fchip { white-space: normal; }
  .soc-opts { flex: 1 1 100%; }
  .soc-opts .soc-b { flex: 1; padding: 9px 4px; text-align: center; }
  /* Un botón solo se estira si comparte la fila con otros botones. Al lado de
     un titular, estirarlo lo convierte en el protagonista de la pantalla. */
  .between > .btn { flex: 1 1 auto; }
  .between > h1 ~ .btn, .between > h2 ~ .btn, .between > h3 ~ .btn { flex: 0 0 auto; }
  .tbl { font-size: .85rem; }
  .tbl th, .tbl td { padding: 8px 9px; }
  .g4 { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .g4 .stat .v { font-size: 1.5rem; }
  /* La rejilla estira todas las fichas a la altura de la más alta. Sin esto,
     la que solo lleva una cifra se queda con la cifra arriba y medio palmo de
     blanco debajo. */
  .g4 > .card { padding: var(--e3); display: flex; flex-direction: column; justify-content: center; }
  .crumb { gap: 10px; }
  a.chip { min-height: 40px; padding-block: 9px; }
  .sc-btn { width: 40px; height: 40px; flex-basis: 40px; }

  .cab-ico { flex-basis: 40px; width: 40px; height: 40px; }
  .cab-ico svg { width: 21px; height: 21px; }
  .cab-txt h1 { font-size: 1.5rem; }
  .cab-lead { font-size: .9375rem; margin: 8px 0 16px; }
  .acciones { grid-template-columns: repeat(2, 1fr); }
  .acciones.una { grid-template-columns: 1fr; }
  .acciones.par-ancho { grid-template-columns: 1fr; }
  .panel-in { padding: 12px; }
  .fila { padding: 10px 12px; min-height: 60px; gap: 11px; }
  .sig { grid-template-columns: 70px 1fr; }
  .sig .ic { width: 70px; height: 56px; }
  .fuerza-f { grid-template-columns: 1fr auto; }
  .fuerza-f .bar { grid-column: 1 / -1; order: 3; }
  .fuerza-t { order: 1; }
  .fuerza-v { order: 2; }
  .timer-v { font-size: 2.7rem; }
  .dl > div { grid-template-columns: 1fr; gap: 2px; }
}

@media (max-width: 380px) {
  .nodo { width: 92px; }
  .nodo.p-a { left: -56px; }
  .nodo.p-c { left: 56px; }
  .nodo-c { width: 58px; height: 58px; }
  .nodo-anillo { left: -6px; top: -6px; width: 70px; height: 70px; }
  .tabbar a { font-size: .625rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  html { scroll-behavior: auto; }
}

/* El texto de las notas, con peso de lectura y no de titular. */
.note { font-size: .9375rem; }
.note p { margin-bottom: .55em; }

/* Subtítulo de una línea en las cabeceras de acordeón. */
.acc-t small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ------------------------------------------------------- ficha del perro */
.pp-cab { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.pp-foto {
  position: relative; flex: 0 0 80px; width: 80px; height: 80px;
  border-radius: 50%; overflow: visible; cursor: pointer;
  background: var(--accent-lt); color: var(--accent-dk);
  border: 0; box-shadow: none;
  display: grid; place-items: center;
}
.pp-foto img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.pp-foto > svg { width: 40px; height: 40px; }
.pp-foto-x {
  position: absolute; right: -2px; bottom: -2px;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--brand); color: #fff; display: grid; place-items: center;
  border: 2px solid var(--paper);
}
.pp-foto-x svg { width: 15px; height: 15px; }
.pp-quien { min-width: 0; }
.pp-quien b { display: block; font-weight: 700; font-size: 1.3rem; line-height: 1.2; letter-spacing: -.02em; }
.pp-quien > span { display: block; font-size: .86rem; color: var(--ink-2); font-weight: 400; }
.pp-quien > span.tiny { font-size: .78rem; color: var(--ink-3); margin-top: 2px; }

/* Rejilla de campos: todos con la misma anchura, sin flexbox a ojo. */
.rejilla-campos { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.rejilla-campos .ancho { grid-column: 1 / -1; }
