/* Ìtàn v27.6.1 hotfix — restaura cabeçalho aprovado + garante retratos nos cards */
:root{--v2761-header-cyan:#12c4e2;--v2761-header-blue:#17379f;--v2761-header-deep:#0a2e86;--v2761-header-purple:#6d45eb}

/* Cabeçalho clássico aprovado: mosaico geométrico + arco branco central. */
.premium-topbar{
  position:sticky!important;top:0!important;z-index:150!important;
  height:calc(82px + var(--safe-top))!important;
  margin:0!important;padding:var(--safe-top) 22px 0!important;
  border:0!important;border-radius:0!important;box-shadow:none!important;
  overflow:visible!important;isolation:isolate!important;
  background-color:var(--v2761-header-cyan)!important;
  background-image:
    conic-gradient(from 45deg at 18px 18px,#13c5df 0 25%,#173ba2 0 50%,#fff 0 75%,#7047e8 0),
    conic-gradient(from 225deg at 58px 34px,#fff 0 25%,#0b2f88 0 50%,#16b8db 0 75%,#563dcf 0),
    linear-gradient(115deg,#0b328c,#13bedf 49%,#7248ee)!important;
  background-size:76px 76px,92px 92px,100% 100%!important;
  background-position:0 0,38px -12px,0 0!important;
}
.premium-topbar:before{content:""!important;position:absolute!important;inset:0!important;background:linear-gradient(110deg,rgba(255,255,255,.04),transparent 38%,rgba(255,255,255,.08))!important;opacity:1!important;pointer-events:none!important}
.premium-topbar:after{content:""!important;position:absolute!important;z-index:1!important;left:15%!important;right:15%!important;bottom:-25px!important;height:64px!important;background:#fff!important;border-radius:52% 52% 0 0 / 92% 92% 0 0!important;box-shadow:0 -1px 0 rgba(255,255,255,.85)!important}
.premium-brand{
  position:absolute!important;z-index:4!important;left:50%!important;bottom:-1px!important;transform:translateX(-50%)!important;
  display:flex!important;align-items:center!important;gap:12px!important;
  min-height:0!important;padding:0!important;border:0!important;border-radius:0!important;
  background:transparent!important;box-shadow:none!important;color:#071d5d!important;
  font:500 34px/1 "Iowan Old Style","Palatino Linotype",Palatino,Georgia,serif!important;white-space:nowrap!important;
}
.premium-brand strong{font:inherit!important;font-weight:500!important}.premium-brand i{font:9px/1 Georgia,serif!important;color:#2a65d4!important;font-style:normal!important}
.round-top{
  position:absolute!important;z-index:5!important;top:calc(var(--safe-top) + 12px)!important;
  width:46px!important;height:46px!important;min-height:46px!important;padding:12px!important;
  border:0!important;border-radius:50%!important;background:#fff!important;color:#0b2d82!important;
  box-shadow:0 9px 24px rgba(10,39,111,.16)!important;display:grid!important;place-items:center!important;
}
.round-top:first-child{left:18px!important}.round-top:last-child{right:18px!important}.round-top svg{width:100%!important;height:100%!important;display:block!important}.notify-dot:after{width:8px!important;height:8px!important;right:2px!important;top:1px!important;background:#7547ef!important;border:2px solid #fff!important}
.premium-menu{top:calc(var(--safe-top) + 74px)!important}

/* Nenhum card da biblioteca deve voltar para letra/sigilo. */
.premium-card .portrait,.orixa-card .portrait{position:relative!important;overflow:hidden!important;background:#eef3fb!important}
.premium-card .portrait>img,.orixa-card .portrait>img,.profile-hero-premium .art>img{
  display:block!important;width:100%!important;height:100%!important;object-fit:cover!important;object-position:center top!important;opacity:1!important;visibility:visible!important;
}
.premium-card .portrait .visual-fallback-1802,.premium-card .portrait>.sigil,.orixa-card .portrait>.sigil{display:none!important}
.v2761-image-loading:after{content:"";position:absolute;inset:0;background:linear-gradient(110deg,#edf2fa 10%,#f9fbff 35%,#edf2fa 60%);background-size:220% 100%;animation:v2761sh 1.1s linear infinite;z-index:1}.v2761-image-loading>img{position:relative;z-index:2}
@keyframes v2761sh{to{background-position:-220% 0}}

@media(max-width:500px){
 .premium-topbar{height:calc(78px + var(--safe-top))!important;padding-inline:16px!important}
 .premium-topbar:after{left:15%!important;right:15%!important;bottom:-23px!important;height:59px!important}
 .premium-brand{font-size:33px!important;bottom:-3px!important}
 .round-top{top:calc(var(--safe-top) + 10px)!important;width:44px!important;height:44px!important}.round-top:first-child{left:16px!important}.round-top:last-child{right:16px!important}
}
.v2762-refresh-btn{width:100%;border:0;border-radius:16px;padding:14px 16px;background:linear-gradient(135deg,#0aa4e7,#7047ef);color:#fff;font-weight:850;box-shadow:0 10px 28px rgba(62,97,205,.2);cursor:pointer}.v2762-cache-note{font-size:11px!important;color:#7a87a4!important;margin-top:9px!important}

/* Ìtàn v27.6.4 — correção estrutural das páginas culturais e retratos semânticos */
:root{--itan-header-h:calc(78px + var(--safe-top));}

/* As páginas culturais devem começar imediatamente abaixo do cabeçalho; sem "tela em branco". */
#calendar.active,#syncretism.active,#parallels.active,#syncretismGallery.active,#glossary.active,#provenance.active,#houseCalendars.active,#reviewCenter.active{
  margin-top:0!important;padding-top:0!important;top:auto!important;transform:none!important;min-height:0!important;
}
#calendar.active>.page-head,#syncretism.active>.page-head,#parallels.active>.page-head,#syncretismGallery.active>.page-head,#glossary.active>.page-head,#provenance.active>.page-head,#houseCalendars.active>.page-head,#reviewCenter.active>.page-head{
  margin-top:0!important;padding-top:20px!important;min-height:0!important;transform:none!important;
}
#calendar.active>.v254-easy-back,#syncretism.active>.v254-easy-back,#parallels.active>.v254-easy-back,#syncretismGallery.active>.v254-easy-back,#glossary.active>.v254-easy-back,#provenance.active>.v254-easy-back,#houseCalendars.active>.v254-easy-back,#reviewCenter.active>.v254-easy-back{
  margin-top:0!important;top:calc(var(--safe-top) + 6px)!important;
}
/* Não permitir wrappers legados com altura mínima vazia antes do conteúdo. */
#calendar.active>:empty,#syncretism.active>:empty,#parallels.active>:empty,#syncretismGallery.active>:empty,#glossary.active>:empty,#provenance.active>:empty,#houseCalendars.active>:empty,#reviewCenter.active>:empty{min-height:0!important;height:auto!important;margin:0!important;padding:0!important;}

/* Retratos: nunca voltar para sigilo/letra/ilustração de fallback nos cards da biblioteca. */
#libraryCards .portrait{background:#eef3fb!important;}
#libraryCards .portrait>img{display:block!important;width:100%!important;height:100%!important;object-fit:cover!important;object-position:center top!important;opacity:1!important;visibility:visible!important;}
#libraryCards .visual-fallback-1802,#libraryCards .portrait>.sigil{display:none!important;}

/* Selo discreto usado apenas pelo QA visual da build. */
[data-v2764-semantic="1"]{--v2764-semantic:1}

@media(max-width:500px){
 #calendar.active>.page-head,#syncretism.active>.page-head,#parallels.active>.page-head,#syncretismGallery.active>.page-head,#glossary.active>.page-head,#provenance.active>.page-head,#houseCalendars.active>.page-head,#reviewCenter.active>.page-head{padding-top:16px!important;}
}


/* Ìtàn v27.6.4 — wordmark aprovado (opção 7) */
.premium-brand{
  bottom:-10px!important;
  min-width:292px!important;
  height:70px!important;
  display:flex!important;
  flex-direction:column!important;
  justify-content:flex-start!important;
  align-items:center!important;
  gap:0!important;
  line-height:1!important;
  overflow:visible!important;
  text-decoration:none!important;
}
.premium-brand .brand-slogan{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:7px!important;
  margin:0 0 -2px!important;
  color:#aa7930!important;
  font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;
  font-size:9.5px!important;
  font-weight:750!important;
  letter-spacing:.015em!important;
  white-space:nowrap!important;
  text-shadow:none!important;
}
.premium-brand .brand-slogan b{
  color:#b38236!important;
  font:700 6px/1 Georgia,serif!important;
  transform:translateY(-.5px)!important;
}
.premium-brand .brand-wordmark{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:20px!important;
  min-height:42px!important;
  color:#08266c!important;
}
.premium-brand .brand-wordmark strong{
  display:block!important;
  margin:0!important;
  color:#08266c!important;
  font-family:"Snell Roundhand","Apple Chancery","Segoe Script","Z003","URW Chancery L",cursive!important;
  font-size:43px!important;
  font-weight:600!important;
  line-height:.93!important;
  letter-spacing:-.035em!important;
  transform:rotate(-1.5deg)!important;
  text-shadow:0 1px 0 rgba(255,255,255,.55)!important;
}
.premium-brand .brand-wordmark i{
  color:#b27e2b!important;
  font:400 14px/1 Georgia,serif!important;
  opacity:.95!important;
  transform:translateY(2px)!important;
}
.premium-brand .brand-underline{
  display:block!important;
  width:146px!important;
  height:5px!important;
  margin-top:-2px!important;
  border-radius:100% 20% 100% 20%!important;
  background:linear-gradient(90deg,transparent 0,#b57b27 8%,#c08b39 48%,#a76e20 88%,transparent 100%)!important;
  transform:rotate(-2deg) skewX(-12deg)!important;
  opacity:.95!important;
  box-shadow:0 1px 0 rgba(120,75,10,.12)!important;
}
.premium-brand>i,.premium-brand>strong{display:none!important}
@media(max-width:500px){
  .premium-brand{min-width:270px!important;height:65px!important;bottom:-9px!important}
  .premium-brand .brand-slogan{font-size:8.5px!important;gap:6px!important}
  .premium-brand .brand-wordmark{gap:17px!important;min-height:39px!important}
  .premium-brand .brand-wordmark strong{font-size:39px!important}
  .premium-brand .brand-wordmark i{font-size:12px!important}
  .premium-brand .brand-underline{width:132px!important;height:4px!important;margin-top:-1px!important}
}
@media(max-width:390px){
  .premium-brand{min-width:246px!important}
  .premium-brand .brand-slogan{font-size:7.8px!important;letter-spacing:0!important}
  .premium-brand .brand-wordmark strong{font-size:37px!important}
  .premium-brand .brand-wordmark{gap:14px!important}
  .premium-brand .brand-underline{width:122px!important}
}
