/* CÂNDIDO ADVENTURE V14.7 — restauração do jogo SEM sprites/sobreposições.
 * Somente apresentação: hotspots luminosos originais e The Global Tree.
 * Nenhum ID, rota, pontuação, acesso, presença ou handler é alterado. */

/* Apresentação clássica dos hotspots: CSS das salas antes da V14.3.
 * A iluminação pertence à região clicável, não a uma imagem substituta. */
@media (hover:hover) and (pointer:fine){
 #ca-adventure-plaza .plaza-scene .plaza-hotspot:is(:hover,:focus-visible),
 #ca-adventure-plaza .plaza-scene .plaza-hotspot.near{
  background:radial-gradient(ellipse at 50% 50%,rgba(255,237,153,.15) 12%,rgba(255,227,138,.33) 66%,rgba(255,223,116,.53) 100%)!important;
  box-shadow:0 0 12px 5px rgba(255,229,143,.65),inset 0 0 9px 2px rgba(255,232,171,.55)!important;
  filter:drop-shadow(0 0 3px rgba(255,231,154,.66))!important;
  transition:background .18s ease,box-shadow .18s ease,filter .18s ease!important;
 }
 #ca-hall .hall-scene .hall-hotspot:is(:hover,:focus-visible,.near){
  background:rgba(255,231,119,.20)!important;
  box-shadow:0 0 21px 7px rgba(255,226,116,.65),inset 0 0 8px rgba(255,250,193,.3)!important;
  border:2px solid rgba(255,234,151,.9)!important;
  transition:background .18s,box-shadow .18s!important;
 }
 #ca-adventure-travel-map .ca-travel-hotspot:not(.ca-travel-close):is(:hover,:focus-visible){
  background:rgba(255,221,117,.22)!important;
  box-shadow:0 0 16px 5px rgba(255,223,116,.62)!important;
  filter:drop-shadow(0 0 4px #ffdd78)!important;
 }
}
@media(prefers-reduced-motion:reduce){
 #ca-adventure-plaza .plaza-hotspot,#ca-hall .hall-hotspot{transition:none!important}
}

/* GLOBAL TREE: ocultar TOTALMENTE o cabeçalho compartilhado, barra de comandos,
 * HUDs e controles do jogo enquanto o ranking de arte ocupa a tela.
 * A classe é ligada/desligada pelo hall.js apenas nesta janela. */
body.ca-global-tree-ranking-open #ca-hall header.top,
body.ca-global-tree-ranking-open #ca-hall .hall-nav,
body.ca-global-tree-ranking-open #ca-hall .hall-control,
body.ca-global-tree-ranking-open #ca-hall .hall-message,
body.ca-global-tree-ranking-open #ca-hall .hall-shared-header,
body.ca-global-tree-ranking-open :is(#ca-student-mobile-hud,#ca-student-desktop-hud,#ca-v9914-ui),
body.ca-global-tree-ranking-open .wrap>header.top{
 display:none!important;visibility:hidden!important;pointer-events:none!important;
}
/* Fallback para uma folha de estilos antiga em cache ou interação direta. */
body:has(#ca-hall #hall-modal.hall-tree-fullscreen:not([hidden])) #ca-hall > :is(header.top,.hall-nav,.hall-control,.hall-message){
 display:none!important;
}
#ca-hall #hall-modal.hall-tree-fullscreen:not([hidden]){
 display:flex!important;position:absolute!important;inset:0!important;
 z-index:100000!important;overflow:hidden!important;padding:0!important;
 background:rgba(9,20,42,.94)!important;align-items:center!important;justify-content:center!important;
}
#ca-hall #hall-modal.hall-tree-fullscreen .hall-modal-content{
 position:relative!important;width:min(100vw,calc(100dvh * 1670 / 942))!important;
 aspect-ratio:1670/942!important;height:auto!important;max-height:100dvh!important;
 min-width:0!important;min-height:0!important;max-width:none!important;
 padding:0!important;margin:0!important;border:0!important;box-shadow:none!important;
 background:transparent!important;overflow:hidden!important;isolation:isolate!important;
}
#ca-hall #hall-modal.hall-tree-fullscreen #hall-modal-body,
#ca-hall #hall-modal.hall-tree-fullscreen .hall-tree-interface,
#ca-hall #hall-modal.hall-tree-fullscreen #hall-rank-content,
#ca-hall #hall-modal.hall-tree-fullscreen .hall-ranking,
#ca-hall #hall-modal.hall-tree-fullscreen .hall-tree-board{
 position:absolute!important;inset:0!important;width:100%!important;height:100%!important;
 min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;
 margin:0!important;padding:0!important;overflow:hidden!important;box-sizing:border-box!important;
}
#ca-hall #hall-modal.hall-tree-fullscreen .hall-tree-interface{container-type:inline-size!important;aspect-ratio:1670/942!important}
#ca-hall #hall-modal.hall-tree-fullscreen .hall-tree-board{
 aspect-ratio:1670/942!important;
 background:#0b3256 var(--ca-global-tree-image,url('./hall-of-achievements/the-global-tree-v1465.png')) center/100% 100% no-repeat!important;
}
/* O letreiro e as colunas do placar JÁ fazem parte da arte. Não duplicar títulos. */
#ca-hall #hall-modal.hall-tree-fullscreen #hall-modal-title,
#ca-hall #hall-modal.hall-tree-fullscreen .hall-tree-list-heading{display:none!important}
#ca-hall #hall-modal.hall-tree-fullscreen .hall-modal-top{
 display:block!important;position:absolute!important;inset:0!important;width:100%!important;height:100%!important;
 z-index:70!important;margin:0!important;padding:0!important;pointer-events:none!important;border:0!important;
}

/* Dois modos, na área livre imediatamente acima do quadro à direita. */
#ca-hall #hall-modal.hall-tree-fullscreen .hall-rank-modes{
 position:absolute!important;left:67.8%!important;top:19.0%!important;
 width:27.2%!important;height:5.1%!important;z-index:30!important;
 margin:0!important;padding:0!important;display:flex!important;gap:.52cqw!important;
 flex-wrap:nowrap!important;align-items:stretch!important;box-sizing:border-box!important;
}
#ca-hall #hall-modal.hall-tree-fullscreen .hall-rank-modes button{
 flex:1 1 0!important;min-width:0!important;min-height:0!important;
 padding:0 .36cqw!important;margin:0!important;border-radius:999px!important;
 background:linear-gradient(#123d80,#102550)!important;border:max(1px,.1cqw) solid #e9b955!important;
 color:#fff2c4!important;font:800 clamp(7px,.93cqw,14px)/1.1 Trebuchet MS,Arial,sans-serif!important;
 box-shadow:0 1px 5px #041d459c!important;white-space:nowrap!important;cursor:pointer!important;
}
#ca-hall #hall-modal.hall-tree-fullscreen .hall-rank-modes button[aria-pressed="true"]{
 background:linear-gradient(#fff2bf,#f5cf70)!important;border-color:#fff6d6!important;color:#173866!important;
}
#ca-hall #hall-modal.hall-tree-fullscreen #hall-rank-info{
 position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;
 clip-path:inset(50%)!important;
}

/* Pódio de 3 troncos: os perfis ficam CENTRALIZADOS em cada tronco,
 * ABAIXO das medalhas 1/2/3 e ACIMA da face ilustrada da plataforma.
 * Percentuais relativos ao cenário 1670 x 942, nunca ao navegador externo. */
#ca-hall #hall-modal.hall-tree-fullscreen .hall-tree-podium-slot{
 position:absolute!important;display:flex!important;flex-direction:column!important;
 align-items:center!important;justify-content:flex-start!important;text-align:center!important;
 gap:.23cqw!important;margin:0!important;padding:0!important;box-sizing:border-box!important;
 max-height:24%!important;z-index:12!important;
}
#ca-hall #hall-modal.hall-tree-fullscreen .hall-tree-podium-slot.place-1{
 left:40.80%!important;top:54.30%!important;width:9.40%!important;
}
#ca-hall #hall-modal.hall-tree-fullscreen .hall-tree-podium-slot.place-2{
 left:29.25%!important;top:60.35%!important;width:9.40%!important;
}
#ca-hall #hall-modal.hall-tree-fullscreen .hall-tree-podium-slot.place-3{
 left:51.78%!important;top:60.35%!important;width:9.40%!important;
}
#ca-hall #hall-modal.hall-tree-fullscreen .hall-tree-avatar-shell{
 width:4.00cqw!important;height:4.00cqw!important;min-width:0!important;min-height:0!important;
 max-width:none!important;max-height:none!important;padding:.18cqw!important;
 box-sizing:border-box!important;border-width:max(1px,.14cqw)!important;
 margin:0!important;flex:0 0 auto!important;
}
#ca-hall #hall-modal.hall-tree-fullscreen .hall-tree-podium-name,
#ca-hall #hall-modal.hall-tree-fullscreen .hall-tree-podium-class,
#ca-hall #hall-modal.hall-tree-fullscreen .hall-tree-podium-score{
 max-width:100%!important;box-sizing:border-box!important;min-height:0!important;
 padding:.12cqw .42cqw!important;line-height:1.08!important;
 font-size:clamp(6px,.77cqw,12px)!important;white-space:nowrap!important;
 overflow:hidden!important;text-overflow:ellipsis!important;
}
#ca-hall #hall-modal.hall-tree-fullscreen .hall-tree-podium-name{
 display:flex!important;align-items:center!important;justify-content:center!important;
 gap:.18cqw!important;font-weight:900!important;
}
#ca-hall #hall-modal.hall-tree-fullscreen .hall-tree-podium-class,
#ca-hall #hall-modal.hall-tree-fullscreen .hall-tree-podium-score{
 font-size:clamp(6px,.70cqw,11px)!important;
}

/* Área útil do quadro: x=68,7..92,6%; y=35,3..72,5%.
 * A rolagem fica DENTRO da moldura dourada, não abaixo dela. */
#ca-hall #hall-modal.hall-tree-fullscreen .hall-tree-list{
 position:absolute!important;left:68.70%!important;top:35.35%!important;
 width:23.90%!important;height:37.10%!important;max-height:none!important;
 z-index:18!important;margin:0!important;padding:0 .17cqw 0 0!important;
 box-sizing:border-box!important;overflow-x:hidden!important;overflow-y:auto!important;
 scrollbar-gutter:stable!important;scrollbar-width:thin!important;
 scrollbar-color:#e2a342 #193151aa!important;overscroll-behavior:contain!important;
 display:flex!important;flex-direction:column!important;gap:.25cqw!important;
}
#ca-hall #hall-modal.hall-tree-fullscreen .hall-tree-row{
 box-sizing:border-box!important;flex:0 0 auto!important;width:100%!important;
 height:2.58cqw!important;min-height:0!important;max-height:none!important;
 margin:0!important;padding:.10cqw .27cqw!important;gap:.11cqw!important;
 display:grid!important;align-items:center!important;
 grid-template-columns:8% minmax(0,1fr) 18% 26%!important;
 border-width:max(1px,.09cqw)!important;border-radius:.65cqw!important;
 font:800 clamp(6px,.83cqw,13px)/1.1 Trebuchet MS,Arial,sans-serif!important;
}
#ca-hall #hall-modal.hall-tree-fullscreen .hall-tree-board.is-class .hall-tree-row{
 grid-template-columns:8% minmax(0,1fr) 29%!important;
}
#ca-hall #hall-modal.hall-tree-fullscreen .hall-tree-board.is-class .hall-tree-col-class{display:none!important}
#ca-hall #hall-modal.hall-tree-fullscreen .hall-tree-col-name{
 display:flex!important;align-items:center!important;justify-content:flex-start!important;
 gap:.21cqw!important;overflow:hidden!important;min-width:0!important;
}
#ca-hall #hall-modal.hall-tree-fullscreen .hall-tree-player-name{
 min-width:0!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;
}
#ca-hall #hall-modal.hall-tree-fullscreen .hall-tree-col-score{
 text-align:right!important;font-size:clamp(6px,.79cqw,12px)!important;letter-spacing:-.02em!important;
 font-variant-numeric:tabular-nums!important;white-space:nowrap!important;
}
#ca-hall #hall-modal.hall-tree-fullscreen .hall-tree-online{
 display:inline-block!important;width:.67cqw!important;height:.67cqw!important;
 min-width:.67cqw!important;min-height:.67cqw!important;
 flex:0 0 .67cqw!important;margin:0!important;border-radius:50%!important;
 background:#98a4ae!important;box-shadow:0 0 0 1px #fff8d0!important;opacity:.88!important;
}
#ca-hall #hall-modal.hall-tree-fullscreen .hall-tree-online.is-online{
 background:#16d46c!important;box-shadow:0 0 0 1px #f5ffe5,0 0 .42cqw .11cqw #25df7aaa!important;opacity:1!important;
}

/* BOTÕES DE FECHAR: apenas a arte PNG OFICIAL do próprio jogo.
 * Não transformar em um hotspot de objeto de cenário. */
:root{--ca-v147-close-art:url('ca-x-mapa-oficial-v9955.png')}
html body #ca-hall #hall-modal.hall-tree-fullscreen #hall-modal-close{
 display:grid!important;place-items:center!important;position:absolute!important;
 top:1.0%!important;right:1.2%!important;left:auto!important;bottom:auto!important;
 z-index:150!important;pointer-events:auto!important;cursor:pointer!important;
 width:clamp(34px,4.2cqw,62px)!important;height:clamp(34px,4.2cqw,62px)!important;
 min-width:34px!important;min-height:34px!important;max-width:62px!important;max-height:62px!important;
 margin:0!important;padding:0!important;border:0!important;border-radius:0!important;
 background:transparent var(--ca-v147-close-art) center/contain no-repeat!important;
 color:transparent!important;font-size:0!important;opacity:1!important;visibility:visible!important;
 box-shadow:none!important;filter:none!important;
}
/* Os menus da Plaza, Porto, Mapa, Biblioteca, Loja e Inventário mantêm
 * seus próprios handlers; o X oficial só corrige a aparência/carga. */
html body #ca-adventure-plaza #plaza-modal-close,
html body #ca-adventure-travel-map #ca-travel-close,
html body #ca-inventory-modal #ca-inv-close,
html body #ca-shop-modal #ca-shop-close{
 background:transparent var(--ca-v147-close-art) center/contain no-repeat!important;
 color:transparent!important;font-size:0!important;text-shadow:none!important;
 border:0!important;box-shadow:none!important;opacity:1!important;visibility:visible!important;
 cursor:pointer!important;
}
html body #ca-adventure-plaza .plaza-modal.ca-port-v9956-active #plaza-modal-close{
 background:transparent var(--ca-v147-close-art) center/contain no-repeat!important;
 pointer-events:auto!important;
}
html body #ca-hall #hall-modal.hall-tree-fullscreen #hall-modal-close:focus-visible,
html body #ca-adventure-plaza #plaza-modal-close:focus-visible,
html body #ca-adventure-travel-map #ca-travel-close:focus-visible{
 outline:2px solid #fff1a1!important;outline-offset:2px!important;
}
/* Proteção: caso o PNG oficial não esteja publicado, o usuário AINDA consegue
 * localizar e usar o botão X (sem introduzir imagem nova ao jogo). */
html.ca-v147-x-missing body #ca-hall #hall-modal.hall-tree-fullscreen #hall-modal-close,
html.ca-v147-x-missing body #ca-adventure-plaza #plaza-modal-close,
html.ca-v147-x-missing body #ca-adventure-travel-map #ca-travel-close,
html.ca-v147-x-missing body #ca-inventory-modal #ca-inv-close,
html.ca-v147-x-missing body #ca-shop-modal #ca-shop-close,
html.ca-v147-x-missing body #ca-center .ca-close,
html.ca-v147-x-missing body #postcardBook #closePostcards{
 background:linear-gradient(#ffd974,#df9b36)!important;border-radius:50%!important;
 border:2px solid #fff0b3!important;box-shadow:0 2px 6px #12274788!important;
}
html.ca-v147-x-missing body #ca-hall #hall-modal.hall-tree-fullscreen #hall-modal-close::after,
html.ca-v147-x-missing body :is(#plaza-modal-close,#ca-travel-close,#ca-inv-close,#ca-shop-close,#closePostcards)::after,
html.ca-v147-x-missing body #ca-center .ca-close::after{
 content:'×'!important;display:block!important;position:absolute!important;inset:0!important;
 color:#113a77!important;font:900 clamp(22px,2.6vw,34px)/1 Arial,sans-serif!important;
 text-align:center!important;align-content:center!important;text-indent:0!important;visibility:visible!important;
}


/* ======================================================================================================
 * V14.65 — The Global Tree com a ARTE NOVA (1670×942): painel maior e faixa azul do cabeçalho em branco.
 * Medido na imagem: faixa azul x 1065–1585 / y 302–332 · papel creme x 1064–1595 / y 338–708 ·
 * medalhas 2/1/3 centradas em x = 520 / 701 / 880 (a arte anterior tinha 573 / 758 / 935).
 * Colunas nos DOIS rankings (turma e global): Posição | Ícone | Nome | Online/Offline | Turma | Estrelas.
 * O cabeçalho das colunas voltou a ser texto (a arte nova não traz rótulos).
 * ==================================================================================================== */
#ca-hall #hall-modal.hall-tree-fullscreen .hall-rank-modes{left:63.9%!important;top:22.4%!important;width:31.8%!important;height:5%!important}
#ca-hall #hall-modal.hall-tree-fullscreen .hall-tree-podium-slot.place-1{left:37.3%!important}
#ca-hall #hall-modal.hall-tree-fullscreen .hall-tree-podium-slot.place-2{left:26.4%!important}
#ca-hall #hall-modal.hall-tree-fullscreen .hall-tree-podium-slot.place-3{left:48.0%!important}
#ca-hall #hall-modal.hall-tree-fullscreen .hall-tree-board{--ht-cols:11% 9% minmax(0,1fr) 15% 10% 13%}
#ca-hall #hall-modal.hall-tree-fullscreen .hall-tree-list-heading{
 display:grid!important;position:absolute!important;left:64.1%!important;top:32.0%!important;width:30.9%!important;height:3.3%!important;
 box-sizing:border-box!important;margin:0!important;padding:0 calc(.17cqw + 9px) 0 .27cqw!important;z-index:19!important;
 grid-template-columns:var(--ht-cols)!important;gap:.11cqw!important;align-items:center!important;
 color:#fff4ce!important;font:900 clamp(6px,.8cqw,13px)/1.1 Trebuchet MS,Arial,sans-serif!important;
 text-shadow:0 1px 2px #081c43!important;white-space:nowrap!important;pointer-events:none!important;
}
#ca-hall #hall-modal.hall-tree-fullscreen .hall-tree-list-heading span{text-align:left!important;overflow:hidden!important;text-overflow:ellipsis!important}
#ca-hall #hall-modal.hall-tree-fullscreen .hall-tree-list-heading span:nth-child(1),
#ca-hall #hall-modal.hall-tree-fullscreen .hall-tree-list-heading span:nth-child(2),
#ca-hall #hall-modal.hall-tree-fullscreen .hall-tree-list-heading span:nth-child(5){text-align:center!important}
#ca-hall #hall-modal.hall-tree-fullscreen .hall-tree-list-heading span:nth-child(6){text-align:right!important}
#ca-hall #hall-modal.hall-tree-fullscreen .hall-tree-list{
 left:64.1%!important;top:36.2%!important;width:30.9%!important;height:38.8%!important;gap:.3cqw!important;
}
#ca-hall #hall-modal.hall-tree-fullscreen .hall-tree-row,
#ca-hall #hall-modal.hall-tree-fullscreen .hall-tree-board.is-class .hall-tree-row{
 grid-template-columns:var(--ht-cols)!important;height:3.05cqw!important;padding:.12cqw .27cqw!important;gap:.11cqw!important;
}
#ca-hall #hall-modal.hall-tree-fullscreen .hall-tree-col-pos{text-align:center!important;font-size:clamp(7px,1.05cqw,17px)!important}
#ca-hall #hall-modal.hall-tree-fullscreen .hall-tree-col-icon{display:flex!important;justify-content:center!important;align-items:center!important;overflow:visible!important}
#ca-hall #hall-modal.hall-tree-fullscreen .hall-tree-col-name{font-size:clamp(6px,.86cqw,14px)!important}
#ca-hall #hall-modal.hall-tree-fullscreen .hall-tree-col-status{
 display:flex!important;align-items:center!important;justify-content:flex-start!important;gap:.3cqw!important;overflow:hidden!important;
 font-size:clamp(6px,.74cqw,12px)!important;font-weight:900!important;
}
#ca-hall #hall-modal.hall-tree-fullscreen .hall-tree-board.is-class .hall-tree-col-class,
#ca-hall #hall-modal.hall-tree-fullscreen .hall-tree-col-class{
 display:block!important;text-align:center!important;font-size:clamp(6px,.78cqw,13px)!important;color:#2f5688!important;font-weight:900!important;
}
#ca-hall #hall-modal.hall-tree-fullscreen .hall-tree-col-score{font-size:clamp(6px,.85cqw,14px)!important;letter-spacing:0!important}
/* O ranking da turma também mostra a coluna Turma (a V14.2 a escondia): cabeçalho com as 6 colunas nos dois modos. */
#ca-hall #hall-modal.hall-tree-fullscreen .hall-tree-board.is-class .hall-tree-list-heading{grid-template-columns:var(--ht-cols)!important}
#ca-hall #hall-modal.hall-tree-fullscreen .hall-tree-board.is-class .hall-tree-list-heading span:nth-child(3){display:block!important}
