/* Halloween Mysteries — alterações isoladas da sala; sem regras para a Cândido Arena. */
#ca-ha[hidden],#ca-ha [hidden]{display:none!important}
#ca-ha{position:fixed;inset:0;z-index:1200000;overflow:hidden;background:#77c9f5 url('../imagens/ilhas/fundo-arquipelago-candido.png') center/cover fixed no-repeat;color:#fff;font-family:Trebuchet MS,Arial,sans-serif}
body.ca-ha-open{overflow:hidden}
#ca-ha .ha-viewport{position:absolute;inset:0;width:100%;height:100%;overflow:hidden;touch-action:none}
#ca-ha .ha-scene{position:absolute;top:0;left:0;width:725px;height:458px;max-width:none;min-height:0;transform-origin:top left;background:#20365a url('sala.png') center/100% 100% no-repeat;overflow:hidden;touch-action:manipulation}
/* Cabeçalho autêntico compartilhado com as demais telas, no layout da Arena. */
#ca-ha header.top{position:absolute!important;top:7px!important;left:auto!important;right:8px!important;width:auto!important;max-width:calc(100% - 155px)!important;margin:0!important;padding:0!important;background:transparent!important;border:0!important;box-shadow:none!important;z-index:4000;backdrop-filter:none!important}
#ca-ha header.top .brand{display:none!important}
#ca-ha header.top .flex{display:flex!important;justify-content:flex-end!important;gap:4px!important;flex-wrap:nowrap!important;background:transparent!important}
#ca-ha header.top button,#ca-ha header.top .global-online-counter{font-size:11px!important;padding:5px 7px!important;min-width:0!important;min-height:0!important}
#ca-ha .ha-island-nav{position:absolute;z-index:4100;top:8px;left:8px;right:8px;min-height:34px;display:flex;align-items:center;justify-content:center;pointer-events:none}
#ca-ha .ha-island-nav #ha-back{position:absolute;left:0;top:0;pointer-events:auto}
#ca-ha .ha-nav-title{font-size:clamp(12px,1.4vw,21px);font-weight:900;text-shadow:0 2px 3px #000b;white-space:nowrap}
#ca-ha button:not(.sound-toggle):not(#logout){cursor:pointer}
#ca-ha .ha-pad button,#ca-ha .ha-dialog button,#ca-ha .ha-candy{background:linear-gradient(#4db4ee,#1763ae);border:3px solid #d9b76c;border-bottom-width:6px;border-radius:22px;color:white;font-weight:900;padding:9px 14px;text-shadow:0 2px #17477a;box-shadow:0 5px 9px #0003}
#ca-ha .ha-actor{position:absolute;top:0;left:0;width:4.5%;text-align:center;pointer-events:none;z-index:1400;will-change:transform}
#ca-ha .ha-puppet{position:relative;transform-origin:50% 90%}
#ca-ha .ha-actor img{width:100%;max-height:140px;object-fit:contain;filter:drop-shadow(0 4px 3px #0007)}
#ca-ha .ha-actor span{display:block;background:#1e3159d9;border-radius:9px;padding:2px;font-size:11px;white-space:nowrap;overflow:visible}
/* Clique/toque e WASD compartilham a animação idêntica de caminhada. */
#ca-ha .ha-actor.walk .ha-puppet{animation:ha-walk-v8 .34s ease-in-out infinite alternate}
#ca-ha .ha-actor.walk .ha-puppet>img{animation:ha-walk-tilt .34s ease-in-out infinite alternate}
@keyframes ha-walk-v8{from{transform:translateY(0)}to{transform:translateY(-5px)}}
@keyframes ha-walk-tilt{from{transform:rotate(-3deg)}to{transform:rotate(3deg)}}
/* Posições preservadas; só o botão do minigame é movido para a bandeira na árvore direita. */
#ca-ha .ha-pumpkin{position:absolute;left:47%;top:40%;width:9%;height:19%;background:transparent!important;border:0!important;box-shadow:none!important;padding:0!important;z-index:1300;cursor:pointer}
#ca-ha .ha-pumpkin img{width:100%;height:100%;object-fit:contain}
#ca-ha .ha-candy{position:absolute;left:85.5%;top:48.5%;width:10.2%;z-index:1400;transform:rotate(-3deg);font-size:11px;padding:5px 4px;line-height:1.15;white-space:nowrap}
#ca-ha .ha-dialog{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);width:min(600px,94vw);background:#fff9ed;border:4px solid #d9b76c;border-radius:20px;color:#20365a;padding:20px;z-index:5000;box-shadow:0 12px 40px #0008}
#ca-ha .ha-dialog p{line-height:1.5}
#ca-ha .ha-pad{position:absolute;z-index:4200;bottom:0;left:50%;transform:translateX(-50%);display:none;gap:8px;justify-content:center;padding:12px;pointer-events:auto}
#ca-ha .ha-pad button{min-width:55px;touch-action:none}
#ca-ha #ha-candy-toast{position:fixed;z-index:5500;left:50%;bottom:24px;transform:translateX(-50%);width:min(600px,90vw);padding:14px 18px;border:3px solid #fbd76b;border-radius:14px;background:#24104e;color:white;text-align:center;font-weight:800;box-shadow:0 10px 25px #0007}
#ca-halloween-transition{position:fixed;inset:0;z-index:1200001;display:none;align-items:center;justify-content:center;flex-direction:column;gap:18px;text-align:center;padding:24px;background:#164b80 url('../imagens/ilhas/fundo-arquipelago-candido.png') center/cover no-repeat;color:#fff;font:700 19px Trebuchet MS,Arial,sans-serif}
#ca-halloween-transition.ca-show{display:flex}
#ca-halloween-transition img{width:min(80vw,320px);max-height:38vh;object-fit:contain;filter:drop-shadow(0 8px 18px #0005)}
#ca-halloween-transition .ha-spinner{width:66px;height:66px;border:6px solid #ffffff50;border-top-color:#fff6a8;border-radius:50%;animation:ha-spin .85s linear infinite}
@keyframes ha-spin{to{transform:rotate(360deg)}}
@media(max-width:700px){#ca-ha header.top{max-width:calc(100% - 120px)!important}#ca-ha header.top button,#ca-ha header.top .global-online-counter{font-size:10px!important;padding:4px!important}#ca-ha .ha-island-nav{top:4px;left:4px;right:4px;justify-content:flex-start}#ca-ha #ha-back{font-size:11px!important;padding:5px 8px!important}#ca-ha .ha-nav-title{position:absolute;top:40px;left:50%;transform:translateX(-50%);font-size:14px;max-width:85vw;overflow:hidden;text-overflow:ellipsis}#ca-ha .ha-pad{display:flex}#ca-ha .ha-candy{font-size:10px}}
@media(prefers-reduced-motion:reduce){#ca-ha .ha-actor.walk .ha-puppet,#ca-ha .ha-actor.walk .ha-puppet>img,#ca-halloween-transition .ha-spinner{animation:none!important}}

/* V50.35 — somente ajustes solicitados na sala de Halloween */
#ca-ha .ha-island-nav{justify-content:flex-start;right:auto;z-index:4500}
#ca-ha .ha-actor span{position:absolute;top:100%;left:50%;transform:translateX(-50%);display:block;width:max-content;max-width:180px;background:#fff2aa!important;color:#17344e!important;font-size:clamp(8px,.85vw,13px)!important;font-weight:800!important;padding:3px 6px!important;border-radius:5px!important;line-height:1.15!important;white-space:nowrap}
#ca-ha .ha-bubble:not(:empty){position:absolute;bottom:105%;left:50%;transform:translateX(-50%);padding:6px 10px;white-space:nowrap;color:#17344e;background:white;border:2px solid #d9b76c;border-radius:12px;font-size:12px;z-index:1700;box-shadow:0 4px 12px #0004}
#ca-ha .ha-speech{position:absolute;z-index:4500;bottom:14px;left:14px;pointer-events:auto;display:flex;flex-direction:column-reverse;align-items:flex-start;gap:6px}
#ca-ha #ha-speech-toggle,#ca-ha .ha-speech-menu button{background:linear-gradient(#4db4ee,#1763ae);border:3px solid #d9b76c;border-bottom-width:5px;border-radius:17px;color:white;font-weight:900;padding:7px 12px;text-shadow:none!important;box-shadow:0 5px 9px #0003;cursor:pointer}
#ca-ha .ha-speech-menu{width:min(310px,80vw);max-height:55vh;overflow-y:auto;display:flex;gap:5px;flex-wrap:wrap;padding:8px;border-radius:14px;background:#20103eea;border:2px solid #f6ca58}
#ca-ha .ha-speech-menu[hidden]{display:none!important}
#ca-ha .ha-speech-menu button{font-size:12px;padding:6px 9px;border-width:2px}
@media(max-width:700px){#ca-ha .ha-speech{left:7px;bottom:63px}#ca-ha #ha-speech-toggle{padding:5px 8px;font-size:11px}#ca-ha .ha-actor span{font-size:10px!important}}

/* V50.36: controle Voltar idêntico ao da Arena; deixa estilos da classe global .btn prevalecerem. */
#ca-ha .ha-island-nav #ha-back{background:linear-gradient(165deg,#69bffb 0%,#2f85d3 56%,#205ca8 100%)!important;border:3px solid #c39b64!important;border-bottom:5px solid #805331!important;border-radius:20px!important;font-family:Trebuchet MS,system-ui,sans-serif;font-weight:900;white-space:nowrap!important;text-shadow:0 2px 2px #174c38,0 0 2px #174c38;box-shadow:inset 0 3px 0 #ffffff85,inset 0 -3px 0 #195f3799,0 5px 0 #60442d,0 9px 12px #183b4b45!important;box-sizing:border-box!important;min-height:48px;padding:12px 17px!important;line-height:1.25!important}
/* Os mesmos ajustes de posição/tamanho do botão Falas já aplicado na Arena. */
#ca-ha .ha-speech{bottom:14px!important;left:14px!important;gap:6px!important}
#ca-ha #ha-speech-toggle{border-bottom-width:5px!important;padding:7px 12px!important;border-radius:17px!important}
#ca-ha .ha-speech-menu{width:min(320px,85vw)!important;max-height:54vh!important;align-items:center!important;justify-content:flex-start!important}
#ca-ha .ha-speech-menu button{font-size:12px!important;padding:5px 8px!important;min-height:0!important;border-radius:12px!important}
@media(max-width:700px){
 #ca-ha .ha-speech{left:7px!important;bottom:12px!important}
 #ca-ha #ha-speech-toggle{font-size:11px!important;padding:5px 8px!important}
 #ca-ha .ha-island-nav #ha-back{padding:7px 9px!important;font-size:12px!important;min-height:0!important}
}
@media(max-width:520px){#ca-ha .ha-island-nav #ha-back{font-size:11px!important;padding:5px!important}}

/* V50.38: remover apenas sombras de letras e emojis das Falas de Halloween. */
#ca-ha .ha-speech,#ca-ha .ha-speech *{text-shadow:none!important;}

/* V50.39 — somente layout mobile de Halloween Mysteries.
   A Arena não apresenta setas sobrepostas para toque: o cenário aceita toques/cliques. */
#ca-ha .ha-pad{display:none!important}
/* Mesmo ponto de corte da Arena: entre 521 e 700 px não compactar cedo demais. */
@media (min-width:521px) and (max-width:700px){
 #ca-ha header.top{max-width:calc(100% - 155px)!important}
 #ca-ha header.top button,#ca-ha header.top .global-online-counter{font-size:11px!important;padding:5px 7px!important}
}
/* Na Arena, a compactação extra dos controles começa em 520 px. */
@media (max-width:520px){
 #ca-ha header.top{max-width:calc(100% - 120px)!important}
 #ca-ha header.top button,#ca-ha header.top .global-online-counter{font-size:10px!important;padding:4px!important}
}

/* V50.41 — outros aventureiros de Halloween, sobre a mesma cena da Arena. */
#ca-ha .ha-other-actors{position:absolute;inset:0;z-index:1360;pointer-events:none;overflow:visible}
#ca-ha .ha-other-actors .ha-peer{position:absolute;top:0;left:0;z-index:1360;width:4.5%;transition-property:transform;transition-timing-function:linear;pointer-events:none}
#ca-ha .ha-other-actors .ha-peer .ha-peer-art{width:100%;height:75px;max-height:140px;background-position:center bottom;background-repeat:no-repeat;background-size:contain;filter:drop-shadow(0 4px 3px #0007)}
#ca-ha .ha-other-actors .ha-peer span{background:#fff2aa!important;color:#17344e!important;max-width:150px;overflow:hidden;text-overflow:ellipsis}

/* V50.50: somente botão Falas e alinhamento do Voltar no celular. */
#ca-ha #ha-speech-toggle{box-sizing:border-box!important;display:grid!important;place-items:center!important;width:var(--ha-speech-w,52px)!important;min-width:var(--ha-speech-w,52px)!important;max-width:var(--ha-speech-w,52px)!important;height:var(--ha-speech-h,52px)!important;min-height:var(--ha-speech-h,52px)!important;max-height:var(--ha-speech-h,52px)!important;font-size:clamp(23px,2.2vw,31px)!important;line-height:1!important;padding:0!important}
@media(max-width:700px){
 #ca-ha .ha-island-nav{top:var(--ha-back-top,4px)!important}
 #ca-ha .ha-island-nav #ha-back{box-sizing:border-box!important;height:var(--ha-back-height,44px)!important;min-height:var(--ha-back-height,44px)!important;max-height:var(--ha-back-height,44px)!important;padding:0 9px!important;display:flex!important;align-items:center!important;justify-content:center!important}
}

/* V50.52: categorias de Falas com o mesmo padrão visual da Cândido Arena. */
#ca-ha .ha-speech-menu{box-sizing:border-box;display:block!important;color:white;padding:9px!important}
#ca-ha .ha-speech-category{display:flex;flex-wrap:wrap;gap:5px;margin-bottom:6px}
#ca-ha .ha-speech-category strong{width:100%;font-size:12px;color:#fff5c6}
#ca-ha .ha-speech-category button{padding:6px 8px!important;min-height:0!important;font-size:12px!important;border-radius:9px!important}

/* V50.56 — clicar diretamente nas barracas, com sombra de interação ao se aproximar. */
#ca-ha .ha-booth{position:absolute;display:block;background:transparent!important;border:0!important;border-radius:20%!important;box-shadow:none!important;padding:0!important;margin:0!important;transform:none!important;cursor:pointer;z-index:1300;color:transparent!important;font-size:0!important;touch-action:manipulation;transition:background .2s,box-shadow .2s,filter .2s}
#ca-ha .ha-carved.ha-booth{left:11.2%;top:25.5%;width:25%;height:31%}
#ca-ha .ha-candy.ha-booth{left:75.5%;top:36%;width:19.5%;height:32%}
#ca-ha .ha-booth:is(:hover,:focus-visible,.ha-near):not(.ha-cooldown){background:radial-gradient(ellipse,#ffe28905 36%,#ffe08c25 75%,#ffe08c50 100%)!important;box-shadow:0 0 22px 7px #ffe8a77c,inset 0 0 17px 5px #ffe8a755!important;filter:drop-shadow(0 0 7px #ffdf8b)}
#ca-ha .ha-booth:focus-visible{outline:3px solid #ffe07e!important;outline-offset:3px}
#ca-ha .ha-booth.ha-cooldown{cursor:not-allowed}
@media(prefers-reduced-motion:reduce){#ca-ha .ha-booth{transition:none}}

/* V50.58 — apenas o emoji ▶️, sem círculo, borda, fundo ou sombra de botão.
   O alvo de toque permanece acessível, e o limite diário oculta o emoji por completo. */
#ca-ha .ha-scene-play{
 position:absolute;z-index:1550;display:flex;justify-content:center;align-items:center;
 width:4.8%;aspect-ratio:1;border:0!important;border-radius:0!important;
 padding:0!important;margin:0!important;line-height:1!important;
 background:transparent!important;color:inherit!important;
 font-size:clamp(20px,2.8vw,30px)!important;text-shadow:0 1px 4px #140729!important;
 box-shadow:none!important;filter:none!important;
 transform:translate(-50%,-50%);cursor:pointer;touch-action:manipulation;
 transition:transform .15s,filter .15s;
}
#ca-ha .ha-scene-play[hidden]{display:none!important}
#ca-ha .ha-carved-play{left:25.2%;top:47.1%}
#ca-ha .ha-candy-play{left:89.4%;top:54.2%}
#ca-ha .ha-scene-play:is(:hover,:focus-visible){transform:translate(-50%,-50%) scale(1.12);filter:brightness(1.18)!important;box-shadow:none!important}
#ca-ha .ha-scene-play:focus-visible{outline:2px solid #fff5ac!important;outline-offset:1px}
#ca-ha .ha-scene-play.ha-cooldown{opacity:.7;cursor:not-allowed}
@media(prefers-reduced-motion:reduce){#ca-ha .ha-scene-play{transition:none}}

/* V50.62 — Guardião Pumpkin: sem brilho; respiração leve sem mover a área clicável. */
#ca-ha .ha-pumpkin{border-radius:46%!important;touch-action:manipulation}
#ca-ha .ha-pumpkin img{
 display:block;
 transform-origin:50% 85%;
 animation:ha-pumpkin-breathe 3.8s ease-in-out infinite;
}
@keyframes ha-pumpkin-breathe{
 0%,100%{transform:translateY(0) scale(1)}
 50%{transform:translateY(-1px) scaleX(1.015) scaleY(1.03)}
}
/* A indicação de foco pelo teclado é discreta e não produz brilho ou sombra. */
#ca-ha .ha-pumpkin:focus-visible{outline:2px solid #fff!important;outline-offset:2px}
@media(prefers-reduced-motion:reduce){#ca-ha .ha-pumpkin img{animation:none!important}}

/* V61.39: poder equipado ao lado das falas. */
#ca-ha #ha-power-toggle{flex:none!important}


/* V61.40 — mesmos limites e dimensões do cabeçalho da Cândido Arena. */
#ca-ha header.top{position:absolute!important;z-index:4600!important;top:7px!important;left:auto!important;right:8px!important;width:auto!important;max-width:calc(100% - 155px)!important;margin:0!important;padding:0!important;background:transparent!important;border:0!important;box-shadow:none!important;backdrop-filter:none!important}
#ca-ha header.top .brand,#ca-ha header.top .brand[hidden],#ca-ha header.top .logo{display:none!important}
#ca-ha header.top>.flex{display:flex!important;align-items:center!important;justify-content:flex-end!important;gap:4px!important;flex-wrap:nowrap!important;width:auto!important;max-width:100%!important;min-width:0!important;background:transparent!important}
#ca-ha header.top button,#ca-ha header.top .global-online-counter{font-size:11px!important;padding:5px 7px!important;min-width:0!important;min-height:0!important}
@media(max-width:520px){
 #ca-ha header.top{max-width:calc(100% - 120px)!important}
 #ca-ha header.top>.flex{gap:3px!important}
 #ca-ha header.top button,#ca-ha header.top .global-online-counter{font-size:10px!important;padding:4px!important}
}

/* V31 rev. A — Falas na Arena de Halloween em tela BAIXA (celular deitado, janela curta de computador): o menu abria "para cima" da barra de botões (uma coluna alta,
   encostada embaixo), então o topo dele — as primeiras falas — ficava FORA da tela, sem como rolar até lá. Em tela baixa e deitada o menu passa a ficar AO LADO da coluna,
   com o fundo alinhado ao fundo da barra e altura máxima = altura da tela (rola por dentro). É posicionado em relação à PRÓPRIA barra (position:absolute), não à tela:
   em alguns tamanhos a barra tem "scale:.9", e um menu "fixed" dentro dela deixa de ser fixo na tela e sai do lugar. Tela alta e celular em pé não mudam. */
@media(max-height:700px) and (orientation:landscape){
 #ca-ha #ha-speech-menu{position:absolute!important;left:calc(100% + 10px)!important;right:auto!important;top:auto!important;bottom:0!important;
  width:min(320px,calc(100vw - 92px))!important;max-height:calc(100vh - 28px)!important;overflow-y:auto!important;overflow-x:hidden!important;box-sizing:border-box!important}
}
