/* V229 — two-column Portal map and sequential stage progression. */
#portalOverlay .portalWindow{
  width:min(1120px,96vw)!important;
  max-height:94vh;
  padding:12px!important;
  background:#070d13!important;
  border:2px solid #98670d!important;
  box-shadow:0 0 0 4px #111b24,0 18px 60px #000d,inset 0 0 0 1px #d9a21d33!important;
}

.portalContentGridV229{
  display:grid;
  grid-template-columns:minmax(420px,.94fr) minmax(390px,1.06fr);
  gap:14px;
  align-items:start;
}

.portalMapColumnV229,
.portalInfoColumnV229{min-width:0}

.portalInfoColumnV229{
  padding:12px;
  border:2px solid #304655;
  background:linear-gradient(180deg,#0d1620 0%,#080d13 100%);
  box-shadow:inset 0 0 0 1px #05080c,0 0 0 1px #15100b;
}

.portalInfoColumnV229 .portalDifficultyTitle{
  margin:0 0 8px;
  padding-bottom:8px;
  border-bottom:1px solid #8b621b;
  color:#e6bd60;
  letter-spacing:.14em;
}

.portalInfoColumnV229 .portalDifficulty button{
  min-width:0;
  padding:0 4px;
}

.portalInfoColumnV229 .portalInfo{
  min-height:72px;
  margin-top:12px;
  padding:11px;
  text-align:left;
  line-height:1.65;
  border-color:#344956;
  background:#070c11;
}

.portalStageStateV229{
  display:inline-block;
  margin-top:6px;
  padding:3px 7px;
  border:1px solid currentColor;
  font-size:11px;
  letter-spacing:.12em;
}
.portalStageStateV229.cleared{color:#f0c654;background:#302407}
.portalStageStateV229.current{color:#64f6a0;background:#082919}
.portalStageStateV229.locked{color:#77838c;background:#15191d}

.portalStageLegendV229{
  display:grid;
  gap:7px;
  margin-top:12px;
  padding:11px;
  border:1px solid #344956;
  background:#090f15;
  color:#9fabb4;
  font-size:11px;
  line-height:1.4;
}
.portalStageLegendV229>div{display:grid;grid-template-columns:16px 1fr;gap:8px;align-items:center}
.portalStageLegendV229 i{width:12px;height:12px;border-radius:50%;border:2px solid currentColor;box-shadow:0 0 7px currentColor}
.portalStageLegendV229 .cleared{color:#e8bd45}
.portalStageLegendV229 .current{color:#48eb8d}
.portalStageLegendV229 .locked{color:#5d6972}
.portalStageLegendV229 span{color:#9fabb4}
.portalStageLegendV229 b{color:inherit}

.portalHardUnlockV229{
  min-height:74px;
  margin-top:12px;
  padding:11px;
  border:1px solid #694b18;
  background:linear-gradient(180deg,#181208,#0c0d0e);
  color:#b9c2c8;
  font-size:11px;
  line-height:1.55;
}
.portalHardUnlockV229 h3{margin:0 0 6px;color:#f0c767;font-size:11px;letter-spacing:.08em}
.portalHardUnlockV229 strong{color:#ffe28b}
.portalHardUnlockV229 .portalUnlockBadgeV229{color:#69ee9c}
.portalHardUnlockV229 .portalUnlockWarningV229{color:#ec7a72}
.portalHardUnlockV229 button{
  width:100%;
  min-height:38px;
  margin-top:9px;
  border:2px solid #b27b19;
  background:linear-gradient(#66400e,#2e1c08);
  color:#ffe096;
  font:inherit;
  cursor:pointer;
}
.portalHardUnlockV229 button:hover:not(:disabled){filter:brightness(1.2)}
.portalHardUnlockV229 button:disabled{cursor:not-allowed;filter:grayscale(1);opacity:.55}

/* Semantic stage colors override the older selected/boss presentation. */
#portalOverlay .portalStageNode.cleared,
#portalOverlay .portalStageNode.boss.cleared{
  color:#171006!important;
  background:#efd06b!important;
  border-color:#5d3b09!important;
  box-shadow:0 0 0 2px #fff0a3,0 0 14px #e8b72eaa!important;
}
#portalOverlay .portalStageNode.current,
#portalOverlay .portalStageNode.boss.current{
  color:#06150c!important;
  background:#43e989!important;
  border-color:#07512b!important;
  box-shadow:0 0 0 3px #a1ffc5,0 0 20px #35ec80!important;
  animation:portalSelectedPulse .8s steps(2,end) infinite;
}
#portalOverlay .portalStageNode.locked,
#portalOverlay .portalStageNode.boss.locked{
  color:#7d858a!important;
  background:#2a3034!important;
  border-color:#13191d!important;
  box-shadow:0 0 0 2px #4b555b,0 3px 0 #111!important;
  filter:grayscale(1)!important;
  opacity:.68;
  cursor:not-allowed;
  animation:none!important;
}
#portalOverlay .portalStageNode.locked:hover{transform:translate(-50%,-50%)!important;filter:grayscale(1)!important}
#portalOverlay .portalStageNode.selected{outline:2px solid #fff6;outline-offset:4px}
#portalOverlay .portalStageNode.locked span{color:#737d84!important;border-color:#343c41!important}
#portalOverlay .portalStageNode.cleared span{color:#f2d36b!important}
#portalOverlay .portalStageNode.current span{color:#73f4a7!important}

@media(max-width:900px){
  .portalContentGridV229{grid-template-columns:minmax(360px,.9fr) minmax(330px,1.1fr);gap:9px}
  .portalInfoColumnV229{padding:8px}
}

@media(max-width:700px) and (orientation:portrait){
  .portalContentGridV229{grid-template-columns:1fr}
  .portalMapColumnV229{max-width:470px;margin-inline:auto}
}

/* V408: pedra, papel e tesoura do Stage selecionado (so com ?newBalance). */
.portalAffinityV408{display:grid;gap:4px;margin-top:10px;padding-top:9px;border-top:1px solid #ffffff1f;font-size:11px;letter-spacing:.04em}
.portalAffinityV408>b{color:#ffd27a;font-size:11px}
.portalAffinityV408 span{color:#b8c2cc}
.portalAffinityV408 strong{color:#e9eef2}
.portalAffinityV408 .weak{color:#ff9a3c}
.portalAffinityV408 .resist{color:#8c96a0}
.portalAffinityPartyV408{display:grid;gap:3px;margin-top:4px;padding:6px 8px;background:#0006;border:1px solid #ffffff14}
.portalAffinityHeroV408 em{font-style:normal;font-weight:900;color:#e9eef2}
.portalAffinityHeroV408 em.weak{color:#ff9a3c}
.portalAffinityHeroV408 em.resist{color:#8c96a0}
