/* Palácio da memória: sala em tela cheia */
body.palacio-aberto { overflow: hidden; }
body.palacio-aberto > .topo, body.palacio-aberto > .rodape, body.palacio-aberto > .pular { display: none; }
body.palacio-aberto main { padding: 0; max-width: none; }
.palacio { position: fixed; inset: 0; z-index: 30; background: #081322; color: var(--papel); font-family: var(--texto); overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; }
.palacio [hidden] { display: none !important; }
.p-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; }
.p-svg:active { cursor: grabbing; }
.camera { transform-origin: 0 0; }
.camera.suave { transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.p-svg text { font-family: 'Cormorant Garamond', Georgia, serif; pointer-events: none; }
.t-titulo { fill: #e6d3a3; font-size: 20px; font-weight: 600; letter-spacing: .08em; }
.t-placa { fill: #f6dc95; font-size: 21px; font-weight: 700; letter-spacing: .02em; }
.t-placa-sub { fill: #e6d3a3; font-size: 14px; font-style: italic; }
.t-etiqueta { fill: #3a2614; font-size: 12px; font-weight: 700; }
.t-alerta { fill: #ff8a7a; font-size: 24px; font-weight: 700; letter-spacing: .06em; }
.t-bau { fill: #f6dc95; font-size: 14px; font-weight: 700; letter-spacing: .1em; }
.t-porta { fill: #e6d3a3; font-size: 15px; font-weight: 600; }
.p-svg text.t-marca { fill: #f6dc95; font: 600 14px 'Source Sans 3', system-ui, sans-serif; letter-spacing: 0; }
.t-vaga { fill: #f2c96b; font-size: 44px; font-weight: 700; }

/* objetos: foco, destaque, estados */
.obj, [data-guia], .vaga, .ponta { cursor: pointer; outline: none; }
.obj:focus-visible .corpo, .obj:focus-visible > *:not(.alvo), [data-guia]:focus-visible, .vaga:focus-visible, .ponta:focus-visible { filter: drop-shadow(0 0 3px #fff) drop-shadow(0 0 10px #f2c96b); }
.obj .corpo, .obj .arte > *, .obj .fantasma, .bola, .capa, .cortina, .folha, .tampa-bau, .agulha, .pegadas > g { transform-box: fill-box; transform-origin: center; }
.obj:hover .corpo { filter: drop-shadow(0 0 8px rgba(242, 201, 107, .55)); }
.obj.destaque .corpo, .obj.destaque > rect:not(.alvo) { filter: drop-shadow(0 0 14px #f2c96b) drop-shadow(0 0 4px #fff6c8); }
.obj.destaque .corpo { animation: respirar-obj 1.6s ease-in-out infinite; }
.obj.alvo-guia .corpo { filter: drop-shadow(0 0 16px #f2c96b); animation: respirar-obj 1.4s ease-in-out infinite; }
.obj.alvo-pista .corpo { animation: respirar-obj 2.4s ease-in-out infinite; filter: drop-shadow(0 0 6px rgba(242, 201, 107, .5)); }
@keyframes respirar-obj { 50% { transform: scale(1.05); } }
.obj.errado .corpo { animation: tremer .45s; }
.vaga.errado { animation: tremer .45s; }
@keyframes tremer { 20% { transform: translateX(-8px); } 40% { transform: translateX(8px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(4px); } }
.obj.certo-anim .corpo { filter: drop-shadow(0 0 14px #7ee08a); }
.obj.ligado .corpo { filter: drop-shadow(0 0 10px #7ee08a); }
.obj.retirado { opacity: 0; pointer-events: none; transition: opacity .5s, transform .5s; }
.obj.retirado .corpo { transform: scale(.4) translateY(200px); transition: transform .5s; }
.obj.volta .corpo { animation: voltar .7s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes voltar { from { transform: scale(.3); opacity: 0; } }
.vaga { animation: piscar-vaga 2s ease-in-out infinite; }
@keyframes piscar-vaga { 50% { opacity: .65; } }
.marca { animation: subir-marca .4s ease-out; pointer-events: none; }
.marca.suave { opacity: .92; }
@keyframes subir-marca { from { opacity: 0; transform: translateY(12px); } }
.placa-setor rect { transition: stroke .3s, filter .3s; }
.placa-setor.acesa rect { stroke: #fff6c8; stroke-width: 4; filter: drop-shadow(0 0 16px #f2c96b); }
.m-desafio .placa-setor text { opacity: .9; }

/* ambiente vivo, sutil */
.luz-amb { animation: tremeluzir 6s ease-in-out infinite alternate; }
@keyframes tremeluzir { to { opacity: .75; } }

/* termômetro: líquido controlado por JS */
.a-termometro .liquido { transition: none; }
/* bateria */
.agir .a-bateria .cel { animation: apagar .5s forwards; }
.agir .a-bateria .cel0 { animation-delay: .1s; } .agir .a-bateria .cel1 { animation-delay: .5s; } .agir .a-bateria .cel2 { animation-delay: .9s; }
.agir .a-bateria .cel3 { animation: quase-sem 1.4s 1.2s forwards; }
.agir .a-bateria .brilho-bat { animation: apagar 1.6s forwards; }
@keyframes apagar { to { opacity: .1; } }
@keyframes quase-sem { 0% { fill: #6fcf73; } 30% { fill: #e0533f; opacity: 1; } 50% { opacity: .3; } 70% { opacity: 1; } 100% { fill: #e0533f; opacity: .6; } }
/* cefaleia */
.a-bustoDor .dor { opacity: .55; }
.agir .a-bustoDor .dor { animation: latejar .4s 4 alternate; }
.agir .a-bustoDor .cabeca { animation: tremer-cab .3s 3; transform-box: fill-box; transform-origin: bottom; }
@keyframes latejar { from { opacity: .3; transform: scale(.9); } to { opacity: 1; transform: scale(1.15); } }
@keyframes tremer-cab { 50% { transform: rotate(-4deg); } }
/* síncope / tontura */
.agir .a-bustoHalo .halo { animation: girar-halo 1.4s ease-in-out; }
.agir .a-bustoHalo .cabeca { animation: pender 1.4s ease-in-out; transform-box: fill-box; transform-origin: bottom; }
@keyframes girar-halo { 50% { transform: rotate(18deg) scale(1.2); } }
@keyframes pender { 50% { transform: rotate(14deg); } }
/* parestesia */
.a-maoFaisca .faisca { opacity: .45; }
.agir .a-maoFaisca .faisca { animation: faiscar .14s 9 alternate; }
@keyframes faiscar { from { opacity: .2; transform: translateY(2px); } to { opacity: 1; transform: translateY(-2px); } }
/* icterícia e cianose: a cor muda */
.a-olho .esclera { transition: fill .7s; }
.agir .a-olho .esclera { fill: #e8be2a; }
.a-labios .labio { transition: fill .7s; }
.agir .a-labios .labio { fill: #6e3f8f; }
/* exantema */
.a-maoManchas .mancha { opacity: .3; }
.agir .a-maoManchas .mancha { animation: brotar-mancha .4s forwards; }
.agir .a-maoManchas .m1 { animation-delay: .1s; } .agir .a-maoManchas .m2 { animation-delay: .2s; } .agir .a-maoManchas .m3 { animation-delay: .3s; }
.agir .a-maoManchas .m4 { animation-delay: .4s; } .agir .a-maoManchas .m5 { animation-delay: .5s; } .agir .a-maoManchas .m6 { animation-delay: .6s; } .agir .a-maoManchas .m7 { animation-delay: .7s; }
@keyframes brotar-mancha { from { opacity: .3; transform: scale(.4); } to { opacity: 1; transform: scale(1.2); } }
/* edema: incha e deixa o cacifo */
.agir .a-pe .perna { animation: inchar 1.2s forwards; transform-origin: bottom; }
.agir .a-pe .cacifo { animation: cacifo 3.2s .6s forwards; }
@keyframes inchar { to { transform: scale(1.08, 1.03); } }
@keyframes cacifo { 0% { opacity: 0; } 15% { opacity: .9; } 70% { opacity: .7; } 100% { opacity: 0; } }
/* náuseas e vômitos */
.a-balde .gotas { opacity: 0; }
.agir .a-balde .liquido-balde { animation: balanco .3s 4 alternate; }
.agir .a-balde .gotas { animation: respingar 1s; }
@keyframes balanco { from { transform: rotate(-6deg); } to { transform: rotate(6deg); } }
@keyframes respingar { 0% { opacity: 0; transform: translateY(20px); } 40% { opacity: 1; transform: translateY(-12px); } 100% { opacity: 0; transform: translateY(10px); } }
/* diarreia ou constipação */
.a-vaso .tampa { transform-box: fill-box; transform-origin: left bottom; transition: transform .5s; }
.agir .a-vaso .tampa { transform: rotate(-70deg) translate(-6px, -4px); }
.agir .a-vaso .giro { animation: giro .5s 3 linear; }
@keyframes giro { to { transform: rotate(360deg); } }
/* dor abdominal */
.agir .a-barriga .colica { animation: colica .35s 4 alternate; }
@keyframes colica { from { transform: scale(.85); } to { transform: scale(1.25); stroke: #ff3b2a; } }
/* dispneia */
.a-pulmoes .ar { opacity: 0; }
.agir .a-pulmoes .pulmao { animation: ofegar .28s 6 alternate; }
.agir .a-pulmoes .ar { animation: respingar .6s 2; }
@keyframes ofegar { to { transform: scale(1.07); } }
/* dor torácica */
.a-coracaoRaio .raio { opacity: .5; }
.agir .a-coracaoRaio .raio { animation: relampejar .18s 8 alternate; }
.agir .a-coracaoRaio > path:first-child { animation: apertar .5s 3 alternate; }
@keyframes relampejar { from { opacity: .1; } to { opacity: 1; } }
@keyframes apertar { to { transform: scaleX(.9); } }
/* palpitações */
.a-coracaoEcg .ecg { stroke-dasharray: 260; stroke-dashoffset: 0; }
.agir .a-coracaoEcg .pulso { animation: bater .22s 7 alternate; }
.agir .a-coracaoEcg .ecg { animation: tracar .6s 2 linear; }
@keyframes bater { to { transform: scale(1.12); } }
@keyframes tracar { from { stroke-dashoffset: 260; } to { stroke-dashoffset: 0; } }
/* tosse e hemoptise */
.a-tosse .gotas-tosse { opacity: 0; }
.agir .a-tosse .cabeca-tosse { animation: tossir .25s 4 alternate; }
.agir .a-tosse .gotas-tosse { animation: voar .5s 3; }
.agir .a-tosse .sangue { animation: latejar .3s 4 alternate; }
@keyframes tossir { to { transform: translate(4px, 3px) rotate(4deg); } }
@keyframes voar { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(26px); } }
/* disúria */
.a-bexiga .chamas { opacity: .55; }
.agir .a-bexiga .chamas { animation: arder .16s 9 alternate; }
@keyframes arder { from { transform: scaleY(.8); opacity: .5; } to { transform: scaleY(1.25); opacity: 1; } }
/* polaciúria */
.a-relogio .ponteiros line { transform-box: view-box; transform-origin: 0px -20px; }
.agir .a-relogio .minuto { animation: girar-pont .25s 6 linear; }
.agir .a-relogio .hora { animation: girar-pont 1.5s linear; }
@keyframes girar-pont { to { transform: rotate(360deg); } }
/* cor da urina */
.a-copos .nivel-copo { transform-box: fill-box; transform-origin: bottom; }
.agir .a-copos .nivel-copo { animation: encher 1s ease-out; }
@keyframes encher { from { transform: scaleY(.05); } }

/* objetos das salas do esqueleto: a ação reforça a associação */
.p-svg text.t-sinal { fill: #1b3a63; font: 700 56px 'Cormorant Garamond', Georgia, serif; }
.p-svg text.t-escala { fill: #f6dc95; font: 700 15px 'Source Sans 3', sans-serif; }
.p-svg text.t-proa { fill: #f6dc95; font: 700 22px 'Cormorant Garamond', serif; }
.p-svg text.t-rx { fill: #1b3a63; font: italic 700 22px 'Cormorant Garamond', serif; }
.p-svg text.t-selo { fill: #fbe9d6; font: 700 20px 'Cormorant Garamond', serif; }
.decor { cursor: pointer; }
.agir .aceno, .agir .ondas-som path, .agir .chama-vela, .agir .tampa-maleta, .agir .continentes, .agir .anel, .agir .brilho-anel, .agir .tubo, .agir .lente-flash,
.agir .linha-pr, .agir .balao, .decor.agir .camada, .agir .pino-grande, .agir .onda-pino, .agir .mascara, .agir .raios-h, .agir .braco-balanca, .agir .dia,
.agir .vidro-amp, .agir .fio-solto, .agir .maca, .agir .porta-arm, .agir .folha-c, .agir .carimbo, .agir .bolhas-cerveja, .agir .fumaca, .agir .embolo,
.agir .lg, .agir .onda-agua, .agir .agua, .agir .peso-halt, .agir .zzz, .agir .lua, .agir .check, .agir .mao-oferta, .agir .jato, .agir .espuma-pia, .agir .luva,
.agir .ponteiro-pa, .agir .pulso-oxi, .agir .lupa-g, .agir .sinapse, .agir .intestino, .agir .canela, .agir .martelo, .agir .facho-h, .agir .tubo-lab, .agir .tela-rx,
.agir .rx, .agir .ondas-voz, .agir .parte, .agir .rotas, .agir .agulha-r, .agir .itens-cesta, .agir .frasco, .agir .seta-a, .agir .seta-b, .agir .sino-g, .agir .dia-ret,
.agir .carimbo-s, .agir .tinta, .agir .rolo, .agir .cracha, .agir .corpo-medica { transform-box: fill-box; transform-origin: center; }
.agir .aceno { animation: acenar .35s 4 alternate; transform-origin: right bottom; }
@keyframes acenar { to { transform: rotate(-28deg); } }
.agir .cracha { animation: pendular .5s 3 alternate; transform-origin: top center; }
@keyframes pendular { from { transform: rotate(-8deg); } to { transform: rotate(8deg); } }
.agir .chama-vela { animation: soprar 1.4s forwards; }
@keyframes soprar { 0% { transform: scale(1); } 30% { transform: scale(1.3) skewX(-20deg); } 60% { opacity: 0; } 100% { opacity: 1; } }
.a-maleta .ferramentas { opacity: 0; transition: opacity .4s; }
.agir .a-maleta .ferramentas { opacity: 1; }
.agir .tampa-maleta { animation: abrir-tampa 1.4s forwards; transform-origin: center bottom; }
@keyframes abrir-tampa { 20%, 85% { transform: translateY(-34px) rotate(-6deg); } }
.agir .continentes { animation: girar-globo 1.4s ease-in-out; transform-box: view-box; }
@keyframes girar-globo { to { transform: translateX(-70px); } }
.agir .brilho-anel { animation: brilhar 1.2s; }
@keyframes brilhar { 30%, 70% { opacity: 1; transform: scale(1.4) rotate(45deg); } }
.agir .tubo { animation: mirar 1.4s ease-in-out; }
@keyframes mirar { 50% { transform: rotate(-10deg); } }
.agir .lente-flash { animation: piscar-flash 1.4s; }
@keyframes piscar-flash { 40%, 60% { opacity: 1; } }
.agir .linha-pr { animation: escrever .4s backwards; stroke-dasharray: 60; }
.agir .lp1 { animation-delay: .15s; } .agir .lp2 { animation-delay: .3s; } .agir .lp3 { animation-delay: .45s; } .agir .lp4 { animation-delay: .6s; }
@keyframes escrever { from { stroke-dashoffset: 60; } }
.agir .balao { animation: saltar .45s 2 alternate; transform-origin: bottom left; }
@keyframes saltar { to { transform: scale(1.1) translateY(-6px); } }
.a-orelha .ondas-som path { opacity: .25; }
.agir .ondas-som path { animation: ecoar .9s 2; }
.agir .ondas-som path:nth-child(2) { animation-delay: .15s; } .agir .ondas-som path:nth-child(3) { animation-delay: .3s; }
@keyframes ecoar { 0% { opacity: 0; transform: translateX(10px); } 50% { opacity: 1; } 100% { opacity: 0; transform: translateX(-8px); } }
.decor.agir .camada { animation: descascar 1.4s; }
.decor.agir .cm1 { animation-delay: .2s; } .decor.agir .cm2 { animation-delay: .4s; }
@keyframes descascar { 40% { transform: translate(24px, -10px) rotate(14deg); opacity: .3; } }
.agir .pino-grande { animation: cravar .7s cubic-bezier(.3, 1.6, .5, 1); transform-origin: bottom center; }
@keyframes cravar { from { transform: translateY(-50px); } }
.a-alfinete .onda-pino { opacity: 0; }
.agir .onda-pino { animation: ondular 1.2s .4s; }
@keyframes ondular { 0% { opacity: 1; transform: scale(.4); } 100% { opacity: 0; transform: scale(1.6); } }
.agir .m-a { animation: trocar-a 1.4s ease-in-out; } .agir .m-b { animation: trocar-b 1.4s ease-in-out; } .agir .m-c { animation: trocar-c 1.4s ease-in-out; }
@keyframes trocar-a { 50% { transform: translate(40px, 30px) rotate(12deg); } }
@keyframes trocar-b { 50% { transform: translate(-30px, 40px) rotate(-12deg); } }
@keyframes trocar-c { 50% { transform: translate(10px, -60px) rotate(8deg); } }
.a-homemRaios .raios-h { opacity: .55; }
.agir .raios-h { animation: irradiar .5s 3 alternate; }
@keyframes irradiar { from { transform: scale(.7); opacity: .3; } to { transform: scale(1.15); opacity: 1; } }
.agir .braco-balanca { animation: pesar 1.4s ease-in-out; }
@keyframes pesar { 25% { transform: rotate(-12deg); } 75% { transform: rotate(12deg); } }
.a-calendario .dia { opacity: .25; }
.agir .dia { animation: marcar .3s forwards; }
.agir .d1 { animation-delay: .15s; } .agir .d2 { animation-delay: .3s; } .agir .d3 { animation-delay: .45s; } .agir .d4 { animation-delay: .6s; } .agir .d5 { animation-delay: .75s; }
@keyframes marcar { from { opacity: 0; transform: scale(1.8); } to { opacity: 1; transform: scale(1); } }
.agir .vidro-amp { animation: virar-amp 2.2s ease-in-out; }
@keyframes virar-amp { 0% { transform: rotate(0); } 30%, 100% { transform: rotate(180deg); } }
.agir .fio-solto { animation: desenrolar 1.2s; stroke-dasharray: 90; }
@keyframes desenrolar { from { stroke-dashoffset: 90; } }
.agir .maca { animation: amadurecer .5s 2 alternate; }
.agir .mc1 { animation-delay: .1s; } .agir .mc2 { animation-delay: .2s; } .agir .mc3 { animation-delay: .3s; } .agir .mc4 { animation-delay: .4s; }
@keyframes amadurecer { to { transform: scale(1.4); filter: brightness(1.4); } }
.agir .pa-e { animation: abrir-esq 1.4s; transform-origin: left center; } .agir .pa-d { animation: abrir-dir 1.4s; transform-origin: right center; }
@keyframes abrir-esq { 20%, 80% { transform: scaleX(.15); } }
@keyframes abrir-dir { 20%, 80% { transform: scaleX(.15); } }
.agir .fc-e { animation: abrir-esq 1.4s; transform-origin: left center; } .agir .fc-d { animation: abrir-dir 1.4s; transform-origin: right center; }
.a-caderneta .carimbo { opacity: .3; }
.agir .carimbo { animation: carimbar .3s forwards; }
.agir .ca1 { animation-delay: .25s; } .agir .ca2 { animation-delay: .5s; } .agir .ca3 { animation-delay: .75s; }
@keyframes carimbar { from { opacity: 0; transform: scale(2); } to { opacity: 1; transform: scale(1); } }
.agir .bolhas-cerveja { animation: subir-bolha 1.4s; }
@keyframes subir-bolha { to { transform: translateY(-40px); opacity: 0; } }
.agir .fumaca { animation: esfumar 1.6s; }
@keyframes esfumar { 0% { opacity: .2; transform: translateY(10px); } 50% { opacity: .9; } 100% { opacity: 0; transform: translateY(-30px); } }
.agir .embolo { animation: empurrar .7s 2 alternate; }
@keyframes empurrar { to { transform: translateY(30px); } }
.agir .lg { animation: quicar .3s 4 alternate; }
.agir .lg1, .agir .lg4 { animation-delay: .1s; } .agir .lg2, .agir .lg5 { animation-delay: .2s; }
@keyframes quicar { to { transform: translateY(-10px); } }
.agir .onda-agua { animation: marolar .4s 4 alternate; }
@keyframes marolar { to { transform: translateY(-5px) scaleX(.94); } }
.agir .peso-halt { animation: levantar .45s 4 alternate; }
@keyframes levantar { to { transform: translateY(-34px); } }
.a-cama .zzz { opacity: .35; }
.agir .zzz { animation: dormir 1.6s; }
@keyframes dormir { from { opacity: 0; transform: translate(-10px, 10px); } 50% { opacity: 1; } to { opacity: 0; transform: translate(14px, -20px); } }
.agir .check { animation: escrever .4s backwards; stroke-dasharray: 40; }
.agir .ck1 { animation-delay: .3s; } .agir .ck2 { animation-delay: .6s; }
.agir .mao-oferta { animation: oferecer .6s 2 alternate; }
@keyframes oferecer { to { transform: rotate(-70deg) translateY(-14px); } }
.agir .jato { animation: escorrer 1.4s; }
.agir .espuma-pia { animation: escorrer 1.4s .4s; }
@keyframes escorrer { 10%, 80% { opacity: 1; } }
.agir .luva { animation: pendular .4s 3 alternate; transform-origin: top center; }
.agir .ponteiro-pa { animation: medir 1.4s ease-in-out; transform-box: view-box; transform-origin: -14px -26px; }
@keyframes medir { 40% { transform: rotate(100deg); } 70% { transform: rotate(60deg); } }
.agir .pulso-oxi { animation: tracar .5s 3 linear; stroke-dasharray: 40; }
.agir .lupa-g { animation: varrer-lupa 1.4s ease-in-out; }
@keyframes varrer-lupa { 25% { transform: translate(-16px, -8px); } 75% { transform: translate(16px, 8px); } }
.agir .sinapse { animation: faiscar .14s 9 alternate; }
.agir .intestino { animation: peristalse .4s 4 alternate; }
@keyframes peristalse { to { transform: scaleY(1.15) translateX(4px); } }
.agir .canela { animation: chutar .5s .3s; transform-origin: top center; }
@keyframes chutar { 40% { transform: rotate(-35deg); } }
.agir .martelo { animation: martelar .3s; transform-origin: bottom center; }
@keyframes martelar { 50% { transform: rotate(-30deg) translateX(-10px); } }
.a-holofote .facho-h { transition: opacity .4s; }
.agir .facho-h { animation: focar 1.4s; }
@keyframes focar { 30%, 80% { opacity: .75; } }
.agir .tubo-lab { animation: erguer .35s 2 alternate; }
.agir .tb1 { animation-delay: .1s; } .agir .tb2 { animation-delay: .2s; } .agir .tb3 { animation-delay: .3s; } .agir .tb4 { animation-delay: .4s; }
@keyframes erguer { to { transform: translateY(-16px); } }
.agir .tela-rx { animation: acender-rx 1.6s forwards; }
.agir .rx { animation: acender-rx2 1.6s forwards; }
@keyframes acender-rx { to { fill: #cfe7f5; } }
@keyframes acender-rx2 { to { opacity: 1; stroke: #1b3a63; } }
.a-laudo .ondas-voz { opacity: .2; }
.agir .ondas-voz { animation: ecoar .8s 2; }
.agir .parte { animation: acender-parte .4s forwards; }
.agir .pt1 { animation-delay: .35s; } .agir .pt2 { animation-delay: .7s; }
@keyframes acender-parte { to { fill: #c9a45c; } }
.agir .rotas { animation: tracar-rotas 1.4s linear; stroke-dashoffset: 0; }
@keyframes tracar-rotas { from { stroke-dashoffset: 80; } }
.agir .agulha-r { animation: buscar 1.4s ease-in-out; }
@keyframes buscar { 25% { transform: rotate(-60deg); } 50% { transform: rotate(80deg); } 75% { transform: rotate(-30deg); } }
.agir .itens-cesta { animation: quicar .3s 4 alternate; }
.agir .frasco { animation: sacudir .2s 5 alternate; }
@keyframes sacudir { to { transform: rotate(8deg); } }
.agir .seta-a { animation: apontar-a .5s 2 alternate; } .agir .seta-b { animation: apontar-b .5s 2 alternate; }
@keyframes apontar-a { to { transform: translateX(-10px); } }
@keyframes apontar-b { to { transform: translateX(10px); } }
.agir .sino-g { animation: badalar .25s 6 alternate; transform-origin: top center; }
@keyframes badalar { from { transform: rotate(-16deg); } to { transform: rotate(16deg); } }
.agir .dia-ret { animation: marcar .5s; }
.agir .carimbo-s { animation: carimbar-s .8s; }
@keyframes carimbar-s { 50% { transform: translateY(40px); } }
.agir .tinta { animation: escorrer 1.6s .4s forwards; }
.agir .rolo { animation: pendular .4s 2 alternate; }
.agir .corpo-medica { animation: none; }

/* guias da sala */
.fantasma { transform: translateY(32px); opacity: .9; }
.obj.assusta .fantasma { animation: susto 1.4s cubic-bezier(.3, 1.6, .5, 1); }
.obj.assusta .olho-f { animation: arregalar 1.4s; transform-box: fill-box; transform-origin: center; }
.obj.assusta .boca-f { animation: grito 1.4s; transform-box: fill-box; transform-origin: center; }
.obj.calmo .fantasma { animation: aparecer 1.4s ease-in-out; }
/* o fantasma-objeto (sala ALICIA) fica à vista; o da placa (sala de Sintomas) espia por trás */
.a-fantasma .fantasma { transform: none; }
.obj.assusta .a-fantasma .fantasma { animation: susto-obj 1.4s cubic-bezier(.3, 1.6, .5, 1); }
.obj.calmo .a-fantasma .fantasma { animation: aparecer-obj 1.4s ease-in-out; }
@keyframes susto-obj { 0% { transform: none; } 25% { transform: translateY(-40px) scale(1.25); } 60% { transform: translateY(-36px) scale(1.2) rotate(-5deg); } 100% { transform: none; } }
@keyframes aparecer-obj { 50% { transform: translateY(-16px); } }
@keyframes susto { 0% { transform: translateY(32px); } 25% { transform: translateY(-74px) scale(1.15); } 60% { transform: translateY(-70px) scale(1.12) rotate(-4deg); } 100% { transform: translateY(32px); } }
@keyframes aparecer { 40%, 60% { transform: translateY(-50px); } }
@keyframes arregalar { 20%, 65% { transform: scale(1.5); } }
@keyframes grito { 20%, 65% { transform: scale(1.8, 3); } }
.agir .bola { animation: rolar 1s ease-in-out; }
@keyframes rolar { 30% { transform: rotate(-8deg); } 70% { transform: rotate(6deg); } }
.fio-base { fill: none; stroke: none; }
.fio-linha { fill: none; stroke: #b48ce0; stroke-width: 6; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; filter: drop-shadow(0 0 4px rgba(180, 140, 224, .8)); }
.ponta circle:last-child { animation: chamar-ponta 2.2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes chamar-ponta { 50% { transform: scale(1.35); } }
.obj[data-id="livro"].agir .capa { animation: abrir-capa .8s; }
@keyframes abrir-capa { 50% { transform: translateY(-10px) rotate(-6deg); } }
.obj[data-id="sirene"].agir .raios-sirene { animation: girofle 2.4s; transform-box: fill-box; transform-origin: 30% 50%; }
.obj[data-id="sirene"].agir .cupula { animation: acender 2.4s; }
@keyframes girofle { 0% { opacity: 0; } 10%, 90% { opacity: 1; } 50% { transform: rotate(20deg); } 100% { opacity: 0; } }
@keyframes acender { 10%, 90% { filter: brightness(1.8) drop-shadow(0 0 18px #ff3b2a); } }
.cortina { transition: transform .9s cubic-bezier(.4, 0, .2, 1); }
.janela.aberta .c-esq { transform: translateX(-84px) scaleX(.25); }
.janela.aberta .c-dir { transform: translateX(84px) scaleX(.25); }
.janela .facho { transition: opacity .8s, fill .8s; }
.janela.explorada .facho { opacity: .45; animation: varrer 4s ease-in-out infinite alternate; transform-box: view-box; transform-origin: 0px -61px; }
.janela.dominada .facho { fill: #f2c96b; opacity: .75; }
@keyframes varrer { from { transform: rotate(-12deg); } to { transform: rotate(18deg); } }
.janela.dominada .farol-lampada { fill: #f2c96b; }
.porta .folha { transform-box: fill-box; transform-origin: left center; transition: transform .6s; }
.porta[data-guia="porta-prox"] .folha { transform-origin: right center; }
.porta.abrindo .folha { transform: scaleX(.15); }
.bau .tampa-bau { transform-origin: left bottom; transition: transform .5s; }
.bau.aberto .tampa-bau { transform: rotate(-22deg) translateY(-6px); }
.agulha { transition: transform .9s cubic-bezier(.3, 1.4, .5, 1); }
.pegada { opacity: 0; animation: pisar .5s forwards; animation-delay: calc(var(--i) * 110ms); filter: drop-shadow(0 0 4px #f2c96b); }
.pegadas > g { --i: 0; }
@keyframes pisar { to { opacity: .8; } }
.pegadas.somem { opacity: 0; transition: opacity .6s; }

/* controles discretos */
.p-topo { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 10px; padding: 10px 12px; pointer-events: none; flex-wrap: wrap; }
.p-topo > * { pointer-events: auto; }
.p-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 8px 14px; border-radius: 999px; border: 1px solid rgba(201, 164, 92, .55); background: rgba(8, 19, 34, .78); color: var(--papel); font: 600 14px var(--texto); text-decoration: none; cursor: pointer; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.p-btn:hover { background: rgba(27, 58, 99, .9); }
.p-btn:disabled { opacity: .4; cursor: not-allowed; }
.p-btn:focus-visible, .p-modo:focus-visible, .p-mini:focus-visible, .p-peca:focus-visible, .p-link:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.p-ic { width: 44px; padding: 0; font-size: 20px; }
.p-dest { background: var(--ouro); color: var(--marinho-900); border-color: var(--ouro); }
.p-dest:hover { background: #d6b46e; }
.p-modos { display: flex; gap: 2px; padding: 3px; border-radius: 999px; background: rgba(8, 19, 34, .78); border: 1px solid rgba(201, 164, 92, .4); backdrop-filter: blur(6px); }
.p-modo { min-height: 38px; padding: 6px 14px; border-radius: 999px; border: 0; background: none; color: var(--papel); font: 600 14px var(--texto); cursor: pointer; }
.p-modo[aria-pressed="true"] { background: var(--ouro); color: var(--marinho-900); }
.p-ctrl { display: flex; gap: 6px; margin-left: auto; }
.p-ajustes { position: absolute; top: 62px; right: 12px; display: grid; gap: 10px; padding: 14px 16px; border-radius: 14px; background: rgba(8, 19, 34, .94); border: 1px solid rgba(201, 164, 92, .4); font-size: 15px; z-index: 5; }
.p-ajustes label { display: flex; gap: 10px; align-items: center; min-height: 32px; cursor: pointer; }
.p-ajustes input { width: 20px; height: 20px; accent-color: var(--ouro); }
.p-rodape { position: absolute; left: 12px; bottom: 12px; }
.p-aviso { position: absolute; left: 50%; top: 66px; transform: translate(-50%, -10px); max-width: min(560px, 92vw); padding: 10px 16px; border-radius: 12px; background: rgba(8, 19, 34, .92); border: 1px solid rgba(242, 201, 107, .6); font-size: 15px; text-align: center; opacity: 0; transition: opacity .3s, transform .3s; pointer-events: none; }
.p-aviso.vis { opacity: 1; transform: translate(-50%, 0); }

/* cartão de explicação, ao lado do objeto */
.p-cartao { position: absolute; width: 340px; max-height: min(64vh, 560px); overflow: auto; padding: 16px 18px 18px; border-radius: 16px; background: rgba(247, 242, 231, .97); color: var(--tinta); box-shadow: 0 20px 44px rgba(0, 0, 0, .5); font-size: 15px; line-height: 1.45; animation: cartao .3s cubic-bezier(.2, .7, .2, 1); user-select: text; -webkit-user-select: text; touch-action: auto; z-index: 4; }
@keyframes cartao { from { opacity: 0; transform: translateY(8px); } }
.p-cartao h2 { font: 700 26px/1.1 var(--titulo); margin: 4px 0 8px; }
.p-cartao h2:focus { outline: none; }
.p-cartao p { margin: 0 0 8px; }
.p-cartao ul, .p-cartao ol { margin: 0 0 8px; padding-left: 18px; }
.p-cartao li { margin: 2px 0; }
.p-cart-topo { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.p-chip { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #8a6420; }
.p-mini { min-width: 36px; min-height: 36px; border-radius: 999px; border: 1px solid rgba(23, 35, 58, .2); background: #fff; color: var(--tinta); font-size: 18px; cursor: pointer; margin-left: 4px; }
.p-so-estreito { display: none; font-size: 13px; padding: 0 10px; }
.p-oque { font-weight: 600; }
.p-simbolo { font: italic 500 17px/1.3 var(--titulo); color: #6b5a3a; }
.p-validar { font-size: 11px; font-weight: 700; color: #8a5a12; background: #fbf0d9; border: 1px dashed #b98128; border-radius: 6px; padding: 1px 6px; white-space: nowrap; }
.p-rot { font-size: 11px !important; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #6b5a3a; margin: 10px 0 2px !important; }
.p-completo { font-size: 14px; color: #34405a; }
.p-fonte { font-size: 12px; color: #6b7280; }
.p-dica { font-size: 14px; color: #4d5768; }
.p-cart-acoes { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.p-cartao .p-btn { background: #fff; color: var(--tinta); border-color: rgba(23, 35, 58, .25); backdrop-filter: none; }
.p-cartao .p-btn.p-dest { background: var(--marinho-900); color: var(--papel); border-color: var(--marinho-900); }
.p-link { border: 0; background: none; color: var(--marinho-700); font: 600 15px var(--texto); text-decoration: underline; cursor: pointer; padding: 4px 0; min-height: 32px; }
.p-livro { background: linear-gradient(90deg, #efe3c8, #fbf5e6 48%, #e9dcbe 50%, #fbf5e6); border-radius: 10px; padding: 16px; margin: 6px 0 10px; box-shadow: inset 0 0 20px rgba(0, 0, 0, .12); }
.p-pagina { display: grid; justify-items: center; gap: 2px; min-height: 120px; }
.p-pagina.vira { animation: virar .45s ease-out; }
@keyframes virar { from { transform: perspective(600px) rotateY(-70deg); opacity: .2; } }
.p-letra { font: 700 64px/1 var(--titulo); color: #8f6d33; }
.p-pal { font: 600 22px var(--titulo); }
.p-livro-nav { display: flex; justify-content: center; align-items: center; gap: 12px; font-size: 13px; color: #6b5a3a; }
.p-legenda { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; align-items: center; }
.p-pt { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; background: #c8c8c8; }
.p-pt.exp { background: #e6d3a3; border: 1px solid #8f6d33; } .p-pt.dom { background: #4f8a64; } .p-pt.rev { background: #bb5844; }
.p-lista-prog { list-style: none; padding: 0 !important; }
.p-lista-prog li { display: flex; flex-wrap: wrap; align-items: center; gap: 0 4px; padding: 4px 0; border-bottom: 1px solid rgba(23, 35, 58, .08); }
.p-lista-prog small { width: 100%; padding-left: 16px; color: #6b7280; }

/* faixa inferior dos desafios e da reconstrução */
.p-faixa { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); width: min(980px, calc(100vw - 24px)); display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 14px; border-radius: 16px; background: rgba(8, 19, 34, .92); border: 1px solid rgba(201, 164, 92, .5); backdrop-filter: blur(8px); box-shadow: 0 -10px 30px rgba(0, 0, 0, .4); z-index: 3; animation: cartao .3s; }
.p-fx-txt { display: grid; gap: 2px; flex: 1 1 260px; font-size: 16px; }
.p-fx-txt strong { color: var(--brilho); }
.p-fx-n { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ouro); }
.p-fx-acoes { display: flex; gap: 8px; flex-wrap: wrap; }
.p-opcoes { display: flex; flex-wrap: wrap; gap: 8px; flex: 1 1 100%; }
.p-op { border-radius: 12px; }
.p-op.sel { background: var(--ouro); color: var(--marinho-900); }
.p-op.feito { border-color: #7ee08a; color: #b9f0c1; }
.p-op.ok { background: #4f8a64; border-color: #7ee08a; }
.p-op.nao { text-decoration: line-through; opacity: .5; }
.p-bandeja { display: flex; gap: 8px; flex-wrap: wrap; flex: 1 1 100%; justify-content: center; }
.p-peca { width: 76px; height: 92px; border-radius: 14px; border: 1px solid rgba(201, 164, 92, .55); background: radial-gradient(circle at 50% 40%, #1f3d66, #0c1b30); cursor: grab; padding: 4px; touch-action: none; }
.p-peca svg { width: 100%; height: 100%; pointer-events: none; }
.p-peca.sel { border: 3px solid var(--brilho); box-shadow: 0 0 14px rgba(242, 201, 107, .7); }
.p-voando { position: fixed; z-index: 100; pointer-events: none; width: 80px; height: 100px; opacity: .9; filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .5)); }
.m-recon .p-faixa, .m-desafio .p-faixa { max-height: 46vh; overflow: auto; }

/* celular */
@media (max-width: 759px) {
  .p-topo { padding: 8px; gap: 6px; }
  .p-modos { order: 3; width: 100%; justify-content: space-between; }
  .p-modo { flex: 1; padding: 6px 4px; font-size: 13px; }
  .p-ctrl [data-p="inteira"] { padding: 8px 10px; font-size: 13px; }
  .p-aviso { top: 112px; }
  .p-ajustes { top: 112px; }
  .p-cartao.faixa { left: 0 !important; right: 0; bottom: 0; top: auto !important; width: auto; max-height: 46vh; border-radius: 18px 18px 0 0; padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
  .p-cartao.faixa.recolhido { max-height: 76px; overflow: hidden; }
  .p-so-estreito { display: inline-block; }
  .p-faixa { bottom: 0; width: 100vw; border-radius: 16px 16px 0 0; padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
  .p-peca { width: 62px; height: 76px; }
  .p-fx-acoes { flex: 1 1 100%; padding-right: 88px; } /* a bússola (76 px + 12) fica ao lado dos botões, nunca por cima */
}

/* reduzir animações */
.p-sem-anim *, .p-sem-anim *::before, .p-sem-anim *::after { animation: none !important; transition: none !important; }
.p-sem-anim .pegada { opacity: .8; }
.p-sem-anim .fantasma { opacity: .9; }

/* Objetos com ilustração pintada: um pulo curto ao interagir, já que a imagem não tem partes animáveis */
.foto { transform-box: fill-box; transform-origin: 50% 100%; }
.agir .foto { animation: foto-vivo .9s ease-out; }
@keyframes foto-vivo { 0% { transform: scale(1); } 30% { transform: scale(1.08, .94); } 60% { transform: scale(.97, 1.04) translateY(-6px); } 100% { transform: none; } }

/* Fundos pintados: portas, baú e placas */
.porta-a, .bau-a { opacity: 0; transition: opacity .35s; }
.porta-f, .bau-f { transition: opacity .35s; }
.porta.abrindo .porta-a, .bau.aberto .bau-a { opacity: 1; }
.porta.abrindo .porta-f, .bau.aberto .bau-f { opacity: 0; }
.placa-setor.pintada { opacity: 0; transition: opacity .3s; }
.placa-setor.pintada.acesa { opacity: 1; }
.placa-setor.pintada rect { fill: transparent; filter: none; } .placa-setor.pintada text { display: none; }

/* Etapas: objetos ainda bloqueados somem; o próximo a explorar pulsa; os desbloqueados surgem */
.obj { transition: opacity .6s; }
.obj.travado { opacity: 0; pointer-events: none; }
.obj.chamar .corpo { animation: chamar 1.8s ease-in-out infinite; }
@keyframes chamar { 0%, 100% { filter: drop-shadow(0 0 0 rgba(242, 201, 107, 0)); } 50% { filter: drop-shadow(0 0 14px rgba(242, 201, 107, .95)); } }
.brilho-oculto { fill: none; stroke: #f2c96b; stroke-width: 4; opacity: 0; }
.obj.chamar .brilho-oculto, .obj:hover .brilho-oculto, .obj:focus-visible .brilho-oculto { opacity: .9; }
.obj.surgir .corpo { animation: surgir 1.1s cubic-bezier(.3, 1.4, .5, 1); }
@keyframes surgir { 0% { transform: translateY(-40px) scale(.6); opacity: 0; } 100% { transform: none; opacity: 1; } }
.p-sem-anim .obj.chamar .corpo { animation: none; filter: drop-shadow(0 0 10px rgba(242, 201, 107, .9)); }

/* Abertura da Identificação: véu escuro, paciente à esquerda, maca à direita, íris que olha para os lados */
.abertura { pointer-events: none; }
.ab-veu { fill: #050a14; opacity: 0; transition: opacity .5s; }
.abertura.ativa .ab-veu { opacity: .62; }
.ab-lado { opacity: 0; transition: opacity .6s, transform .6s; }
.ab-lado.ver { opacity: 1; }
.ab-rosto { opacity: 0; transition: opacity .45s; }
.ab-rosto.ver { opacity: 1; }
.olho-iris { transition: transform .7s cubic-bezier(.4, 0, .2, 1); }
.obj.olha-esq .olho-iris { transform: translateX(-40px); }
.obj.olha-dir .olho-iris { transform: translateX(40px); }

/* Objeto de palco (olho da Identificação): grande no centro na abertura, sai depois */
.obj { transition: opacity .6s, transform .9s cubic-bezier(.4, 0, .2, 1); }
.obj.saiu { opacity: 0; pointer-events: none; }
.t-fala { font: italic 600 12.5px 'Cormorant Garamond', Georgia, serif; fill: #1b2b4a; }
.obj[data-id="acolhimento"] .fala-medica { opacity: 0; transform: scale(.6); transform-box: fill-box; transform-origin: right bottom; transition: opacity .5s .5s, transform .5s .5s cubic-bezier(.3, 1.4, .5, 1); }
.obj[data-id="acolhimento"].chamar .fala-medica, .obj[data-id="acolhimento"].agir .fala-medica, .m-desafio .obj[data-id="acolhimento"] .fala-medica { opacity: 1; transform: none; }

/* Apresentação da médica: sala desfocada e escurecida até ela sair */
.palacio .ambiente, .palacio .bussola, .palacio .bau, .palacio .porta { transition: filter .7s ease; }
.palacio.foco-palco .ambiente, .palacio.foco-palco .bussola, .palacio.foco-palco .bau, .palacio.foco-palco .porta { filter: blur(5px) brightness(.5) saturate(.85); }
.obj[data-id="acolhimento"] .fala-medica { transform-origin: left bottom; }

/* Cebola que descasca */
.decor .corpo { transition: transform .5s cubic-bezier(.3, 1.4, .5, 1); transform-box: fill-box; transform-origin: center bottom; }
.casca { transform: translate(var(--x), var(--y)) rotate(var(--r)); animation: voar-casca .9s cubic-bezier(.2, .9, .3, 1.15) both; }
@keyframes voar-casca { from { transform: translate(var(--ox), var(--oy)) scale(.2) rotate(-60deg); opacity: 0; } 30% { opacity: 1; } }
.t-casca { font: 700 21px 'Cormorant Garamond', Georgia, serif; fill: #4a1d3a; }
.decor.nucleo .corpo { filter: drop-shadow(0 0 18px rgba(242, 201, 107, .95)); }
.decor { transition: opacity .6s; }
.decor.travado { opacity: 0; pointer-events: none; }
.decor.surgir .corpo { animation: surgir 1.1s cubic-bezier(.3, 1.4, .5, 1); }

/* Cegonha: pose pousada por padrão; em voo alterna asas em cima / embaixo */
.a-cegonha image { display: none; }
.obj:not(.voando) .a-cegonha .ceg-pousada, .p-bandeja .a-cegonha .ceg-pousada { display: inline; }
.obj.voando:not(.asa-baixo) .a-cegonha .ceg-cima, .obj.voando.asa-baixo .a-cegonha .ceg-baixo { display: inline; }
.obj.pousou .corpo { animation: pouso .6s ease-out; transform-origin: center bottom; }
@keyframes pouso { 35% { transform: scale(1.04, .9); } 70% { transform: scale(.98, 1.03); } }

/* Mala das queixas */
.a-mala .mala-a, .decor.aberta .a-mala .mala-f { display: none; }
.decor.aberta .a-mala .mala-a { display: inline; }
.decor.aberta .corpo { animation: abrir-mala .5s cubic-bezier(.3, 1.6, .5, 1); transform-origin: center bottom; }
@keyframes abrir-mala { 40% { transform: scale(1.06, .94); } }
.camisa { animation: voar-camisa .85s cubic-bezier(.3, .7, .4, 1) both; }
@keyframes voar-camisa { 0% { transform: translate(var(--ox), var(--oy)) scale(.35) rotate(-35deg); opacity: 0; } 15% { opacity: 1; } 55% { transform: translate(var(--mx), var(--my)) scale(.85) rotate(12deg); } 100% { transform: none; } }
.t-etiqueta-mala { font: 700 18.5px 'Cormorant Garamond', Georgia, serif; fill: #3a2614; }

/* ---------- ALICIA v2 ---------- */
.etapas-apagar .obj.travado { opacity: .3; filter: grayscale(.7) brightness(.7); }
.letra-luz { fill: none; stroke: #f6d98c; stroke-width: 4; opacity: 0; transition: opacity .6s; filter: drop-shadow(0 0 10px rgba(246, 217, 140, .95)); }
.letra-luz.acesa { opacity: .95; }
.letra-luz.vez { opacity: 1; animation: letra-vez 1.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes letra-vez { 50% { transform: scale(1.18); stroke-width: 6; } }
.alicia-guia { pointer-events: none; transition: transform 1.6s ease-in-out, opacity .5s; }
.alicia-guia.fora { opacity: 0; }
.ali-vira { transform-box: fill-box; transform-origin: center; transition: transform .25s; }
.alicia-guia .ali-aponta { display: none; } .alicia-guia.parada .ali-anda { display: none; } .alicia-guia.parada .ali-aponta { display: inline; }
.alicia-guia:not(.parada) .ali-anda { animation: passo .45s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: center bottom; }
@keyframes passo { from { transform: translateY(0) rotate(-1.5deg); } to { transform: translateY(-6px) rotate(1.5deg); } }
.a-cuco .cuco-a, .agir .a-cuco .cuco-f { display: none; } .agir .a-cuco .cuco-a { display: inline; }
.fantasma-cuco { transform-box: fill-box; transform-origin: center bottom; transform: scale(0); }
.agir .fantasma-cuco { animation: cuco 2.4s cubic-bezier(.3, 1.5, .5, 1); }
@keyframes cuco { 0% { transform: scale(0); } 18% { transform: scale(1.2) translateY(-10px); } 30% { transform: scale(1); } 45% { transform: rotate(-8deg); } 60% { transform: rotate(8deg); } 80% { transform: scale(1); } 100% { transform: scale(0); } }
.pino-mapa { transform-box: fill-box; transform-origin: center bottom; }
.agir .pino-mapa { animation: cravar .9s cubic-bezier(.4, 1.6, .5, 1); }
@keyframes cravar { 0% { transform: translateY(-110px) rotate(-25deg); opacity: 0; } 30% { opacity: 1; } 70% { transform: translateY(5px) scaleY(.9); } 100% { transform: none; } }
.martelo-t { transform-box: fill-box; transform-origin: right bottom; }
.agir .martelo-t { animation: martelada .5s ease-in 2; }
@keyframes martelada { 50% { transform: rotate(-35deg); } }
.masc-camarim { transform-box: fill-box; transform-origin: center; }
.agir .masc-camarim { animation: trocar-masc 1.4s ease-in-out; }
@keyframes trocar-masc { 25% { transform: scaleX(-1) rotate(-6deg); } 50% { transform: scale(1.15); } 75% { transform: scaleX(-1) rotate(6deg); } }
.agir .luzes-camarim { animation: luzes .25s steps(2) 5; }
@keyframes luzes { 50% { filter: brightness(1.35); } }
.onda-ant { opacity: 0; transform-box: fill-box; transform-origin: center; animation: onda-ant 2.4s ease-out infinite; animation-delay: var(--d); }
.agir .onda-ant { animation-duration: 1.1s; }
@keyframes onda-ant { 0% { transform: scale(.4); opacity: .95; } 100% { transform: scale(5); opacity: 0; } }
.tabua-r { transform-box: fill-box; transform-origin: 50.3% 74.6%; animation: gangorra 3.6s ease-in-out infinite alternate; }
@keyframes gangorra { from { transform: rotate(-7deg); } to { transform: rotate(7deg); } }
.agir .tabua-r { animation: gangorra .45s ease-in-out 4 alternate; }
.ponteiro-radio { transform-box: fill-box; transform-origin: center bottom; transform: rotate(-50deg); }
.agir .ponteiro-radio { animation: sintonia 1.6s ease-in-out; }
@keyframes sintonia { 30% { transform: rotate(55deg); } 55% { transform: rotate(-25deg); } 80% { transform: rotate(35deg); } 100% { transform: rotate(-50deg); } }
.ampu-g { transform-box: fill-box; transform-origin: center; }
.agir .ampu-g { animation: virar-ampu 1.6s ease-in-out; }
@keyframes virar-ampu { 40%, 60% { transform: rotate(180deg); } }
.p-sem-anim .onda-ant, .p-sem-anim .tabua-r { animation: none; }

/* Cartão da letra (ALICIA) */
.p-letra { font: 700 34px/1 "Cormorant Garamond", Georgia, serif; color: #8a6420; margin: 0 0 4px; letter-spacing: .06em; }
.p-fala { font: italic 600 18px/1.35 'Cormorant Garamond', Georgia, serif; background: rgba(242, 201, 107, .12); border-left: 3px solid #f2c96b; padding: 6px 10px; border-radius: 4px; }
/* Raios da irradiação */
.raio { fill: none; stroke: #ffd84a; stroke-width: 3.2; stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; filter: drop-shadow(0 0 4px #ffe680); animation: raio 1.8s ease-out infinite; animation-delay: var(--d); }
@keyframes raio { 0% { stroke-dashoffset: 1; opacity: 1; } 35% { stroke-dashoffset: 0; opacity: 1; } 45% { opacity: .2; } 55% { opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 0; } }
.agir .raio { animation-duration: .7s; stroke-width: 4.5; }
.nucleo-raio { animation: nucleo 1s ease-in-out infinite; transform-box: fill-box; transform-origin: center; filter: drop-shadow(0 0 8px #ff6a3a); }
@keyframes nucleo { 50% { transform: scale(1.5); } }
/* Martelo bate na base e o peso sobe */
.martelo-t { transform-origin: 100% 0%; }
.agir .martelo-t { animation: martelada .7s ease-in-out; }
@keyframes martelada { 0% { transform: none; } 45% { transform: rotate(32deg); } 65% { transform: rotate(-8deg); } 100% { transform: none; } }
.sino-torre { transition: opacity .2s; } .sino-torre.tocando { opacity: .9; animation: nucleo .25s 3; }

/* Abertura da ALICIA: poção e encolhimento */
.alicia-intro { transition: transform 1.2s cubic-bezier(.5, 0, .3, 1); cursor: pointer; }
.ai-escala { transition: transform 1.2s cubic-bezier(.5, 0, .3, 1); transform-origin: 0 0; }
.alicia-intro .ai-bebe, .alicia-intro.bebendo .ai-pocao { display: none; } .alicia-intro.bebendo .ai-bebe { display: inline; }
.alicia-intro.encolhe .ai-escala image { animation: brilho-pocao 1.2s ease-in-out; }
@keyframes brilho-pocao { 40% { filter: brightness(1.8) drop-shadow(0 0 30px #c9a3ee); } }
.faisca { opacity: 0; transform-box: fill-box; transform-origin: center; }
.alicia-intro.bebendo .faisca { animation: faisca 1.3s ease-out infinite; animation-delay: var(--d); }
@keyframes faisca { 0% { opacity: 1; transform: rotate(var(--a)) translateX(30px) scale(.5); } 100% { opacity: 0; transform: rotate(var(--a)) translateX(190px) scale(1.4); } }
.alicia-guia.escondida { opacity: 0; transition: none; }
.intro-alicia .obj, .intro-alicia .letra-luz { opacity: .15 !important; pointer-events: none; transition: opacity .8s; }

/* ---------- Parque dos Sintomas ---------- */
.pq-dentro .parque-fora, .pq-fora .voltar-parque { display: none; }
.pq-dentro .bussola, .pq-dentro .bau, .pq-dentro .especial, .pq-dentro .decor, .pq-dentro .obj.guia { display: none; }
.obj.fora-vista { display: none; }
.voltar-parque { fill: transparent; cursor: pointer; } .voltar-parque:hover, .voltar-parque:focus-visible { fill: rgba(242, 201, 107, .18); outline: none; }
.brinquedo { cursor: pointer; }
.brilho-brinquedo { fill: none; stroke: #f6d98c; stroke-width: 5; opacity: 0; transition: opacity .4s; filter: drop-shadow(0 0 14px rgba(246, 217, 140, .9)); }
.brinquedo:hover .brilho-brinquedo, .brinquedo:focus-visible .brilho-brinquedo { opacity: .7; }
.brinquedo.feito .brilho-brinquedo { opacity: .55; stroke: #9be59f; filter: drop-shadow(0 0 10px rgba(155, 229, 159, .8)); }
.brinquedo.vez .brilho-brinquedo { animation: vez-brinquedo 1.4s ease-in-out infinite; }
@keyframes vez-brinquedo { 50% { opacity: 1; stroke-width: 8; } }
.trenzinho { transition: transform 2.2s ease-in-out; pointer-events: none; }
.trem-vira { transform-box: fill-box; transform-origin: center; }
.sapo-catraca { pointer-events: none; } .sapo-catraca image { animation: sapo-pula 2.6s ease-in-out infinite; transform-box: fill-box; transform-origin: center bottom; }
@keyframes sapo-pula { 0%, 70%, 100% { transform: none; } 80% { transform: translateY(-14px) scale(1.04, .96); } 90% { transform: none; } }
.porta-pintada { cursor: pointer; } .porta-pintada:hover, .porta-pintada:focus-visible { fill: rgba(242, 201, 107, .15); outline: none; }
.pq-galeria .brinquedo { pointer-events: none; }
/* animações próprias de algumas cenas */
.agir .a-pq-nauseas .foto { animation: viking 1.6s ease-in-out; transform-origin: 50% 0%; }
@keyframes viking { 25% { transform: rotate(14deg); } 75% { transform: rotate(-14deg); } }
.agir .a-pq-sincope .foto { animation: gira-xicara 1.4s ease-in-out; transform-origin: 50% 70%; }
@keyframes gira-xicara { 50% { transform: rotate(18deg) scale(1.04); } }
.agir .a-pq-palpitacoes .foto, .agir .a-pq-cefaleia .foto, .agir .a-pq-sensibilidade .foto { animation: tremer .12s linear 10; }
@keyframes tremer { 25% { transform: translate(-3px, 1px); } 75% { transform: translate(3px, -1px); } }

.trenzinho { transition: none; }
/* Viking: o barco fica pendurado no pórtico, lá atrás, balançando */
.pq-dentro :is(.a-pq-nauseas, .a-pq-nauseas-crianca, .a-pq-gin-sua, .a-pq-obst-nauseas) :is(.foto, .foto-acao) { animation: viking-idle 3.2s ease-in-out infinite; transform-origin: 50% -60%; }
@keyframes viking-idle { 0%, 100% { transform: rotate(-9deg); } 50% { transform: rotate(9deg); } }
.agir :is(.a-pq-nauseas, .a-pq-nauseas-crianca, .a-pq-gin-sua, .a-pq-obst-nauseas) :is(.foto, .foto-acao) { animation: viking-forte .8s ease-in-out 3; transform-origin: 50% -60%; }
@keyframes viking-forte { 0%, 100% { transform: rotate(-18deg); } 50% { transform: rotate(18deg); } }

/* ---------- Parque: efeitos ao tocar ---------- */
.fx > *, .fx { pointer-events: none; }
.fx { opacity: 0; } .agir .fx { opacity: 1; }
.fx-chama { transform-box: fill-box; } .agir .fx-chama { animation: chama 1.3s ease-out; transform-origin: left center; }
@keyframes chama { 0% { transform: scale(0, .4); } 20% { transform: scale(1.6, 1.3); } 40% { transform: scale(1.3, 1); } 60% { transform: scale(1.7, 1.2); } 100% { transform: scale(0, .3); opacity: 0; } }
.fx-zzz .z { font: 700 italic 12px 'Cormorant Garamond', Georgia, serif; fill: #e6f0ff; stroke: #1b2b4a; stroke-width: .6; opacity: 0; }
.agir .fx-zzz .z { animation: zzz 1.6s ease-out both; animation-delay: var(--d); }
@keyframes zzz { 0% { opacity: 0; transform: translate(0, 6px); } 30% { opacity: 1; } 100% { opacity: 0; transform: translate(14px, -24px); } }
.agir .gota { animation: gota .9s ease-out 2 both; animation-delay: var(--d); }
@keyframes gota { 0% { transform: rotate(var(--a)) translateY(0); opacity: 1; } 100% { transform: rotate(var(--a)) translateY(-26px); opacity: 0; } }
.agir .estrela { animation: estrela 1.3s ease-out both; animation-delay: var(--d); transform-box: fill-box; transform-origin: center; }
@keyframes estrela { 0% { transform: rotate(var(--a)) translateX(0) scale(.3); opacity: 1; } 100% { transform: rotate(calc(var(--a) + 160deg)) translateX(24px) scale(1.2); opacity: 0; } }
.agir .fx-aneis circle { animation: anel-fx 1s ease-out 2 both; animation-delay: var(--d); }
@keyframes anel-fx { 0% { transform: scale(.4); opacity: 1; } 100% { transform: scale(3.4); opacity: 0; } }
.agir .fx-fumaca circle { animation: fumaca-fx 1.4s ease-out both; animation-delay: var(--d); }
@keyframes fumaca-fx { 0% { transform: translate(0, 0) scale(.4); opacity: .95; } 100% { transform: translate(46px, -10px) scale(1.6); opacity: 0; } }
.agir .fx-faiscas polyline { animation: faisca-fx .18s steps(2) 8 both; animation-delay: var(--d); }
@keyframes faisca-fx { 50% { opacity: 0; } }
.fx-pow { transform-box: fill-box; transform-origin: center; } .agir .fx-pow { animation: pow .6s cubic-bezier(.3, 1.8, .5, 1) 2 both; }
@keyframes pow { 0% { transform: scale(0) rotate(-20deg); } 60% { transform: scale(1.3); } 100% { transform: scale(1); opacity: 0; } }
.agir .fx-brilho { animation: brilho-fx 1.4s ease-in-out both; mix-blend-mode: screen; }
@keyframes brilho-fx { 0%, 100% { opacity: 0; } 30%, 70% { opacity: .55; } }
.agir .fx-floco circle { animation: floco 1.5s linear both; animation-delay: var(--d); }
@keyframes floco { 0% { transform: translateY(0); opacity: 0; } 20% { opacity: 1; } 100% { transform: translateY(60px); opacity: 0; } }
.agir .fx-coceira circle { animation: coceira .3s ease-in-out 5 both; animation-delay: var(--d); }
@keyframes coceira { 50% { transform: scale(1.8); fill: #ff7a6a; } }
/* movimento do paciente em cada cena */
.agir .a-pq-febre .foto { animation: recuo .5s ease-out 2; }
@keyframes recuo { 30% { transform: translateX(-4px) rotate(-2deg); } }
.agir .a-pq-peso .foto { animation: calca 1.5s ease-in-out; transform-origin: 50% 100%; }
@keyframes calca { 15% { transform: scaleY(.93); } 30% { transform: scaleY(1.03) translateY(-4px); } 45% { transform: scaleY(.95) rotate(-2deg); } 60% { transform: scaleY(1.02) rotate(2deg); } 75% { transform: translateY(-3px); } }
.agir .a-pq-fadiga .foto { animation: cochilo 1.6s ease-in-out; transform-origin: 50% 100%; }
@keyframes cochilo { 30% { transform: rotate(3deg); } 55% { transform: rotate(1deg) translateY(2px); } 80% { transform: rotate(4deg); } }
.agir .a-pq-diarreia .foto { animation: tobo 1.2s ease-in; }
@keyframes tobo { 30% { transform: translate(-6px, -4px); } 70% { transform: translate(10px, 3px) rotate(4deg); } }
.agir .a-pq-dorabd .foto, .agir .a-pq-dortorax .foto { animation: golpe .45s ease-out 3; transform-origin: 50% 100%; }
@keyframes golpe { 30% { transform: scale(1.03, .95) translateX(3px); } }
.agir .a-pq-dispneia .foto { animation: ofego .4s ease-in-out 4; transform-origin: 50% 100%; }
@keyframes ofego { 50% { transform: scaleY(1.035); } }
.agir .a-pq-tosse .foto { animation: tossir .35s ease-out 4; }
@keyframes tossir { 40% { transform: translateX(-3px) rotate(-2deg); } }
.agir .a-pq-disuria .foto, .agir .a-pq-polaciuria .foto { animation: pulinho .4s ease-in-out 4; transform-origin: 50% 100%; }
@keyframes pulinho { 50% { transform: translateY(-5px) scaleY(1.02); } }
.agir .a-pq-corurina .foto { animation: inclina 1.4s ease-in-out; transform-origin: 50% 100%; }
@keyframes inclina { 40%, 60% { transform: scale(1.04); } }
.agir .a-pq-cianose .foto, .agir .a-pq-exantema .foto { animation: tremer .12s linear 12; }
.agir .a-pq-edema .foto { animation: inchar-pe 1.4s ease-in-out; transform-origin: 50% 100%; }
@keyframes inchar-pe { 40%, 70% { transform: scale(1.06, .98); } }

/* Parque: a pintura de ação substitui a cena enquanto ela age */
.foto-acao { opacity: 0; transition: opacity .18s; }
.agir .foto-acao { opacity: 1; }
.agir .arte:has(.foto-acao) .foto { opacity: 0; }
.agir .foto-acao { animation: acao-pop .35s ease-out; transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes acao-pop { 0% { transform: scale(.96); } 60% { transform: scale(1.03); } }

/* Dica de Ouro do parque: bilhete dourado */
.bilhete { position: relative; margin: 6px 0 10px; padding: 14px 14px 10px; border-radius: 10px; color: #3a2614; text-align: center;
  background: radial-gradient(circle at 30% 20%, #fff3c4, #f2cf6b 55%, #c99a35); box-shadow: inset 0 0 0 2px #fff6d6, inset 0 0 0 5px #b8862b, 0 10px 22px rgba(0, 0, 0, .35);
  animation: imprime .7s cubic-bezier(.2, .8, .3, 1) both; overflow: hidden; }
.bilhete::before, .bilhete::after { content: ''; position: absolute; top: 50%; width: 18px; height: 18px; margin-top: -9px; border-radius: 50%; background: rgba(247, 242, 231, .97); }
.bilhete::before { left: -9px; } .bilhete::after { right: -9px; }
@keyframes imprime { from { transform: translateY(-30px) scaleY(.2); opacity: 0; } }
.bl-topo { margin: 0 0 4px; font: 600 13px/1.3 'Source Sans 3', sans-serif; }
.bl-palavra { margin: 2px 0 10px; font: 700 40px/1 'Cormorant Garamond', Georgia, serif; letter-spacing: .08em; }
.bl-palavra span { display: inline-block; opacity: 0; animation: letra-bl .5s cubic-bezier(.3, 1.6, .5, 1) both; animation-delay: var(--d); }
.bl-cons { color: #7a1f14; text-shadow: 0 0 10px rgba(255, 240, 180, .9); } .bl-vog { color: rgba(58, 38, 20, .4); font-size: 30px; }
@keyframes letra-bl { from { opacity: 0; transform: translateY(-14px) scale(1.6); } to { opacity: 1; transform: none; } }
.bl-canhotos { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; border-top: 2px dashed rgba(122, 31, 20, .45); padding-top: 9px; }
.bl-canhoto { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 2px; border: 0; border-radius: 6px; background: rgba(255, 250, 230, .65); cursor: pointer; font: inherit; color: inherit;
  opacity: 0; animation: letra-bl .45s ease-out both; animation-delay: var(--d); transition: transform .2s, background .2s; }
.bl-canhoto:hover, .bl-canhoto:focus-visible { transform: translateY(-3px); background: #fffaf0; outline: 2px solid #7a1f14; }
.bl-canhoto img { width: 46px; height: 46px; object-fit: contain; }
.bl-canhoto b { font: 700 18px/1 'Cormorant Garamond', Georgia, serif; color: #7a1f14; }
.bl-canhoto span { font-size: 10.5px; line-height: 1.1; }
.bl-rodape { margin: 8px 0 0; font-size: 11.5px; opacity: .8; }
.p-sem-anim .bilhete, .p-sem-anim .bl-palavra span, .p-sem-anim .bl-canhoto { animation: none; opacity: 1; }

/* Placas de entrada e de próxima etapa do parque: brilham para mostrar que dá para clicar */
.porta-pintada { stroke: #f6d98c; stroke-width: 4; stroke-opacity: 0; transition: stroke-opacity .3s, fill .3s; }
.pq-fora .porta-pintada[data-guia="porta-prox"], .palacio:not(.pq-dentro):not(.pq-fora) .porta-pintada[data-guia="porta-prox"] { animation: chama-placa 2.2s ease-in-out infinite; }
@keyframes chama-placa { 50% { stroke-opacity: .9; filter: drop-shadow(0 0 10px rgba(246, 217, 140, .9)); } }
.porta-pintada:hover, .porta-pintada:focus-visible { stroke-opacity: 1; }

/* ---------- Exame Físico em atos ---------- */
.obj.fora-ato, .decor.fora-ato { opacity: 0 !important; pointer-events: none; }
.med-b { opacity: 0; } .paramentado .med-a { opacity: 0; } .paramentado .med-b { opacity: 1; }
.med-a, .med-b { transition: opacity .6s; }
.troca-ato .ambiente { animation: troca-ato .9s ease-in-out; }
@keyframes troca-ato { 40% { filter: brightness(.35); } }
.lanterna { pointer-events: none; opacity: 0; transition: opacity .9s; } .com-lanterna .lanterna { opacity: 1; }
.lanterna rect[mask] { pointer-events: none; }
.com-lanterna .p-svg { cursor: none; }
.lant-furo { transition: none; }

.p-link-sim { display: inline-block; margin-top: 2px; padding: 6px 12px; border-radius: 8px; background: #0e2a47; color: #f6dc95; font-weight: 700; text-decoration: none; border: 1px solid #c9a45c; }
.p-link-sim:hover, .p-link-sim:focus-visible { background: #16395f; outline: 2px solid #f6dc95; }

/* A Alicia no Exame Físico: só a pose da vez aparece */
.ali-ef { opacity: 0; transition: opacity .25s; }
.palacio[data-ali="pergunta"] .ali-pergunta, .palacio[data-ali="lavando"] .ali-lavando, .palacio[data-ali="luvas"] .ali-luvas, .palacio[data-ali="mascara"] .ali-mascara,
.palacio[data-ali="pa"] .ali-pa, .palacio[data-ali="fc"] .ali-fc, .palacio[data-ali="fr"] .ali-fr, .palacio[data-ali="temp"] .ali-temp, .palacio[data-ali="sat"] .ali-sat { opacity: 1; }
.obj[data-id="lavar"] .corpo { transition: transform .7s cubic-bezier(.3, 1.3, .5, 1); }
.obj.pia-vem .corpo { transform: translateX(-70px) scale(.92); }
.decor.agir .corpo { animation: pulinho .4s ease-in-out 2; transform-origin: center bottom; }

/* Exame Físico: vista de cima do paciente na maca */
.sair-decubito, .lant-dentro { display: none; } .sair-decubito { cursor: pointer; }
.decubito .sair-decubito, .decubito .lant-dentro { display: inline; }
.palacio:not(.decubito):not(.area-trauma) .obj:is([data-id="neuro"], [data-id="resp"], [data-id="cv"], [data-id="abdome"], [data-id="extremidades"], [data-id="toqueretal"], [data-id="orl"], [data-id="antropometria"], [data-id="mamas"], [data-id="vulva"], [data-id="toque"], [data-id="obstetrico"], [data-id="direcionado"], [data-id="ectoscopia"]) { display: none; }
.decubito .obj:not(:is([data-id="neuro"], [data-id="resp"], [data-id="cv"], [data-id="abdome"], [data-id="extremidades"], [data-id="toqueretal"], [data-id="orl"], [data-id="antropometria"], [data-id="mamas"], [data-id="vulva"], [data-id="toque"], [data-id="obstetrico"], [data-id="direcionado"], [data-id="ectoscopia"])), .decubito .decor, .decubito .bau, .decubito .bussola, .decubito .porta-pintada { display: none; }
.decor .a-efMaca { cursor: pointer; }
/* Exame Físico, ato 2: a Alicia já fez a parte dela; o toque passa para a pia, o cabide e o carrinho atrás dela */
.palacio[data-ato="2"] .obj[data-id="permissao"] { pointer-events: none; }

/* Bistrô MAPA: o cardápio do dia em giz e o chef bravo */
.quadro-dia { pointer-events: none; fill: #F4F0E4; } .palacio .quadro-dia text { font-family: 'Caveat', 'Segoe Print', cursive; }
.giz-tit { font-size: 32px; font-weight: 700; fill: #F2D27A; letter-spacing: .5px; }
.giz-risco { fill: none; stroke: #F2D27A; stroke-width: 2.6; stroke-linecap: round; opacity: .85; }
.giz { font-size: 23px; font-weight: 500; opacity: 0; transform: translateX(-14px); transition: opacity .55s, transform .55s, fill .25s; }
.giz-rod { font-size: 18px; font-weight: 700; fill: #F2D27A; }
.quadro-dia.escrito .giz { opacity: .96; transform: none; }
/* BHCG (Cirurgia): entra na lousa, em destaque, quando o teste cai na Alicia */
.quadro-dia .giz.giz-bhcg { font-size: 27px; font-weight: 700; fill: #FF7FB6; opacity: 0; transform: scale(1.6); transform-box: fill-box; transform-origin: left center; filter: drop-shadow(0 0 6px #FF4F9A); transition: opacity .4s, transform .5s cubic-bezier(.3,1.6,.5,1); }
.quadro-dia.bhcg-on .giz.giz-bhcg { opacity: 1; transform: none; }
.foto-bravo { opacity: 0; transition: opacity .15s; } .obj.bravo .foto-bravo { opacity: 1; } .obj.bravo .arte .foto { opacity: 0; }
/* A conta, por favor!: o letreiro do caixa com as três partes do diagnóstico */
.letreiro { pointer-events: none; }
.let-l { opacity: 0; transform: translateY(-6px); transition: opacity .45s, transform .45s; } .let-l.on { opacity: 1; transform: none; }
.palacio .letreiro text { font-family: var(--titulo, 'Cormorant Garamond', serif); }
.let-rot { font-size: 12px; font-weight: 800; letter-spacing: 2px; fill: #6B4A00; } .let-val { font-size: 21px; font-weight: 700; fill: #111; }
.let-rot, .let-val { paint-order: stroke; stroke: rgba(255, 250, 240, .75); stroke-width: 3px; stroke-linejoin: round; } /* quadro claro da parede: rótulo dourado-escuro e texto preto */
.tk-buraco { fill: #1a0f05; opacity: 0; transition: opacity .15s; } .tecla.baixa .tk-buraco { opacity: .9; }
.tk-cap { transition: transform .18s cubic-bezier(.3, 1.6, .5, 1), filter .18s; } .tecla.baixa .tk-cap { transform: translateY(1.6px); filter: brightness(.88); }
.obj.feito .foto-acao { opacity: 1; } .obj.feito .arte:has(.foto-acao) .foto { opacity: 0; }
.arv-it { opacity: 0; transition: opacity .7s; } .arv-it.on { opacity: 1; }
.ac-it { opacity: 0; transition: opacity .7s; } .ac-it.on { opacity: 1; }
/* peças soltas (penteadeira da Ginecologia): aparecem e animam por cima do cenário */
.peca { opacity: 0; pointer-events: none; transition: opacity .4s; } .peca.on { opacity: 1; } .peca.on[data-guia] { pointer-events: auto; cursor: pointer; }
.peca image { transform-box: fill-box; transform-origin: center; }
.peca.on.pinga image { animation: pc-pinga 1.3s cubic-bezier(.5, 0, .7, 1) both; } /* a gota cai do alto e respinga no seu círculo do calendário */
@keyframes pc-pinga { 0% { transform: translateY(-120px) scale(.4, .7); opacity: 0; } 15% { opacity: 1; } 60% { transform: translateY(0) scale(.8, 1.2); } 75% { transform: scale(1.7, .7); } 88% { transform: scale(.85, 1.15); } 100% { transform: none; } }
.peca.on.botao image { animation: pc-botao 1.6s ease both; } @keyframes pc-botao { 0% { transform: scale(.2); opacity: 0; } 25%, 55% { transform: scale(1.6); opacity: 1; } 100% { transform: scale(1.6); opacity: 0; } }
.peca.on.abre image { animation: pc-abre 1.6s ease both; } @keyframes pc-abre { 0%, 50% { transform: scale(.6) rotate(-40deg); opacity: 0; } 75% { transform: scale(2.2) rotate(8deg); opacity: 1; } 100% { transform: none; } }
.peca.on.salta image { animation: pc-salta 1.9s cubic-bezier(.3, 1.3, .5, 1) both; } /* o coração quica no seu círculo do calendário */
@keyframes pc-salta { 0% { transform: scale(.3); } 25% { transform: translateY(-38px) scale(1.9); } 45% { transform: translateY(0) scale(1.5, .8); } 62% { transform: translateY(-20px) scale(1.4); } 80% { transform: translateY(0) scale(1.1, .9); } 100% { transform: none; } }
.peca.on.gira image { animation: pc-gira 2.4s linear infinite; }
.peca.on.trava image { animation: pc-trava 3.2s infinite; } /* ciclo irregular: o ponteiro anda aos trancos, para, volta e dispara */
@keyframes pc-trava { 0% { transform: rotate(0); animation-timing-function: ease-in; } 18% { transform: rotate(150deg); animation-timing-function: steps(1); } 30% { transform: rotate(150deg); animation-timing-function: ease-out; } 42% { transform: rotate(95deg); } 55% { transform: rotate(260deg); animation-timing-function: steps(1); } 75% { transform: rotate(260deg); animation-timing-function: ease-in; } 100% { transform: rotate(360deg); } }
.peca.on.letra image { animation: pc-letra 1.4s cubic-bezier(.3, 1.3, .5, 1) both; } /* a letra nasce grande no meio da tela e voa para o seu lugar no relógio */
@keyframes pc-letra { 0% { transform: translate(var(--dx), var(--dy)) scale(.3); opacity: 0; } 30% { transform: translate(var(--dx), var(--dy)) scale(4.5); opacity: 1; } 55% { transform: translate(var(--dx), var(--dy)) scale(4); } 100% { transform: none; } }
.peca.on[data-guia]:not(.vista) image { filter: brightness(.42) saturate(.55); transition: filter .5s; } /* itens das gavetas: apagados até serem tocados */
.peca.on[data-guia].vista image { filter: none; transition: filter .5s; }
@keyframes pc-gira { to { transform: rotate(360deg); } }
.peca.on.surge image { animation: pc-surge .9s cubic-bezier(.3, 1.6, .5, 1) both; } @keyframes pc-surge { 0% { transform: scale(0) rotate(-25deg); } 100% { transform: none; } }
.peca.on.sobe image { animation: pc-sobe 1s cubic-bezier(.3, 1.5, .5, 1) both; } @keyframes pc-sobe { 0% { transform: translateY(110px) scale(.4); opacity: 0; } 100% { transform: none; opacity: 1; } }
.peca.pula image { animation: pc-pula .9s cubic-bezier(.3, 1.6, .5, 1) both; } @keyframes pc-pula { 0% { transform: none; } 40% { transform: translateY(-35px) scale(1.3); } 100% { transform: none; } }
/* Árvore da Conduta: a troca de roupa da Alicia e a vespa dos efeitos adversos */
.obj[data-id="naofarm"], .obj[data-id="farm"] { transition: opacity .8s; }
.palacio.arv-verde .obj:is([data-id="farm"], [data-id="internacao"]), .palacio.arv-jaleco .obj[data-id="naofarm"] { opacity: 0; pointer-events: none; }
.vespa-voa { display: none; cursor: pointer; } .vespa-voa.voando { display: inline; }
.vespa-voa.voando .vespa-voo { animation: voo-vespa 3.4s ease-in-out infinite; } .vespa-voa.alerta .vespa-voo { animation: none; }
@keyframes voo-vespa { 0%, 100% { transform: translate(0, 0) rotate(0); } 25% { transform: translate(-35px, -30px) rotate(-6deg); } 50% { transform: translate(-60px, 10px) rotate(4deg); } 75% { transform: translate(-20px, 30px) rotate(-3deg); } } /* voo curto, sem passar por cima da Alicia */
.v-alerta { opacity: 0; } .vespa-voa.alerta .v-alerta { opacity: 1; } .vespa-voa.alerta .v-parada { opacity: 0; }
/* Roda da Revisão */
.roda-layer { display: none; } .pq-roda .roda-layer { display: inline; }
.roda-pe2 { stroke: #C8A24C; stroke-width: 12; stroke-linecap: round; } .roda-pe { stroke: #4a3212; stroke-width: 18; stroke-linecap: round; }
.cabine { cursor: pointer; } .cabine image { transition: filter .3s; } .cabine:hover image, .cabine.na-vez image { filter: drop-shadow(0 0 10px #ffd86b) brightness(1.08); }
.p-lista { margin: 4px 0 10px; padding-left: 20px; columns: 2; column-gap: 18px; } .p-lista li { margin: 2px 0; break-inside: avoid; }
.roda-entrada { cursor: pointer; }
.roda-entrada .brilho-brinquedo { opacity: .6; fill: rgba(246, 217, 140, .16); animation: roda-chama 1.8s ease-in-out infinite; }
@keyframes roda-chama { 50% { opacity: 1; stroke-width: 9; fill: rgba(246, 217, 140, .3); } }
.seta-chama { pointer-events: none; } .seta-chama path { fill: #F2D27A; stroke: #6b4a12; stroke-width: 3; filter: drop-shadow(0 0 8px rgba(246, 217, 140, .9)); }
.seta-pula { animation: seta-pula 1.1s ease-in-out infinite; } @keyframes seta-pula { 50% { transform: translateY(-12px); } }
.pq-dentro .seta-chama { display: none; }
.seta-chama.seta-vermelha path { fill: #E5322B; stroke: #7a0f0b; filter: drop-shadow(0 0 10px rgba(255, 70, 50, .95)); } /* Pediatria: no parque amarelo, a seta dourada sumia */
/* Farol da Aprovação: o tremor da badalada e do carimbo; o farol aceso */
.palacio.tremor .p-svg { animation: tremor .55s cubic-bezier(.36, .07, .19, .97); }
@keyframes tremor { 10%, 90% { transform: translate(-2px, 1px); } 20%, 80% { transform: translate(4px, -2px); } 30%, 50%, 70% { transform: translate(-7px, 3px); } 40%, 60% { transform: translate(7px, -3px); } }
.palacio.farol-aceso .ambiente image { animation: farol-luz 1.6s ease-out; } @keyframes farol-luz { from { filter: brightness(1.8); } to { filter: none; } }
/* avisos: embaixo, no centro, até a pessoa clicar */
.p-aviso { top: auto; bottom: 22px; transform: translate(-50%, 10px); pointer-events: auto; cursor: pointer; z-index: 6; text-align: center; }
.p-aviso.vis { transform: translate(-50%, 0); }
.p-aviso > span { display: block; }
.p-aviso-fechar { display: block; margin: 8px auto 0; padding: 5px 18px; border-radius: 99px; border: 1px solid rgba(242, 201, 107, .7); background: rgba(242, 201, 107, .16); color: #f6e6b8; font: 600 13px 'Source Sans 3', sans-serif; cursor: pointer; }
.area-trauma .p-aviso-fechar { pointer-events: auto; }
.p-aviso:not(.vis) { pointer-events: none; }
@media (max-width: 760px) { .p-aviso { top: auto; bottom: 78px; } }
/* plaquinha "Próximo brinquedo", no mesmo estilo de madeira da "Voltar ao parque" pintada */
.prox-brinquedo { display: none; cursor: pointer; } .pq-dentro:not(.pq-roda) .prox-brinquedo:not(.sem) { display: inline; }
.prox-brinquedo image { filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .5)); transition: filter .2s; }
.palacio .prox-brinquedo text { font-family: 'Cormorant Garamond', Georgia, serif; font-style: italic; font-weight: 700; font-size: 33px; fill: #F6EBD0; paint-order: stroke; stroke: #2a1406; stroke-width: 3px; }
.prox-brinquedo:hover image, .prox-brinquedo:focus-visible image { filter: drop-shadow(0 0 10px rgba(246, 217, 140, .9)); }
/* o baú só aparece onde é usado: no Desafiar e no Reconstruir */
.palacio:not(.m-desafio):not(.m-recon) .bau { display: none; }
/* Toque retal: a luva só na vista de cima, depois das extremidades; a rosquinha pula na pelve ao toque */
.decor.luva-retal, .decor.rosquinha { display: none; } .decor.rosquinha { pointer-events: none; }
.decubito.toque-vez .decor.luva-retal { display: inline; } .decubito.rosq .decor.rosquinha { display: inline; }
.decor.luva-retal .foto-acao { opacity: 1; } .decor.luva-retal .arte .foto { opacity: 0; }
.decubito.rosq .decor.rosquinha .corpo { animation: rosq-pula .6s cubic-bezier(.3, 1.8, .5, 1); transform-box: fill-box; transform-origin: 50% 50%; }
@keyframes rosq-pula { from { transform: scale(0) rotate(-40deg); } to { transform: none; } }

/* Folha de internação (Cirurgia): preenchida sempre na mesma ordem: DIETA → HIDRATAÇÃO → MEDICAÇÕES → MONITORIZAÇÃO */
.folha { margin: 4px 0 8px; padding: 10px 12px 8px; border-radius: 6px; color: #23313a; background: #FBFAF4; border: 1px solid #c9d6c3; border-top: 10px solid #4E7D45; box-shadow: 0 6px 18px rgba(0,0,0,.18); }
.fl-topo { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin: 0 0 6px; font: 700 15px/1.2 Montserrat, sans-serif; letter-spacing: .08em; color: #2E4F2B; }
.fl-topo small { font-weight: 600; letter-spacing: 0; color: #6b7d6a; }
.fl-intern { margin: 0 0 8px; font-size: 14px; } .fl-intern b { color: #2E4F2B; }
.fl-linhas { list-style: none; margin: 0; padding: 0; counter-reset: fl; }
.fl-linha { counter-increment: fl; display: grid; grid-template-columns: 26px 1fr; gap: 6px; padding: 3px 0; border-bottom: 1px dashed #b8c7bd; }
.fl-linha::before { content: counter(fl) "."; font: 700 18px/1.4 Montserrat, sans-serif; color: #9aa8a0; }
.fl-linha.ok::before { color: #4E7D45; }
.fl-escrito { opacity: 0; transform: translateX(-10px); transition: opacity .45s, transform .45s; font-family: 'Caveat', 'Segoe Print', cursive; font-size: 17px; line-height: 1.15; color: #1d3c8f; }
.fl-escrito b { font-family: Montserrat, sans-serif; font-size: 13px; letter-spacing: .06em; color: #2E4F2B; display: block; }
.fl-linha.ok .fl-escrito { opacity: 1; transform: none; }
.fl-campo { display: inline-block; margin: 2px 4px 0 0; padding: 0 6px; border-bottom: 1.5px solid #1d3c8f; font-size: 16px; }
.fl-nota { display: block; font-style: normal; font-size: 16px; color: #8a2c2c; }
.fl-carimbos { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 4px 0 8px; }
.fl-carimbo { font: 700 13px/1 Montserrat, sans-serif; letter-spacing: .06em; padding: 8px 10px; border-radius: 8px; border: 2px solid #4E7D45; background: #fff; color: #2E4F2B; cursor: pointer; transform: rotate(-2deg); }
.fl-carimbo:nth-child(even) { transform: rotate(2deg); }
.fl-carimbo:disabled { opacity: .25; cursor: default; }
.fl-carimbo.errou { animation: fl-treme .35s; border-color: #C0392B; color: #C0392B; }
.fl-carimbo.dica { box-shadow: 0 0 0 4px rgba(212, 176, 103, .7); }
@keyframes fl-treme { 25% { transform: translateX(-6px) rotate(-3deg); } 75% { transform: translateX(6px) rotate(3deg); } }
@media (prefers-reduced-motion: reduce) { .fl-carimbo.errou { animation: none; } .fl-escrito { transition: none; } }
.fl-fim { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 8px; }
.fl-fim[hidden] { display: none; }
.fl-fim p { margin: 0; font-weight: 700; color: #4E7D45; }
.fl-selo { width: 104px; height: auto; opacity: 0; transform: scale(2.4) rotate(-30deg); pointer-events: none; filter: drop-shadow(0 2px 3px rgba(0,0,0,.3)); }
.folha.carimbada .fl-selo { opacity: 1; transform: rotate(-12deg); transition: opacity .12s, transform .32s cubic-bezier(.5, 1.8, .6, 1); }
/* A Porta do Centro Cirúrgico: as luzes do semáforo e o letreiro (desenhados por cima das lâmpadas pintadas) */
.sem-luz { opacity: 0; transition: opacity .25s; mix-blend-mode: screen; }
.sem-luz.sem-0 { fill: #ff3b30; filter: drop-shadow(0 0 18px #ff3b30); } .sem-luz.sem-1 { fill: #ffc53d; filter: drop-shadow(0 0 18px #ffc53d); } .sem-luz.sem-2 { fill: #3ddc84; filter: drop-shadow(0 0 18px #3ddc84); }
.sem-luz.on { opacity: .85; }
.letreiro-cc { fill: none; stroke: #ffd66b; stroke-width: 9; opacity: 0; filter: blur(5px) drop-shadow(0 0 14px #ffd66b); transition: opacity .8s; }
.palacio.cc-aceso .letreiro-cc { opacity: .95; }
/* passagem entre salas: a sala escurece ao atravessar a porta e a próxima aparece já enquadrada */
.palacio .p-svg { transition: opacity .4s ease-in; }
.palacio.saindo .p-svg { opacity: 0; }
.palacio.saindo .p-aviso, .palacio.saindo .p-cartao { visibility: hidden; }
.palacio.entrando .p-svg { animation: sala-entra .45s ease-out; }
@keyframes sala-entra { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .palacio .p-svg { transition: none; } .palacio.entrando .p-svg { animation: none; } }
/* luzes por toque (Creche: os 5 "-inhos" da triagem acendem um por toque) */
.luz-toque { fill: rgba(255, 236, 140, .35); stroke: #ffd447; stroke-width: 5; opacity: 0; transition: opacity .3s; filter: drop-shadow(0 0 12px #ffd447); }
.luz-toque.on { opacity: 1; }
.luz-toque.vez { opacity: 1; fill: rgba(255, 236, 140, .12); stroke-dasharray: 14 10; pointer-events: auto; cursor: pointer; animation: luz-vez 1.1s ease-in-out infinite; } /* o próximo instrumento: pisca e recebe o toque */
.luz-toque.so-reg.on:not(.vez) { fill: rgba(255, 236, 140, .1); } /* instrumento já visto: só o contorno brilha, sem esconder o rostinho */
.luz-toque.so-vez:not(.vez) { opacity: 0; }
.perto .obj { pointer-events: none; visibility: hidden; }
.perto:not(.decubito) :is(.quadro-dia, .bussola, .bau, .porta-pintada, .porta) { display: none; }
.palacio .obj[data-id="imagem"] { transition: opacity .9s; } .palacio.guths-pendente .obj[data-id="imagem"] { opacity: 0 !important; pointer-events: none; } /* o chef surge depois do bolo GUTHS */
.p-sair-perto { display: none; position: absolute; right: 16px; bottom: 16px; z-index: 5; font-size: 17px; padding: 12px 20px; } .perto:not(.decubito) .p-sair-perto { display: block; } /* a saída da cena do bolo GUTHS, sempre no canto da tela */ /* cena de perto fora da maca (o bolo GUTHS): só a cena e o ponto de toque */
.estrela-curva { display: none; } .estrela-sobe .estrela-curva { display: inline; }
.ec-estrela { fill: #ffd447; stroke: #fff6c8; stroke-width: 4; filter: drop-shadow(0 0 14px #ffd447); animation: ec-sobe 1.8s cubic-bezier(.3, .1, .3, 1) forwards; } /* a estrelinha sobe pela curva do quadro (antropometria) */
@keyframes ec-sobe { 0% { transform: translate(1068px, 550px) scale(.5); } 45% { transform: translate(1150px, 478px) scale(.8); } 80% { transform: translate(1240px, 392px) scale(1.4); } 100% { transform: translate(1255px, 380px) scale(1.15); } }
.decubito.lupa-usada .obj[data-id="ectoscopia"] { transform: translate(1495px, 905px) scale(1.1); } /* depois de usada, a lupa fica no canto do tapete */
.decubito:has(.obj.chamar[data-id="antropometria"]) .obj:not(.chamar) { pointer-events: none; } /* vez da antropometria: o toque em qualquer parte da criança a leva à balança */ /* cena de perto (ORL, antropometria): só o alvo que pisca recebe o toque */ /* cenas de perto: só o alvo da vez aparece */
@keyframes luz-vez { 50% { stroke-width: 9; fill: rgba(255, 236, 140, .3); } }
/* Creche: medalhões da linha do tempo (estação da vez acesa; as liberadas podem ser tocadas) e a turma do -inho */
.est-med circle { fill: transparent; stroke: transparent; stroke-width: 7; transition: stroke .3s, filter .3s; }
.est-med.livre { cursor: pointer; }
.est-med.on circle { stroke: #E5322B; filter: drop-shadow(0 0 14px rgba(255, 80, 60, .95)); animation: est-pulsa 1.4s ease-in-out infinite; }
@keyframes est-pulsa { 50% { stroke-width: 12; } }
.decor.inho { filter: grayscale(.85) brightness(.75); transition: filter .4s; }
.decor.inho.on { filter: none; }
.decor.inho.chamar { filter: grayscale(.3) brightness(.95) drop-shadow(0 0 16px #ffd447); animation: inho-chama 1.2s ease-in-out infinite; transform-box: fill-box; transform-origin: center bottom; }
@keyframes inho-chama { 50% { filter: grayscale(0) brightness(1.08) drop-shadow(0 0 26px #ffd447); } }
.decor.inho.pula .arte { animation: inho-pula .7s cubic-bezier(.3, 1.6, .5, 1); transform-box: fill-box; transform-origin: center bottom; }
@keyframes inho-pula { 40% { transform: translateY(-40px) scale(1.08); } }
@media (prefers-reduced-motion: reduce) { .est-med.on circle, .decor.inho.chamar, .decor.inho.pula .arte { animation: none; } }
/* Creche: o nascimento mostra uma cena por vez (data-cena no objeto) */
.a-creNasc .cn, .a-vacPed .cn, .a-vacObst .cn { display: none; }
.obj:not([data-cena]) .a-vacPed .cn-0, .obj[data-cena="0"] .a-vacPed .cn-0, .obj[data-cena="1"] .a-vacPed .cn-1, .obj:not([data-cena]) .a-vacObst .cn-0, .obj[data-cena="0"] .a-vacObst .cn-0, .obj[data-cena="1"] .a-vacObst .cn-1 { display: inline; }
.obj:not([data-cena]) .a-creNasc .cn-0, .obj[data-cena="0"] .a-creNasc .cn-0, .obj[data-cena="1"] .a-creNasc .cn-1, .obj[data-cena="2"] .a-creNasc .cn-2, .obj[data-cena="todos"] .a-creNasc .cn-todos { display: inline; }

/* Bistrô da Cirurgia: a Alicia da espada do BHCG (mesma pose e lugar da do cardápio) só entra depois do cardápio, e então a substitui */
.palacio:not(.bhcg-troca) .obj[data-id="bhcg"] { display: none; } .bhcg-troca .obj[data-id="laboratorio"] { opacity: 0; pointer-events: none; }
.bhcg-feita .obj[data-id="bhcg"] .foto-acao { opacity: 1; } .bhcg-feita .obj[data-id="bhcg"] .arte:has(.foto-acao) .foto { opacity: 0; } /* depois do toque, ela fica com a espada erguida */
.vez-mulher .obj:is([data-id="neuro"], [data-id="resp"], [data-id="cv"], [data-id="abdome"], [data-id="extremidades"], [data-id="ectoscopia"]) { pointer-events: none; } /* Gineco: mamas, especular e toque só pelos objetos */
.luz-toque[data-o="mamas"] { fill: rgba(255, 150, 190, .35); stroke: #ff7fb6; filter: drop-shadow(0 0 12px #ff7fb6); } /* as mamas acendem em rosa, diferente do respiratório e do cardiovascular */
.obj.pecas-on .foto-acao { opacity: 1; } .obj.pecas-on .arte:has(.foto-acao) .foto { opacity: 0; } /* carrinho das sorologias: as cúpulas ficam erguidas */
.peca.on.doce image { animation: pc-doce 1.3s cubic-bezier(.3, 1.4, .5, 1) both; } /* o cupcake salta grande e pousa no seu pratinho */
@keyframes pc-doce { 0% { transform: translateY(40px) scale(.3); opacity: 0; } 40% { transform: translateY(-150px) scale(2.6); opacity: 1; } 65% { transform: translateY(-150px) scale(2.3); } 100% { transform: none; } }

/* A Revelação: o visor da caixa registradora escreve a parte da tecla apertada (NOME, SOBRENOME, ETIOLOGIA) */
.visor text { font-family: 'Cormorant Garamond', serif; font-weight: 700; } .vs-rot { fill: #8a6414; letter-spacing: .6px; } .vs-val { fill: #1c140b; }
.visor { opacity: 0; } .visor.vis { opacity: 1; transition: opacity .35s; }
.visor.vis .vs-val { animation: visor-digita .5s steps(6) both; } @keyframes visor-digita { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }

/* Preventiva, Árvore da Conduta: a Alicia no meio (natural) → à direita (a rede no tronco) → de jaleco (o remédio) */
.palacio .obj[data-id="naofarm"] { transition: translate .9s ease-in-out, opacity .5s; } .palacio .obj[data-id="farm"], .palacio .obj[data-id="rede"] { transition: opacity .6s; }
.cdt-f1 .obj[data-id="rede"], .cdt-f1 .obj[data-id="farm"], .cdt-f2 .obj[data-id="farm"], .cdt-f3 .obj[data-id="naofarm"] { opacity: 0 !important; pointer-events: none; }
.cdt-f2 .obj[data-id="naofarm"] { translate: 330px 0; }

/* CARTAS CORINGA (todos os parques): fechada, a carta flutua de leve; ao toque, o verso fecha de lado, a carta gira e abre a cena */
.obj.carta .foto, .obj.carta .foto-acao { transform-box: fill-box; transform-origin: 50% 50%; }
.obj.carta:not(.feito):not(.agir) .foto { animation: carta-flutua 3.4s ease-in-out infinite; }
@keyframes carta-flutua { 0%, 100% { transform: translateY(0) rotate(-1.2deg); } 50% { transform: translateY(-3px) rotate(1.2deg); } }
.obj.carta.agir .arte .foto { opacity: 1; animation: carta-fecha .22s ease-in forwards; }
.obj.carta.agir .foto-acao { opacity: 1; transition: none; animation: carta-abre .45s .2s cubic-bezier(.3, 1.5, .5, 1) both; }
/* depois de virar, a CENA EM AÇÃO dentro da carta (quando a carta tem a pintura -anim), como os outros sintomas do parque */
.foto-anim { opacity: 0; }
.obj.carta.agir .foto-anim { animation: carta-anim 1.6s .7s ease-out both; transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes carta-anim { 0% { opacity: 0; transform: scale(.96); } 10% { opacity: 1; transform: scale(1.04); } 20%, 85% { opacity: 1; transform: scale(1); } 100% { opacity: 0; } }
@keyframes carta-fecha { to { transform: scaleX(0) scaleY(1.04); } }
@keyframes carta-abre { 0% { transform: scaleX(0) scaleY(1.04); } 100% { transform: scaleX(1); } }
@media (prefers-reduced-motion: reduce) { .obj.carta .foto, .obj.carta .foto-acao, .obj.carta .foto-anim { animation: none !important; } }

/* Preventiva, Árvore da Conduta: o tronco pisca na vez da rede; as plaquinhas chegam voando do lado da seta e são pregadas no tronco */
.cdt-f2 .obj[data-id="rede"] rect { fill: rgba(242, 201, 107, .14); stroke: #f2c96b; stroke-width: 3; stroke-dasharray: 10 8; rx: 22px; animation: tronco-pisca 1.6s ease-in-out infinite; }
@keyframes tronco-pisca { 50% { fill: rgba(242, 201, 107, .02); } }
.peca.on.prega image { animation: pc-prega .7s cubic-bezier(.3, 1.4, .5, 1) both; } .peca.on.prega.esq image { animation-name: pc-prega-esq; }
@keyframes pc-prega { from { transform: translateX(140px) rotate(14deg); opacity: 0; } 70% { transform: translateX(-6px) rotate(-3deg); opacity: 1; } to { transform: none; } }
@keyframes pc-prega-esq { from { transform: translateX(-140px) rotate(-14deg); opacity: 0; } 70% { transform: translateX(6px) rotate(3deg); opacity: 1; } to { transform: none; } }

/* Preventiva, especiarias: o ícone do exame salta grande acima do carrinho e depois entra no seu pote, onde fica guardado */
.peca.on.guarda image { animation: pc-guarda 2.3s cubic-bezier(.4, 0, .2, 1) both; }
@keyframes pc-guarda { 0% { transform: scale(.2); opacity: 0; } 14% { transform: scale(1.18); opacity: 1; } 22%, 60% { transform: scale(1); opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) scale(.3); opacity: 1; } }

.obj.aberto .foto-acao { opacity: 1; } .obj.aberto .arte:has(.foto-acao) .foto { opacity: 0; } /* o armário fica aberto enquanto o aluno toca nas coisas */

/* especiarias: sem os círculos amarelos sobre os potes — só o pote da vez ganha um contorno fino e tracejado */
.luz-toque[data-o="especificos"] { fill: none; stroke-width: 2.5; filter: none; } .luz-toque[data-o="especificos"].vez { fill: none; }

/* Trauma: as partes do corpo do boneco são áreas de toque — na vez delas, um anel dourado tracejado pulsa no lugar */
.area-trauma .obj .a-vazio rect { rx: 70px; }
.area-trauma .obj.chamar .a-vazio rect { fill: rgba(255, 212, 71, .14); stroke: #ffd447; stroke-width: 3px; stroke-dasharray: 8 6; vector-effect: non-scaling-stroke; }
/* Trauma: os números do caminho do C (o próximo pulsa; os feitos ficam dourados com ✓) */
.trm-num circle { fill: rgba(40, 10, 16, .78); stroke: #ffd447; stroke-width: 3; }
.trm-num text { fill: #ffe9a8; font: 700 22px 'Source Sans 3', sans-serif; pointer-events: none; }
.trm-num { pointer-events: none; transition: opacity .3s; opacity: .8; }
.trm-num.vez { opacity: 1; animation: trm-num 1.3s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.trm-num.feito circle { fill: #c99a2e; stroke: #fff3c4; } .trm-num.feito text { fill: #2b1a05; }
@keyframes trm-num { 50% { scale: 1.25; } }
.p-sem-anim .trm-num.vez { animation: none; }
/* Trauma: o painel de tela cheia (achados → conduta, Glasgow, destino) */
.trm-painel { position: absolute; inset: 0; z-index: 40; background: rgba(6, 10, 18, .84); display: flex; align-items: flex-start; justify-content: center; overflow-y: auto; padding: 16px; animation: rota-entra .35s ease-out; }
.trm-folha { position: relative; width: min(100%, 720px); margin: auto; background: #fbf3e4; color: #2a1d10; border: 3px solid #c9a45c; border-top: 10px solid var(--rc); border-radius: 14px; padding: 22px 20px 18px; box-shadow: 0 18px 60px rgba(0, 0, 0, .55); font-family: 'Source Sans 3', sans-serif; }
.trm-folha :is(h2, .trm-encaminhamento) { font: 800 clamp(22px, 4.5vw, 30px) 'Noto Serif', Georgia, serif; color: var(--rc); }
.trm-folha h2 { margin: 2px 0 12px; }
.trm-p-chip { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #8a6a3a; }
.trm-p-img { float: right; width: 92px; height: 92px; object-fit: contain; margin: -8px -4px 4px 8px; }
.trm-lista { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; clear: both; }
.trm-lista li { background: #fff; border: 1px solid #e6d3ae; border-left: 6px solid var(--rc); border-radius: 10px; padding: 10px 12px; font-size: 16px; line-height: 1.4; }
.trm-lista b { display: block; color: #3a2410; }
.trm-lista .trm-cd { display: block; margin-top: 4px; color: #1d4a2a; }
.trm-lista .trm-cd::before { content: '➜ Conduta: '; font-weight: 700; }
.trm-lista .trm-dest { display: grid; grid-template-columns: 56px 1fr; gap: 10px; align-items: center; }
.trm-lista .trm-dest img { width: 56px; height: 56px; object-fit: contain; }
.trm-gcs { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); clear: both; }
.gcs-col { --c: #3d7cc9; background: color-mix(in srgb, var(--c) 7%, #fff); border: 2px solid color-mix(in srgb, var(--c) 35%, #fff); border-radius: 14px; overflow: hidden; }
.gcs-o { --c: #3d7cc9; } .gcs-v { --c: #2e8c55; } .gcs-m { --c: #6b3fa0; }
.gcs-col h3 { margin: 0; padding: 9px 12px; background: var(--c); color: #fff; font: 700 17px 'Noto Serif', Georgia, serif; display: flex; align-items: center; gap: 8px; }
.gcs-col h3 small { margin-left: auto; font: 700 12px 'Source Sans 3', sans-serif; background: rgba(255, 255, 255, .25); border-radius: 99px; padding: 2px 8px; }
.gcs-ic { display: grid; place-items: center; width: 30px; height: 30px; flex: none; background: rgba(255, 255, 255, .92); border-radius: 50%; }
.gcs-ic img { width: 24px; height: 24px; object-fit: contain; display: block; }
.gcs-col ol { list-style: none; margin: 0; padding: 8px 10px 10px; display: grid; gap: 5px; }
.gcs-col li { display: grid; grid-template-columns: 30px 1fr; align-items: center; gap: 8px; font-size: 15px; line-height: 1.25; }
.gcs-col li b { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--c); border: 2px solid var(--c); font-size: 16px; }
.gcs-col li:first-child b { background: var(--c); color: #fff; }
.gcs-soma { margin: 14px 0 8px; text-align: center; font-size: 17px; color: #3a2410; }
.gcs-regua { display: grid; grid-template-columns: 6fr 4fr 3fr; border-radius: 12px; overflow: hidden; text-align: center; color: #fff; font-size: 13px; font-weight: 700; letter-spacing: .03em; box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .08); }
.gcs-regua div { padding: 8px 4px; } .gcs-regua b { display: block; font-size: 19px; } .gcs-regua small { display: block; font-weight: 600; }
.gcs-g { background: linear-gradient(90deg, #7a1212, #b3261e); } .gcs-mo { background: linear-gradient(90deg, #c46a14, #d9911f); } .gcs-l { background: linear-gradient(90deg, #3c9a5f, #2e7d4f); }
.trm-nota { font-size: 15px; line-height: 1.45; margin: 10px 0 0; }
.trm-p-ok { display: block; margin: 16px auto 0; min-width: 160px; }
/* Trauma, antessala: a cada toque a Alicia parada dá lugar à pintura da peça nova (pecas) */
.area-trauma .obj[data-id="paramentacao"].pecas-on .corpo { opacity: 0; }
/* Trauma: na apresentação da Alicia no centro, as peças da sala somem atrás do véu */
.area-trauma.foco-palco .obj:not(.chamar), .area-trauma.foco-palco .peca { opacity: .12; }
.area-trauma .obj.travado[data-id="dados"] { opacity: 0; } /* a ficha só entra depois do cumprimento (a cena do SAMU ocupa a tela) */
/* Trauma: só o alvo da vez recebe o toque (as áreas do corpo se sobrepõem: o C travava nos pontos já vistos) */
.area-trauma .obj:has(.a-vazio):not(.chamar) { pointer-events: none; }
/* Trauma: nas cenas de tela inteira (a equipe, a prancheta) o toque é na pintura, sem o anel */
.area-trauma .obj[data-id="equipe"] .a-vazio rect, .area-trauma .obj[data-id="dados"] .a-vazio rect { stroke: none; fill: transparent; }
.area-trauma .p-aviso { pointer-events: none; } /* Trauma: o quadradinho não "come" o toque no alvo que está atrás dele (a bandeja dos 4 As); qualquer toque na sala o fecha */
.p-cart-rodape { flex-wrap: nowrap; }
.p-cart-rodape [data-p="ouvir"] { flex: 0 0 auto; }
.p-cart-rodape .p-fechar-baixo { flex: 1; }
/* A bússola: um botão fixo, sempre no mesmo canto da faixa de baixo, longe das pinturas; a do chão das salas saiu */
.palacio .bussola { display: none; }
.p-bussola { position: absolute; right: 12px; bottom: 10px; z-index: 7; width: 76px; height: 52px; padding: 4px; border-radius: 14px; border: 1px solid rgba(242, 201, 107, .55); background: rgba(8, 19, 34, .88); cursor: pointer; box-shadow: 0 4px 14px rgba(0, 0, 0, .35); }
.p-bussola img { width: 100%; height: 100%; object-fit: contain; display: block; }
.p-bussola:hover, .p-bussola:focus-visible { border-color: #f2c96b; }
/* "Guiar meu percurso": o tour com setas pelas funções da tela */
.p-tour { position: absolute; inset: 0; z-index: 45; }
.p-tour-luz { position: absolute; border-radius: 14px; border: 3px solid #f2c96b; box-shadow: 0 0 0 9999px rgba(4, 9, 18, .72), 0 0 22px rgba(242, 201, 107, .8); transition: all .35s ease; pointer-events: none; }
.p-tour-balao { position: absolute; background: #fbf3e4; color: #2a1d10; border: 2px solid #c9a45c; border-radius: 14px; padding: 14px 14px 12px; box-shadow: 0 12px 40px rgba(0, 0, 0, .5); font: 16px/1.45 'Source Sans 3', sans-serif; transition: all .35s ease; }
.p-tour-balao p { margin: 0 0 10px; }
.p-tour-balao::after { content: ''; position: absolute; left: var(--seta, 50%); bottom: -11px; translate: -50% 0; border: 11px solid transparent; border-bottom: 0; border-top-color: #c9a45c; }
.p-tour-balao.embaixo::after { bottom: auto; top: -11px; border: 11px solid transparent; border-top: 0; border-bottom-color: #c9a45c; }
.p-tour-acoes { display: flex; justify-content: space-between; gap: 8px; }
.p-sem-anim .p-tour-luz, .p-sem-anim .p-tour-balao { transition: none; }
/* Reserve a faixa da bússola abaixo do diálogo em telas estreitas. */
@media (max-width: 760px) { .p-cartao.faixa { bottom: calc(72px + env(safe-area-inset-bottom)); } }
@media (max-width: 760px) { .palacio:has(.p-cartao.faixa:not([hidden])) .p-aviso { bottom: auto; top: 128px; } }

.trm-painel-quatro-as .trm-folha {
  width: min(100%, 640px);
  padding: clamp(16px, 4vw, 30px);
  border: 1px solid #b58a48;
  border-radius: 22px;
  background: radial-gradient(ellipse at 50% 44%, #28444d, #142730 66%, #0b1820);
  color: #fbebca;
  text-align: center;
}
.trm-painel-quatro-as .trm-p-chip { color: #dab47b; }
.trm-painel-quatro-as .trm-folha h2 { color: #fff0ca; margin-bottom: 0; }
.trm-bandeja { margin: 6px auto 0; max-width: 520px; }
.trm-bandeja img { display: block; width: min(100%, 500px); height: auto; margin: auto; }
.trm-bandeja ol {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.trm-bandeja li {
  border-top: 1px solid #b58a48;
  padding: 9px 2px 0;
  font: 700 clamp(13px, 2.5vw, 16px)/1.2 'Source Sans 3', sans-serif;
  overflow-wrap: anywhere;
  text-wrap: balance;
}
.trm-painel-quatro-as .trm-p-ok {
  margin-top: 24px;
  background: #f0d8a4;
  border-color: #b58a48;
  color: #182b31;
}

.trm-p-acoes:has(.trm-p-proximo) { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 24px; }
.trm-painel-quatro-as .trm-p-acoes .trm-p-ok { margin: 0; min-width: 100px; }
.trm-p-acoes .trm-p-proximo { background: var(--botao-ouro); border-color: #e6c97f; color: #14282f; }
.trm-p-acoes .trm-p-proximo:hover { background: #f5dfab; }
.trm-painel-quatro-as .trm-p-acoes .trm-p-ok { background: transparent; color: #fbebca; }
.trm-reavaliacao { padding: 14px 18px; border-left: 4px solid #b58a48; background: #f1e4cb; border-radius: 6px 12px 12px 6px; }
.trm-reavaliacao h3, .trm-reavaliacao p { margin: 0 0 6px; }
.trm-reavaliacao ul { margin: 0; padding-left: 20px; }
.trm-encaminhamento { margin: 22px 0 8px; }


/* Controles e folhas de estudo na linguagem visual da Rota. */
.palacio, .p-modos, .p-ajustes, .p-bussola, .p-aviso, .p-faixa { background-color: #132a31ed; }
.p-btn { background-color: #132a31ed; }
.p-btn:hover { background-color: #2f5866; }
.p-dest, .p-modo[aria-pressed="true"] { background: var(--botao-ouro); color: var(--marinho-900); }
.p-cartao, .p-tour-balao, .trm-painel:not(.trm-painel-quatro-as) .trm-folha {
  background: var(--pergaminho);
  box-shadow: var(--sombra-pergaminho);
}
.p-cartao { border: 1px solid var(--borda-pergaminho); }
.p-cartao h2 { font: 400 27px/1.1 var(--titulo-rota); }
.trm-folha :is(h2, .trm-encaminhamento) { font-family: var(--titulo-rota); font-weight: 400; }
.p-cartao .p-btn { background: #fff8; border-color: #9c7d3b88; }
.p-cartao .p-btn:hover { background: #fff; }
.p-cartao .p-btn.p-dest { background: var(--marinho-800); }

.trm-pulso-mesmo-lado { display: none; }
[data-circulacao="pulso"] .trm-pulso-mesmo-lado { display: block; }
