/* V539 — Um padrao so para toda caixa de aviso, confirmacao, entrada e saida
   (pedido do dono, 2026-09-17): o modelo e a caixa "Entrar na Masmorra?"
   (#dungeonEntryConfirmV311). Moldura do kit com os dois tracos dourados nos
   cantos, chamada pequena, titulo dourado, texto, caixa de detalhe e dois
   botoes: o primeiro e o secundario (ardosia) e o ultimo e o principal
   (brasa). Este arquivo so troca a pele; cada caixa mantem o proprio layout.
   Tambem: retratos dos NPCs transbordam por cima da caixa de conversa, e o
   aviso de ameaca acima da forca da formacao na Dungeon. */

/* ------------------------------------------------------------ fundo da tela */
#dungeonAccessOverlayV276,#tavernExitConfirmV397,#potionConfirmV234,
#stageClearOverlay,#gameOverOverlay,#stageIntroGuideV393,#dungeonResultOverlayV268,
#awaySummaryV414,#thkNoticeV539{
  background:radial-gradient(circle at 50% 47%,rgba(69,31,8,.22),rgba(0,0,0,.88) 58%)!important;
  backdrop-filter:blur(2px) brightness(.55)!important;
}

/* ------------------------------------------------------------------ caixa */
#dungeonAccessOverlayV276>section,#tavernExitConfirmV397>section,
#potionConfirmV234>.potionConfirmCardV234,#stageClearOverlay .stageClearCard,
#gameOverOverlay .gameOverCard,.stageIntroCardV393,.dungeonResultCardV268,
#awaySummaryV414 .awayCardV414,#thkNoticeV539>section{
  position:relative!important;box-sizing:border-box!important;
  width:min(560px,calc(100% - 34px))!important;max-width:none!important;
  padding:31px 32px 28px!important;text-align:center!important;color:#d8e1e8!important;
  background:url('../assets/ui/kit/window-tile.png') repeat,#090c0a!important;
  border:1px solid #1d201b!important;border-radius:0!important;
  outline:1px solid #9b7a3a55!important;outline-offset:-10px!important;
  box-shadow:0 22px 60px #000d!important;
  animation:thkNoticeRevealV539 .24s steps(3,end) both;
}
.dungeonResultCardV268{width:min(640px,calc(100% - 34px))!important}
/* Os dois tracos dourados dos cantos. */
#dungeonAccessOverlayV276>section::before,#dungeonAccessOverlayV276>section::after,
#tavernExitConfirmV397>section::before,#tavernExitConfirmV397>section::after,
#potionConfirmV234>.potionConfirmCardV234::before,#potionConfirmV234>.potionConfirmCardV234::after,
#stageClearOverlay .stageClearCard::before,#stageClearOverlay .stageClearCard::after,
#gameOverOverlay .gameOverCard::before,#gameOverOverlay .gameOverCard::after,
.stageIntroCardV393::before,.stageIntroCardV393::after,
.dungeonResultCardV268::before,.dungeonResultCardV268::after,
#awaySummaryV414 .awayCardV414::before,#awaySummaryV414 .awayCardV414::after,
#thkNoticeV539>section::before,#thkNoticeV539>section::after{
  content:""!important;position:absolute!important;top:13px!important;bottom:auto!important;
  width:42px!important;height:3px!important;margin:0!important;border:0!important;
  background:#9a6b20!important;box-shadow:0 8px 0 #49300d!important;opacity:1!important;transform:none!important;
}
#dungeonAccessOverlayV276>section::before,#tavernExitConfirmV397>section::before,
#potionConfirmV234>.potionConfirmCardV234::before,#stageClearOverlay .stageClearCard::before,
#gameOverOverlay .gameOverCard::before,.stageIntroCardV393::before,.dungeonResultCardV268::before,
#awaySummaryV414 .awayCardV414::before,#thkNoticeV539>section::before{left:15px!important;right:auto!important}
#dungeonAccessOverlayV276>section::after,#tavernExitConfirmV397>section::after,
#potionConfirmV234>.potionConfirmCardV234::after,#stageClearOverlay .stageClearCard::after,
#gameOverOverlay .gameOverCard::after,.stageIntroCardV393::after,.dungeonResultCardV268::after,
#awaySummaryV414 .awayCardV414::after,#thkNoticeV539>section::after{right:15px!important;left:auto!important}

/* -------------------------------------------------------------- chamada */
#dungeonAccessOverlayV276>section>small,#tavernExitConfirmV397>section>small,
#potionConfirmV234 .potionConfirmCardV234>small,.stageIntroCardV393>small,
.dungeonResultKickerV268,#thkNoticeV539>section>small{
  display:block!important;margin:0!important;color:#a77c3b!important;
  font-size:11px;font-weight:900!important;letter-spacing:.25em!important;text-shadow:none!important;
}

/* --------------------------------------------------------------- titulo */
#dungeonAccessOverlayV276>section>h2,#tavernExitConfirmV397>section>h2,
#potionConfirmV234 .potionConfirmCardV234>h3,#stageClearOverlay .stageClearTitle,
#gameOverOverlay .gameOverTitle,.stageIntroCardV393>h2,.dungeonResultCardV268>h2,
#awaySummaryV414 .awayTitleV414,#thkNoticeV539>section>h2{
  display:block!important;margin:14px 0 10px!important;padding:0!important;background:none!important;
  color:#f0cb70!important;font-size:29px;font-weight:700!important;letter-spacing:.08em!important;
  text-shadow:3px 3px 0 #3c2208,0 0 17px #a45c1d66!important;
}
#stageClearOverlay .stageClearTitle,#gameOverOverlay .gameOverTitle,#awaySummaryV414 .awayTitleV414{margin-top:4px!important}

/* ---------------------------------------------------------------- texto */
#dungeonAccessOverlayV276>section>p,#tavernExitConfirmV397>section>p,
#potionConfirmV234 .potionConfirmCardV234>p,#stageClearOverlay .stageClearSub,
#gameOverOverlay .gameOverSub,.stageIntroCardV393>p,.dungeonResultCardV268>p,
#awaySummaryV414 .awayNoteV414,#thkNoticeV539>section>p{
  max-width:450px!important;margin:0 auto 18px!important;
  color:#aeb9c0!important;font-size:11px;font-weight:900;line-height:1.8!important;text-shadow:none!important;
}
#thkNoticeV539>section>p{white-space:pre-line}

/* ------------------------------------------------------ caixa de detalhe */
.tavernExitLossV397,.thkNoticeBoxV539,#awaySummaryV414 .awayRowsV414,.stageIntroCardV393>dl{
  margin:0 auto 22px!important;padding:11px 14px!important;
  border:1px solid #60471f!important;border-radius:0!important;background:#090c0f!important;
  box-shadow:inset 0 0 0 2px #020304!important;
}
.tavernExitLossV397>span,.thkNoticeBoxV539>span{display:block!important;margin-bottom:7px!important;color:#746b5a!important;font-size:11px;font-weight:900;letter-spacing:.18em!important}
.tavernExitLossV397>b,.thkNoticeBoxV539>b{display:block!important;color:#e9bd5d!important;font-size:11px;font-weight:900;letter-spacing:.08em!important;white-space:pre-line}
#awaySummaryV414 .awayRowsV414 span,.stageIntroCardV393>dl dt{color:#746b5a!important;letter-spacing:.12em}
#awaySummaryV414 .awayRowsV414 strong,.stageIntroCardV393>dl dd{color:#e9bd5d!important}

/* --------------------------------------------------------------- botoes */
#dungeonAccessOverlayV276>section>div:last-of-type,.tavernExitActionsV397,.potionConfirmActionsV234,
#stageClearOverlay .stageClearActions,#gameOverOverlay .gameOverActions,.dungeonResultActionsV268,.thkNoticeActionsV539{
  display:flex!important;flex-wrap:wrap;justify-content:center!important;gap:10px!important;margin:0!important;
}
#dungeonAccessOverlayV276>section>div:last-of-type button,.tavernExitActionsV397 button,.potionConfirmActionsV234 button,
#stageClearOverlay .stageClearActions button,#gameOverOverlay .gameOverActions button,.dungeonResultActionsV268 button,
.thkNoticeActionsV539 button,#stageIntroNextV393,#awaySummaryV414 .awayCardV414>button{
  min-width:175px!important;min-height:45px!important;padding:9px 15px!important;
  border:2px solid #52616b!important;border-radius:0!important;background:#0d151b!important;
  color:#bdcbd3!important;font-weight:900!important;font-size:11px;letter-spacing:.05em!important;
  box-shadow:none!important;text-shadow:none!important;cursor:pointer;filter:none;
}
/* O ultimo botao (ou o unico) e o principal. */
#dungeonAccessOverlayV276>section>div:last-of-type button:last-child,.tavernExitActionsV397 button:last-child,
.potionConfirmActionsV234 button:last-child,#stageClearOverlay .stageClearActions button:last-child,
#gameOverOverlay .gameOverActions button:last-child,.dungeonResultActionsV268 button:last-child,
.thkNoticeActionsV539 button:last-child,#stageIntroNextV393,#awaySummaryV414 .awayCardV414>button{
  border:3px solid #b36a26!important;background:#4b210e!important;color:#ffd184!important;
  box-shadow:inset 0 0 0 2px #120704!important;
}
#dungeonAccessOverlayV276>section>div:last-of-type button:hover,.tavernExitActionsV397 button:hover,.potionConfirmActionsV234 button:hover,
#stageClearOverlay .stageClearActions button:hover,#gameOverOverlay .gameOverActions button:hover,.dungeonResultActionsV268 button:hover,
.thkNoticeActionsV539 button:hover,#stageIntroNextV393:hover,#awaySummaryV414 .awayCardV414>button:hover,
#dungeonAccessOverlayV276>section>div:last-of-type button:focus-visible,.tavernExitActionsV397 button:focus-visible,.potionConfirmActionsV234 button:focus-visible,
#stageClearOverlay .stageClearActions button:focus-visible,#gameOverOverlay .gameOverActions button:focus-visible,.dungeonResultActionsV268 button:focus-visible,
.thkNoticeActionsV539 button:focus-visible,#stageIntroNextV393:focus-visible,#awaySummaryV414 .awayCardV414>button:focus-visible{
  filter:brightness(1.28)!important;outline:2px solid #f0cb70;outline-offset:2px;
}

@keyframes thkNoticeRevealV539{from{opacity:0;transform:scale(.92)}to{opacity:1;transform:scale(1)}}
@media (prefers-reduced-motion:reduce){
  #dungeonAccessOverlayV276>section,#tavernExitConfirmV397>section,#potionConfirmV234>.potionConfirmCardV234,
  #stageClearOverlay .stageClearCard,#gameOverOverlay .gameOverCard,.stageIntroCardV393,.dungeonResultCardV268,
  #awaySummaryV414 .awayCardV414,#thkNoticeV539>section{animation:none!important}
}
@media (max-width:560px){
  #dungeonAccessOverlayV276>section,#tavernExitConfirmV397>section,#potionConfirmV234>.potionConfirmCardV234,
  #stageClearOverlay .stageClearCard,#gameOverOverlay .gameOverCard,.stageIntroCardV393,.dungeonResultCardV268,
  #awaySummaryV414 .awayCardV414,#thkNoticeV539>section{padding:24px 14px 18px!important}
  #dungeonAccessOverlayV276>section>h2,#tavernExitConfirmV397>section>h2,#potionConfirmV234 .potionConfirmCardV234>h3,
  #stageClearOverlay .stageClearTitle,#gameOverOverlay .gameOverTitle,.stageIntroCardV393>h2,.dungeonResultCardV268>h2,
  #awaySummaryV414 .awayTitleV414,#thkNoticeV539>section>h2{font-size:20px}
  #dungeonAccessOverlayV276>section>div:last-of-type,.tavernExitActionsV397,.potionConfirmActionsV234,
  #stageClearOverlay .stageClearActions,#gameOverOverlay .gameOverActions,.dungeonResultActionsV268,.thkNoticeActionsV539{flex-direction:column!important}
  #dungeonAccessOverlayV276>section>div:last-of-type button,.tavernExitActionsV397 button,.potionConfirmActionsV234 button,
  #stageClearOverlay .stageClearActions button,#gameOverOverlay .gameOverActions button,.dungeonResultActionsV268 button,
  .thkNoticeActionsV539 button,#stageIntroNextV393,#awaySummaryV414 .awayCardV414>button{width:100%!important;min-width:0!important}
}

/* ------------------------------------------- retratos dos NPCs transbordam */
/* O retrato sai por cima da moldura (a arte inteira aparece); os lados e o pe
   continuam presos ao quadro, que e o efeito de "sair do cartao". */
html body .npcDialogPortrait,
html body #npcDialogOverlay[data-npc] .npcDialogPortrait{clip-path:inset(-600px 0 0 0)!important;overflow:visible!important}
html body .npcDialogBox{overflow:visible!important}

/* ------------------------------------------- Dungeon: ameaca acima da forca */
.dungeonThreatOutmatchedV539{margin:6px 0 0!important;color:#ff7a5c!important;font-size:11px;font-weight:900;letter-spacing:.08em;text-shadow:1px 1px 0 #2a0c05}
