
:root{
  --bg:#070312;
  --bg2:#140424;
  --panel:#1a0933;
  --panel2:#261046;
  --line:rgba(255,255,255,.12);
  --text:#f5ecff;
  --muted:#cdb7e8;
  --gold:#ffd25e;
  --purple:#8d3dff;
  --pink:#d74cff;
  --cyan:#29d3ff;
}

*{box-sizing:border-box}

html{scroll-behavior:smooth}

body{
  margin:0;
  font-family:Inter,Segoe UI,Arial,sans-serif;
  color:var(--text);
  background:
    radial-gradient(circle at top left, rgba(172,72,255,.22), transparent 25%),
    radial-gradient(circle at right top, rgba(255,120,40,.12), transparent 20%),
    linear-gradient(135deg,#090312,#130327 40%,#060211);
  min-height:100vh;
}

body:before{
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
  background-image:radial-gradient(rgba(255,255,255,.08) 1px, transparent 1px);
  background-size:26px 26px;
  opacity:.25;
}

.top{
  position:sticky;
  top:0;
  z-index:20;
  backdrop-filter:blur(16px);
  background:rgba(8,2,18,.82);
  border-bottom:1px solid var(--line);
  padding:18px 26px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:20px;
}

.top h1{
  margin:0;
  font-size:38px;
  font-weight:900;
  letter-spacing:.03em;
  color:white;
}

.top p{
  margin:6px 0 0;
  color:var(--muted);
}

nav{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

main{
  width:min(1400px,95vw);
  margin:26px auto 80px;
}

.card{
  background:
    linear-gradient(180deg, rgba(46,17,84,.92), rgba(22,8,42,.96));
  border:1px solid rgba(255,255,255,.08);
  border-radius:28px;
  box-shadow:
    0 25px 70px rgba(0,0,0,.45),
    inset 0 1px 0 rgba(255,255,255,.04);
}

.hero{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:36px;
  padding:36px;
  margin-bottom:24px;
}

.hero h2{
  font-size:42px;
  margin:10px 0;
}

.hero p{
  font-size:18px;
  line-height:1.7;
  color:var(--muted);
}

form{
  display:grid;
  gap:16px;
}

label{
  display:grid;
  gap:8px;
  font-weight:700;
  color:#efe4ff;
}

input{
  width:100%;
  padding:16px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.06);
  color:white;
  font-size:16px;
}

button{
  border:none;
  border-radius:16px;
  padding:14px 18px;
  font-weight:800;
  cursor:pointer;
  color:white;
  background:rgba(255,255,255,.08);
  transition:.25s;
}

button:hover{
  transform:translateY(-2px);
  background:rgba(255,255,255,.15);
}

.primary{
  background:linear-gradient(90deg,var(--purple),var(--pink));
}

.resultHeader{
  padding:32px;
  margin-bottom:20px;
  display:flex;
  justify-content:space-between;
  gap:20px;
  align-items:center;
}

.resultHeader h2{
  font-size:36px;
  margin:8px 0;
}

.quickNav{
  padding:18px;
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-bottom:20px;
}

.quickNav button{
  background:#30114f;
  border:1px solid rgba(255,255,255,.08);
}

.gridStats{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:18px;
  margin-bottom:22px;
}

.stat{
  min-height:180px;
  padding:24px;
  border-radius:24px;
  background:linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
  border:1px solid rgba(255,255,255,.08);
}

.stat:nth-child(1){box-shadow:inset 0 0 0 1px rgba(41,211,255,.35)}
.stat:nth-child(2){box-shadow:inset 0 0 0 1px rgba(144,255,41,.25)}
.stat:nth-child(3){box-shadow:inset 0 0 0 1px rgba(255,180,41,.25)}
.stat:nth-child(4){box-shadow:inset 0 0 0 1px rgba(227,97,255,.25)}

.stat small{
  display:block;
  margin-bottom:18px;
  color:var(--gold);
  font-size:12px;
  font-weight:900;
  letter-spacing:.06em;
}

.stat strong{
  display:block;
  font-size:28px;
  margin-bottom:10px;
}

.stat span{
  line-height:1.8;
  color:#f4ebff;
  font-size:17px;
}

.report{
  display:grid;
  gap:26px;
}

.reportBlock{
  padding:36px;
}

.reportBlock h3{
  font-size:44px;
  margin-bottom:26px;
  color:var(--gold);
}

.reportBlock > div{
  white-space:pre-line;
  line-height:1.9;
  font-size:18px;
  color:#f3eaff;
}

.withImage{
  display:grid;
  grid-template-columns:1fr 180px;
  gap:28px;
  align-items:start;
}

.withImage img{
  width:160px;
  border-radius:22px;
  border:1px solid rgba(255,255,255,.15);
  box-shadow:0 10px 30px rgba(0,0,0,.35);
}

.predictionWide{
  margin-top:26px;
  padding:28px;
  border-radius:24px;
  background:linear-gradient(90deg, rgba(90,22,148,.42), rgba(18,8,55,.7));
  border:1px solid rgba(255,255,255,.08);
}

.predictionWide h4{
  margin:0 0 18px;
  color:var(--gold);
  font-size:30px;
}

.predictionWide p{
  margin:0;
  font-size:18px;
  line-height:2;
  color:#f3e9ff;
}

.badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  border-radius:999px;
  padding:10px 16px;
  background:linear-gradient(90deg,#ffcc63,#ff8d2f);
  color:#240b00;
  font-weight:900;
}

.savedPill{
  padding:10px 14px;
  border-radius:999px;
  background:#1d5e37;
  color:#e8fff1;
  font-weight:700;
}

.hidden{display:none!important}

@media(max-width:980px){
  .hero,
  .withImage,
  .gridStats{
    grid-template-columns:1fr;
  }

  .top{
    flex-direction:column;
    align-items:flex-start;
  }

  .reportBlock{
    padding:24px;
  }

  .reportBlock h3{
    font-size:32px;
  }

  .hero h2{
    font-size:34px;
  }
}


/* =========================================================
   V14 ENTERPRISE VISUAL FIX
   Correcciones solicitadas:
   - títulos no se cortan al navegar
   - botón "Volver al principio" funcional
   - resumen general con separación real
   - predicción anual abajo a todo el ancho
   - lectura premium tipo dashboard oscuro/neón
   ========================================================= */

:root{
  --v14-bg:#05000d;
  --v14-panel:#120721;
  --v14-panel-2:#1d0b35;
  --v14-card:#1a0b31;
  --v14-card-soft:#251043;
  --v14-border:rgba(186,113,255,.24);
  --v14-border-strong:rgba(205,91,255,.42);
  --v14-text:#f8f2ff;
  --v14-muted:#cbb6ec;
  --v14-gold:#ffd558;
  --v14-purple:#8c35ff;
  --v14-pink:#ff4fd8;
  --v14-blue:#2ccfff;
  --v14-green:#72ff7a;
  --v14-orange:#ff9c35;
}

html{
  scroll-padding-top:150px;
}

body{
  overflow-x:hidden;
  background:
    radial-gradient(circle at 80% 5%, rgba(170,44,255,.18), transparent 30%),
    radial-gradient(circle at 14% 0%, rgba(32,149,255,.13), transparent 24%),
    linear-gradient(135deg,#06000d,#120022 48%,#05000b) !important;
  color:var(--v14-text);
}

/* Header menos invasivo para que no tape títulos */
.top{
  min-height:92px;
  padding:20px 24px !important;
  border-bottom:1px solid rgba(255,255,255,.08) !important;
  background:rgba(6,0,15,.88) !important;
  backdrop-filter:blur(18px);
}

.top h1{
  font-size:36px !important;
  line-height:1.05 !important;
  margin:0 !important;
  letter-spacing:.01em;
}

.top p{
  margin-top:10px !important;
  color:var(--v14-muted) !important;
}

.top nav button{
  border:1px solid rgba(255,255,255,.08);
  background:linear-gradient(180deg,rgba(255,255,255,.10),rgba(255,255,255,.04));
  box-shadow:0 10px 28px rgba(0,0,0,.22);
}

/* Menú superior de lectura como la captura aprobada */
.quickNav.card{
  position:sticky;
  top:92px;
  z-index:16;
  align-items:center;
  border-radius:0 0 22px 22px !important;
  background:rgba(13,4,28,.90) !important;
  border:1px solid rgba(255,255,255,.08) !important;
  backdrop-filter:blur(18px);
  box-shadow:0 18px 40px rgba(0,0,0,.28);
}

.quickNav b{
  color:#f5eaff;
  margin-right:6px;
}

.quickNav button,
.readerNav button{
  color:#f8efff;
  background:linear-gradient(180deg,rgba(90,39,147,.80),rgba(37,13,69,.88)) !important;
  border:1px solid rgba(255,255,255,.11) !important;
  min-height:42px;
}

.quickNav button:hover,
.readerNav button:hover,
.quickNav button.activeRead,
.readerNav button.activeRead{
  background:linear-gradient(135deg,#7f28ff,#c047ff) !important;
  color:white !important;
}

/* Evita títulos tapados por header/menú sticky */
#resultado,
#informe,
.reportBlock,
#secEdad,#secSigno,#secAnimal,#secDestino,#secExpresion,#secAlma,#secPersonalidad,#secPrediccion,#secIA,#secCompatibilidad,#secExtra{
  scroll-margin-top:174px !important;
}

.card{
  border:1px solid var(--v14-border) !important;
  background:
    linear-gradient(180deg,rgba(44,16,82,.94),rgba(17,6,34,.96)) !important;
  box-shadow:
    0 24px 60px rgba(0,0,0,.42),
    inset 0 1px 0 rgba(255,255,255,.04) !important;
}

.resultHeader.card{
  padding:30px !important;
  border-radius:28px !important;
  background:
    radial-gradient(circle at 88% 20%, rgba(255,135,54,.16), transparent 24%),
    linear-gradient(135deg,rgba(40,13,80,.98),rgba(13,4,32,.98)) !important;
}

.resultHeader h2{
  color:white;
  font-size:38px !important;
  line-height:1.08;
  margin:10px 0 !important;
}

.resultHeader p{
  color:var(--v14-muted);
  font-size:17px;
}

/* Layout del informe con barra lateral limpia */
.reportShell{
  display:grid !important;
  grid-template-columns:240px minmax(0,1fr);
  gap:22px;
  align-items:start;
}

.readerNav.card{
  position:sticky;
  top:168px;
  display:flex;
  flex-direction:column;
  gap:10px;
  padding:18px !important;
  max-height:calc(100vh - 190px);
  overflow:auto;
  border-radius:24px !important;
}

.readerNav b{
  font-size:15px;
  color:var(--v14-gold);
  margin-bottom:6px;
}

.readerNav button{
  width:100%;
  text-align:left;
  padding:12px 14px;
  border-radius:14px;
}

.readerNav .primary{
  text-align:center;
  background:linear-gradient(135deg,#bd1850,#e94485) !important;
}

.report{
  min-width:0;
  display:grid;
  gap:24px;
}

.reportBlock.card{
  position:relative;
  overflow:visible !important;
  padding:34px !important;
  border-radius:28px !important;
  min-height:auto !important;
  scroll-margin-top:174px !important;
}

.reportBlock.card:before{
  content:"";
  display:block;
  width:72px;
  height:3px;
  border-radius:999px;
  margin-bottom:20px;
  background:linear-gradient(90deg,var(--v14-gold),transparent);
}

.reportBlock h3{
  margin:0 0 24px !important;
  padding:0 !important;
  color:var(--v14-gold) !important;
  font-size:34px !important;
  line-height:1.15 !important;
  letter-spacing:-.02em;
  overflow:visible !important;
}

.reportBlock > div{
  color:var(--v14-text);
  font-size:17px;
  line-height:1.8;
  white-space:normal !important;
}

/* Resumen general ordenado */
.summaryGrid{
  display:grid !important;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:16px !important;
  margin-top:6px;
}

.summaryGrid > div{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  min-height:64px;
  padding:18px 20px !important;
  border-radius:18px;
  background:linear-gradient(180deg,rgba(255,255,255,.075),rgba(255,255,255,.035));
  border:1px solid rgba(255,255,255,.10);
}

.summaryGrid b{
  color:var(--v14-gold);
  font-size:13px;
  text-transform:uppercase;
  letter-spacing:.06em;
  flex:0 0 auto;
}

.summaryGrid span{
  color:white;
  font-size:18px;
  font-weight:800;
  text-align:right;
  overflow-wrap:anywhere;
}

/* Lectura guiada premium */
.guidedGridV14{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:18px;
}

.guidedCardV14{
  min-height:250px;
  padding:24px;
  border-radius:24px;
  border:1px solid rgba(255,255,255,.11);
  background:linear-gradient(180deg,rgba(255,255,255,.075),rgba(255,255,255,.026));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.04);
}

.guidedCardV14:nth-child(1){box-shadow:inset 0 0 0 1px rgba(44,207,255,.34)}
.guidedCardV14:nth-child(2){box-shadow:inset 0 0 0 1px rgba(114,255,122,.24)}
.guidedCardV14:nth-child(3){box-shadow:inset 0 0 0 1px rgba(255,156,53,.26)}
.guidedCardV14:nth-child(4){box-shadow:inset 0 0 0 1px rgba(255,79,216,.28)}

.guidedIconV14{
  width:58px;
  height:58px;
  display:grid;
  place-items:center;
  border-radius:999px;
  margin-bottom:18px;
  font-size:26px;
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.15);
}

.guidedCardV14 h4{
  margin:0 0 14px;
  color:var(--v14-gold);
  font-size:15px;
  line-height:1.25;
  text-transform:uppercase;
  letter-spacing:.04em;
}

.guidedCardV14 p{
  margin:0;
  color:#f7efff;
  line-height:1.75;
  font-size:17px;
}

/* Predicción anual abajo, ancho completo */
.predictionWideV14{
  margin-top:18px;
  padding:30px;
  border-radius:26px;
  background:
    radial-gradient(circle at 96% 20%, rgba(255,118,54,.16), transparent 28%),
    linear-gradient(135deg,rgba(90,23,143,.55),rgba(9,7,40,.86));
  border:1px solid var(--v14-border-strong);
}

.predictionWideV14 h4{
  margin:0 0 18px;
  color:var(--v14-gold);
  font-size:30px;
  line-height:1.15;
}

.predictionWideV14 p{
  margin:0;
  color:#fbf7ff;
  font-size:18px;
  line-height:1.95;
  max-width:1100px;
}

.predictionListV14{
  display:grid;
  gap:14px;
  margin-top:20px;
}

.predictionLineV14{
  display:grid;
  grid-template-columns:76px 1fr;
  gap:18px;
  align-items:start;
  padding:16px;
  border-radius:20px;
  background:rgba(255,255,255,.045);
  border:1px solid rgba(255,255,255,.08);
}

.predictionLineV14 .round{
  width:58px;
  height:58px;
  display:grid;
  place-items:center;
  border-radius:999px;
  font-size:28px;
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.16);
}

.predictionLineV14 b{
  display:block;
  color:var(--v14-gold);
  font-size:18px;
  margin-bottom:4px;
}

.predictionLineV14 span{
  color:#efe6ff;
  line-height:1.7;
}

/* Animal con imagen sin romper la botonera */
.withImage{
  display:grid !important;
  grid-template-columns:minmax(0,1fr) 150px !important;
  gap:24px !important;
  align-items:start !important;
}

.withImage .back{
  grid-column:1 / -1;
}

.withImage img{
  width:140px !important;
  max-width:100%;
  border-radius:22px !important;
  border:1px solid rgba(255,255,255,.22) !important;
  box-shadow:0 18px 45px rgba(0,0,0,.35);
}

/* Botones volver */
.back.noPrint,
button.back{
  margin-top:24px !important;
  width:auto !important;
  min-width:210px;
  background:linear-gradient(135deg,rgba(125,48,208,.82),rgba(63,23,103,.88)) !important;
  border:1px solid rgba(255,255,255,.16) !important;
  color:white !important;
}

.back.noPrint:hover,
button.back:hover{
  background:linear-gradient(135deg,#8e35ff,#c247ff) !important;
}

/* Cards superiores */
.gridStats{
  grid-template-columns:repeat(4,minmax(0,1fr)) !important;
  gap:16px !important;
}

.stat.card{
  min-height:142px !important;
  padding:22px !important;
  text-align:left;
}

.stat small{
  color:var(--v14-gold) !important;
  font-size:12px !important;
}

.stat strong{
  color:white;
  font-size:27px !important;
  line-height:1.12;
}

.stat span{
  color:var(--v14-muted);
}

/* Historial/editor más prolijos */
.historyHeader,
.editorPanel,
.historyItem{
  border-radius:24px !important;
}

.historyMeta{
  color:var(--v14-muted) !important;
  line-height:1.6;
}

textarea,
select,
input{
  border:1px solid rgba(255,255,255,.14) !important;
  background:rgba(255,255,255,.07) !important;
  color:white !important;
}

textarea{
  min-height:420px;
  line-height:1.7;
}

/* Mobile */
@media(max-width:1100px){
  .reportShell{
    grid-template-columns:1fr !important;
  }
  .readerNav.card{
    position:relative;
    top:auto;
    max-height:none;
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .guidedGridV14,
  .gridStats{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }
}

@media(max-width:720px){
  html{scroll-padding-top:120px}
  .top{
    position:relative !important;
    min-height:auto;
  }
  .quickNav.card{
    position:relative;
    top:auto;
  }
  #resultado,#informe,.reportBlock,#secEdad,#secSigno,#secAnimal,#secDestino,#secExpresion,#secAlma,#secPersonalidad,#secPrediccion,#secIA,#secCompatibilidad,#secExtra{
    scroll-margin-top:24px !important;
  }
  .summaryGrid,
  .guidedGridV14,
  .gridStats,
  .withImage{
    grid-template-columns:1fr !important;
  }
  .reportBlock.card{
    padding:24px !important;
  }
  .reportBlock h3{
    font-size:28px !important;
  }
  .summaryGrid > div{
    align-items:flex-start;
    flex-direction:column;
    gap:8px;
  }
  .summaryGrid span{
    text-align:left;
  }
  .predictionLineV14{
    grid-template-columns:1fr;
  }
}

/* =========================================================
   V15 ENTERPRISE STABLE VISUAL FIX
   ========================================================= */
body{font-size:16px;}
.hidden{display:none!important;}
.top{min-height:118px;}
main{padding-top:10px;}
#resultado,#historial,#editor,#crear{scroll-margin-top:150px;}
.reportBlock{scroll-margin-top:150px; overflow:visible;}
.reportBlock h3{line-height:1.15; padding-top:6px; margin-top:0; word-break:normal;}
.resultHeader.card{margin-top:0;}
.summaryGrid{
  display:grid;
  grid-template-columns:repeat(2,minmax(260px,1fr));
  gap:14px;
  white-space:normal!important;
}
.summaryGrid>div{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:22px;
  min-height:64px;
  padding:16px 18px;
  border-radius:18px;
  background:rgba(255,255,255,.055);
  border:1px solid rgba(255,255,255,.1);
}
.summaryGrid b{color:#ffd25e; font-size:14px; letter-spacing:.02em;}
.summaryGrid span{font-size:18px; color:#fff; text-align:right; line-height:1.35;}
.guidedGridV14{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:18px;
  white-space:normal!important;
}
.guidedCardV14{
  min-height:245px;
  padding:22px;
  border-radius:22px;
  background:linear-gradient(180deg,rgba(255,255,255,.06),rgba(255,255,255,.025));
  border:1px solid rgba(255,255,255,.11);
}
.guidedIconV14{font-size:30px;margin-bottom:14px;}
.guidedCardV14 h4{margin:0 0 16px;color:#ffd25e;text-transform:uppercase;font-size:13px;line-height:1.25;}
.guidedCardV14 p{margin:0;line-height:1.75;font-size:16px;color:#f6ecff;}
.predictionWideV14{
  margin-top:22px;
  padding:28px;
  border-radius:24px;
  background:linear-gradient(135deg,rgba(98,24,160,.62),rgba(13,6,50,.94));
  border:1px solid rgba(255,255,255,.13);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.05), 0 22px 50px rgba(0,0,0,.28);
  white-space:normal!important;
}
.predictionWideV14 h4{margin:0 0 16px;color:#ffd25e;font-size:28px;line-height:1.2;}
.predictionWideV14 p{margin:0;line-height:1.85;font-size:17px;color:#fff;}
.predictionListV14{margin-top:22px;border:1px solid rgba(255,255,255,.1);border-radius:22px;overflow:hidden;}
.predictionLineV14{display:grid;grid-template-columns:62px 1fr;gap:16px;align-items:center;padding:16px 18px;border-bottom:1px solid rgba(255,255,255,.09);}
.predictionLineV14:last-child{border-bottom:none;}
.predictionLineV14 .round{width:50px;height:50px;border-radius:50%;display:grid;place-items:center;background:rgba(255,255,255,.08);font-size:24px;}
.predictionLineV14 b{display:block;color:#ffd25e;font-size:18px;margin-bottom:4px;}
.predictionLineV14 span{display:block;line-height:1.65;color:#f5edff;}
.historyHeader{padding:34px!important;margin-top:24px;}
.historyHeader h2{font-size:30px;margin:12px 0;}
.historyHeader input{margin-top:16px;}
.historyList{display:grid;gap:16px;margin-top:18px;}
.historyItem{padding:22px;display:grid;grid-template-columns:1fr auto;gap:18px;align-items:center;}
.historyItem h3{margin:0 0 12px;font-size:22px;color:#fff;}
.historyMeta{color:#dbc9f4;line-height:1.6;}
.miniActions{display:flex;gap:10px;flex-wrap:wrap;justify-content:flex-end;}
.actions{display:flex;gap:10px;flex-wrap:wrap;justify-content:flex-end;}
.back.noPrint,.back{margin-top:22px;}
@media(max-width:980px){
  .top{position:relative;min-height:auto;}
  #resultado,#historial,#editor,#crear,.reportBlock{scroll-margin-top:24px;}
  .guidedGridV14,.summaryGrid,.historyItem{grid-template-columns:1fr!important;}
  .summaryGrid>div{align-items:flex-start;flex-direction:column;gap:8px;}
  .summaryGrid span{text-align:left;}
  .guidedCardV14{min-height:auto;}
  .predictionLineV14{grid-template-columns:1fr;}
}

/* =========================================================
   V16 ENTERPRISE FIX — navegación real + lectura estable
   ========================================================= */
html{scroll-padding-top:190px!important;}
body{overflow-x:hidden!important;}
.top{position:sticky!important;top:0!important;z-index:80!important;}
.quickNav.card{position:sticky!important;top:118px!important;z-index:70!important;}
#resultado,#informe,#secEdad,#secSigno,#secAnimal,#secDestino,#secExpresion,#secAlma,#secPersonalidad,#secPrediccion,#secIA,#secCompatibilidad,#secExtra{scroll-margin-top:210px!important;}

/* Evita el problema donde Animal chino queda apretado a la derecha */
#secAnimal.reportBlock.card.withImage{
  display:block!important;
  padding:34px!important;
  min-width:0!important;
}
#secAnimal.reportBlock.card.withImage > div{width:100%!important;min-width:0!important;}
#secAnimal.reportBlock.card.withImage img{
  position:absolute!important;
  right:28px!important;
  top:28px!important;
  width:86px!important;
  height:86px!important;
  object-fit:cover!important;
  opacity:.95;
}
#secAnimal.reportBlock.card.withImage h3{padding-right:110px!important;}
#secAnimal .guidedGridV14{width:100%!important;}

.guidedGridV14{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(180px,1fr))!important;
  gap:18px!important;
  width:100%!important;
}
.guidedCardV14{min-width:0!important;overflow:visible!important;}
.guidedCardV14 p,.guidedCardV14 h4{overflow-wrap:normal!important;word-break:normal!important;hyphens:none!important;}

/* IA y compatibilidad ahora aparecen como secciones con acceso directo */
.aiBlock,.compatibilityBlock{scroll-margin-top:210px!important;}
.compatForm{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;align-items:end;margin:18px 0;}
.compatResultado,.compatScore{margin-top:16px;}

/* Botones activos y accesibilidad */
.quickNav button.activeRead,.readerNav button.activeRead{outline:2px solid rgba(255,213,88,.55)!important;}
button{touch-action:manipulation;}

@media(max-width:1180px){
  .quickNav.card{top:0!important;position:relative!important;}
  #resultado,#informe,#secEdad,#secSigno,#secAnimal,#secDestino,#secExpresion,#secAlma,#secPersonalidad,#secPrediccion,#secIA,#secCompatibilidad,#secExtra{scroll-margin-top:28px!important;}
  .guidedGridV14{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  #secAnimal.reportBlock.card.withImage img{position:relative!important;right:auto!important;top:auto!important;margin:0 0 18px!important;display:block;}
  #secAnimal.reportBlock.card.withImage h3{padding-right:0!important;}
}
@media(max-width:720px){
  .guidedGridV14,.compatForm{grid-template-columns:1fr!important;}
}

/* =========================================================
   V17 PDF PRINT PREMIUM — informe limpio, con color y sin botones
   ========================================================= */
.printOnly{display:none!important;}

@page{
  size:A4;
  margin:11mm;
}

@media print{
  html,body{
    width:210mm!important;
    min-height:297mm!important;
    margin:0!important;
    padding:0!important;
    background:#f5f0ff!important;
    color:#21142d!important;
    -webkit-print-color-adjust:exact!important;
    print-color-adjust:exact!important;
    overflow:visible!important;
  }

  body:before,
  .top,
  header,
  nav,
  main > section:not(#resultado),
  #resultado > *:not(#printReport),
  .noPrint,
  button,
  .actions,
  .quickNav,
  .readerNav,
  .gridStats,
  .reportShell,
  #informe,
  #historial,
  #editor,
  #crear{
    display:none!important;
  }

  main,
  #resultado,
  #printReport{
    display:block!important;
    width:100%!important;
    max-width:none!important;
    margin:0!important;
    padding:0!important;
    background:transparent!important;
    box-shadow:none!important;
    border:0!important;
  }

  #printReport.printOnly,
  #printReport{
    display:block!important;
    font-family:Inter,Segoe UI,Arial,sans-serif!important;
    color:#24142f!important;
    line-height:1.45!important;
  }

  #printReport *{
    box-sizing:border-box!important;
    -webkit-print-color-adjust:exact!important;
    print-color-adjust:exact!important;
  }

  #printReport .printCover{
    display:flex!important;
    justify-content:space-between!important;
    align-items:center!important;
    gap:18px!important;
    padding:18px 20px!important;
    margin:0 0 12px!important;
    border-radius:18px!important;
    color:white!important;
    background:linear-gradient(135deg,#2a0a4b 0%,#641fb0 58%,#9b36ff 100%)!important;
    border:1px solid #d7b8ff!important;
    box-shadow:0 8px 22px rgba(63,20,103,.18)!important;
  }

  #printReport .printCover h1{
    margin:0 0 4px!important;
    font-size:25px!important;
    letter-spacing:.02em!important;
    color:#fff!important;
  }

  #printReport .printCover p{
    margin:0!important;
    color:#efe1ff!important;
    font-size:11.5px!important;
  }

  #printReport .printBadge{
    min-width:68px!important;
    text-align:center!important;
    padding:10px 13px!important;
    border-radius:999px!important;
    font-size:17px!important;
    font-weight:900!important;
    color:#301000!important;
    background:linear-gradient(135deg,#ffe27a,#ff9f38)!important;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.55)!important;
  }

  #printReport section{
    page-break-inside:avoid!important;
    break-inside:avoid!important;
    margin:0 0 10px!important;
  }

  #printReport .printPerson{
    padding:15px 18px!important;
    border-radius:16px!important;
    background:#ffffff!important;
    border-left:7px solid #8d3dff!important;
    box-shadow:0 5px 18px rgba(63,20,103,.11)!important;
  }

  #printReport .printPerson h2{
    margin:0 0 5px!important;
    font-size:22px!important;
    color:#341753!important;
  }

  #printReport .printPerson p{
    margin:0!important;
    color:#5d4b6f!important;
    font-size:12px!important;
  }

  #printReport .printCards{
    display:grid!important;
    grid-template-columns:repeat(3,1fr)!important;
    gap:8px!important;
    margin:0 0 10px!important;
  }

  #printReport .printCards div{
    min-height:58px!important;
    padding:10px 12px!important;
    border-radius:14px!important;
    background:linear-gradient(180deg,#ffffff,#f0e8ff)!important;
    border:1px solid #d9c7f4!important;
    box-shadow:0 4px 10px rgba(63,20,103,.08)!important;
  }

  #printReport .printCards b{
    display:block!important;
    margin-bottom:3px!important;
    font-size:9.5px!important;
    text-transform:uppercase!important;
    letter-spacing:.05em!important;
    color:#875100!important;
  }

  #printReport .printCards strong{
    display:block!important;
    font-size:17px!important;
    color:#25113b!important;
  }

  #printReport .printCards small{
    display:block!important;
    color:#6d5a7d!important;
    font-size:11px!important;
  }

  #printReport .printTwo{
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    gap:10px!important;
  }

  #printReport .printTwo article,
  #printReport .printPrediction{
    padding:13px 15px!important;
    border-radius:16px!important;
    background:#ffffff!important;
    border:1px solid #dccaf4!important;
    box-shadow:0 5px 16px rgba(63,20,103,.09)!important;
  }

  #printReport .printTwo article:nth-child(odd){border-top:5px solid #29b6f6!important;}
  #printReport .printTwo article:nth-child(even){border-top:5px solid #9c45ff!important;}
  #printReport .printTwo.smallText article:nth-child(1){border-top-color:#ffb238!important;}
  #printReport .printTwo.smallText article:nth-child(2){border-top-color:#40c464!important;}
  #printReport .printTwo.smallText article:nth-child(3){border-top-color:#ff4ba3!important;}
  #printReport .printTwo.smallText article:nth-child(4){border-top-color:#6f8cff!important;}

  #printReport h3{
    margin:0 0 7px!important;
    font-size:15px!important;
    line-height:1.2!important;
    color:#421a66!important;
  }

  #printReport p{
    margin:0!important;
    font-size:10.8px!important;
    line-height:1.55!important;
    color:#342344!important;
  }

  #printReport .smallText{
    grid-template-columns:repeat(2,1fr)!important;
  }

  #printReport .smallText p{
    font-size:10px!important;
    line-height:1.48!important;
  }

  #printReport .printPrediction{
    background:linear-gradient(180deg,#fff,#f5edff)!important;
    border-left:7px solid #ffd25e!important;
  }

  #printReport .printPrediction h3{
    color:#7b3d00!important;
  }

  #printReport .printPrediction p + p{
    margin-top:5px!important;
  }

  #printReport footer{
    margin-top:12px!important;
    padding:9px 12px!important;
    border-radius:12px!important;
    text-align:center!important;
    color:#6a597a!important;
    font-size:9.5px!important;
    background:#ebe1fb!important;
    border:1px solid #d9c8ee!important;
  }
}

/* =========================================================
   V18 INSTITUCIONAL + WHATSAPP PDF
   ========================================================= */
.top{
  display:grid!important;
  grid-template-columns:minmax(260px,1fr) auto minmax(320px,1fr)!important;
  align-items:center!important;
  gap:24px!important;
}
.brandBlock h1{white-space:nowrap;}
.schoolBrand{
  justify-self:center;
  text-align:center;
  padding:14px 24px;
  border-radius:999px;
  color:#ffd96a;
  font-size:22px;
  font-weight:900;
  letter-spacing:.04em;
  background:linear-gradient(135deg,rgba(141,61,255,.18),rgba(255,178,56,.10));
  border:1px solid rgba(255,210,94,.35);
  box-shadow:0 12px 32px rgba(0,0,0,.24), inset 0 1px 0 rgba(255,255,255,.08);
}
.top nav{justify-content:flex-end;}
.actions button[onclick*="enviarPDFWhatsAppV18"]{
  background:linear-gradient(135deg,#139b4a,#0b6f38)!important;
}
.readerNav button[onclick*="enviarPDFWhatsAppV18"]{
  background:linear-gradient(135deg,#139b4a,#0b6f38)!important;
}
@media(max-width:980px){
  .top{grid-template-columns:1fr!important; gap:12px!important; text-align:left;}
  .schoolBrand{justify-self:start;font-size:17px;padding:10px 16px;}
  .top nav{justify-content:flex-start;}
}
@media print{
  .schoolBrand{display:none!important;}
}



/* V19 WhatsApp/PDF refinement */
.school-brand{
  flex:1;
  text-align:center;
  font-weight:900;
  letter-spacing:.04em;
  color:#ffd25e;
  font-size:clamp(18px,2.2vw,30px);
  text-shadow:0 0 18px rgba(255,210,94,.25);
}
.whatsapp-flow-notice{
  position:fixed;
  right:22px;
  bottom:22px;
  z-index:99999;
  max-width:420px;
  padding:18px 20px;
  border-radius:18px;
  color:#fff;
  background:linear-gradient(135deg,#123f26,#116b3c);
  border:1px solid rgba(255,255,255,.2);
  box-shadow:0 20px 60px rgba(0,0,0,.35);
  line-height:1.45;
  font-family:Inter,Segoe UI,Arial,sans-serif;
}
@media(max-width:800px){
  .school-brand{width:100%; order:2; text-align:left; margin:8px 0;}
  .whatsapp-flow-notice{left:14px; right:14px; bottom:14px; max-width:none;}
}



/* V20 WhatsApp notice */
.whatsapp-flow-notice{
  position:fixed;
  right:22px;
  bottom:22px;
  z-index:999999;
  max-width:450px;
  padding:18px 20px;
  border-radius:18px;
  color:#fff;
  background:linear-gradient(135deg,#143c27,#12864c);
  border:1px solid rgba(255,255,255,.22);
  box-shadow:0 20px 70px rgba(0,0,0,.45);
  line-height:1.45;
  font-family:Inter,Segoe UI,Arial,sans-serif;
}
.whatsapp-flow-notice strong{
  color:#fff;
}
@media(max-width:800px){
  .whatsapp-flow-notice{left:14px; right:14px; bottom:14px; max-width:none;}
}



/* V21 IA narrativa premium */
.aiGridV21{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:18px;
}
.aiGridV21 article{
  position:relative;
  overflow:hidden;
  border-radius:22px;
  padding:22px;
  background:
    linear-gradient(145deg, rgba(141,61,255,.22), rgba(10,4,28,.88)),
    radial-gradient(circle at top right, rgba(255,210,94,.18), transparent 34%);
  border:1px solid rgba(255,255,255,.12);
  box-shadow:0 18px 45px rgba(0,0,0,.22);
}
.aiGridV21 article:before{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background:linear-gradient(90deg, rgba(255,255,255,.08), transparent 40%);
  opacity:.45;
}
.aiGridV21 b{
  display:block;
  color:#ffd25e;
  font-size:18px;
  margin-bottom:10px;
  letter-spacing:.02em;
}
.aiGridV21 p{
  margin:0;
  color:#f3eaff;
  line-height:1.75;
  font-size:16px;
}
@media(max-width:800px){
  .aiGridV21{grid-template-columns:1fr;}
}


/* V22 enterprise */
.enterpriseBox{
  margin-top:20px;
  padding:22px;
  border-radius:22px;
  background:linear-gradient(135deg, rgba(119,52,255,.28), rgba(13,8,40,.9));
  border:1px solid rgba(255,255,255,.1);
  box-shadow:0 15px 40px rgba(0,0,0,.25);
}
.enterpriseBox h3{
  margin:0 0 10px;
  color:#ffd25e;
}
.enterpriseBox p{
  margin:0;
  line-height:1.8;
}



/* V23 contact actions */
.emailHistV23,
.whatsHistV23,
.pdfWhatsHistV23{
  background:linear-gradient(135deg, rgba(141,61,255,.55), rgba(255,76,180,.32));
  border:1px solid rgba(255,255,255,.14);
}



/* V24 email/whatsapp notices */
.toast-v24{
  position:fixed;
  right:22px;
  bottom:22px;
  z-index:999999;
  width:min(440px, calc(100vw - 28px));
  padding:18px 20px;
  border-radius:18px;
  color:#fff;
  line-height:1.45;
  font-family:Inter,Segoe UI,Arial,sans-serif;
  box-shadow:0 20px 70px rgba(0,0,0,.45);
  border:1px solid rgba(255,255,255,.18);
}
.toast-v24.ok{background:linear-gradient(135deg,#143c27,#12864c);}
.toast-v24.error{background:linear-gradient(135deg,#5c1224,#aa2548);}
.toast-v24 strong{display:block;margin-bottom:4px;color:#fff;}
@media(max-width:800px){
  .toast-v24{left:14px;right:14px;bottom:14px;width:auto;}
}



/* V25 Gmail Premium */
.toast-v25{
  position:fixed;
  right:22px;
  bottom:22px;
  z-index:999999;
  width:min(460px, calc(100vw - 28px));
  padding:18px 20px;
  border-radius:18px;
  color:#fff;
  line-height:1.45;
  font-family:Inter,Segoe UI,Arial,sans-serif;
  box-shadow:0 20px 70px rgba(0,0,0,.45);
  border:1px solid rgba(255,255,255,.18);
}
.toast-v25.ok{background:linear-gradient(135deg,#1b356d,#8d3dff);}
.toast-v25.error{background:linear-gradient(135deg,#5c1224,#aa2548);}
.toast-v25 strong{display:block;margin-bottom:4px;color:#fff;}
@media(max-width:800px){
  .toast-v25{left:14px;right:14px;bottom:14px;width:auto;}
}



/* V26 Gmail + PDF Premium */
.toast-v26{position:fixed;right:22px;bottom:22px;z-index:999999;width:min(500px, calc(100vw - 28px));padding:18px 20px;border-radius:18px;color:#fff;line-height:1.45;font-family:Inter,Segoe UI,Arial,sans-serif;box-shadow:0 20px 70px rgba(0,0,0,.45);border:1px solid rgba(255,255,255,.18)}
.toast-v26.ok{background:linear-gradient(135deg,#123f26,#12864c)}
.toast-v26.warn{background:linear-gradient(135deg,#5f3a12,#aa7a19)}
.toast-v26.error{background:linear-gradient(135deg,#5c1224,#aa2548)}
.toast-v26 strong{display:block;margin-bottom:4px;color:#fff}
.gmailPdfV26{background:linear-gradient(135deg,#8d3dff,#d74cff)!important}
@media(max-width:800px){.toast-v26{left:14px;right:14px;bottom:14px;width:auto}}

/* V27 backend enterprise email */
.toast-v27{
  position:fixed;
  right:22px;
  bottom:22px;
  z-index:999999;
  width:min(500px, calc(100vw - 28px));
  padding:18px 20px;
  border-radius:18px;
  color:#fff;
  line-height:1.45;
  font-family:Inter,Segoe UI,Arial,sans-serif;
  box-shadow:0 20px 70px rgba(0,0,0,.45);
  border:1px solid rgba(255,255,255,.18);
}
.toast-v27.ok{background:linear-gradient(135deg,#123f26,#12864c);}
.toast-v27.error{background:linear-gradient(135deg,#5c1224,#aa2548);}
.toast-v27 strong{display:block;margin-bottom:4px;color:#fff;}
.sendAutoPdfV27{
  background:linear-gradient(135deg,#0f9f6e,#8d3dff)!important;
}
@media(max-width:800px){
  .toast-v27{left:14px;right:14px;bottom:14px;width:auto;}
}
