/* Cândido Adventure V14.69 — tela de mensagem de entrada (moldura) + painel do professor */
#ca-entry-overlay{position:fixed;inset:0;z-index:2147483100;display:flex;align-items:center;justify-content:center;background:rgba(6,22,44,.78);box-sizing:border-box;animation:ca-entry-in .22s ease-out}
@keyframes ca-entry-in{from{opacity:0;transform:scale(.96)}to{opacity:1;transform:none}}
.ca-entry-frame{--S:min(96vw,96vh,780px);--S:min(96vw,96dvh,780px);position:relative;width:var(--S);height:var(--S);flex:0 0 auto;
  font:600 clamp(9px,calc(var(--S)*.036),20px)/1.3 system-ui,"Segoe UI",Roboto,sans-serif;color:#4a2f12;filter:drop-shadow(0 12px 30px rgba(0,0,0,.45))}
.ca-entry-art{position:absolute;inset:0;width:100%;height:100%;object-fit:fill;pointer-events:none;user-select:none;-webkit-user-drag:none}
/* V14.72: se a imagem da moldura não carregar, o jogo desenha uma moldura azul/dourada parecida (nunca uma caixa lisa) */
.ca-entry-frame.noart{box-sizing:border-box;border-radius:9%;border:.42em solid #e9aa16;background:linear-gradient(180deg,#fff3d2,#f7e3bb);box-shadow:inset 0 0 0 .5em #234fae,inset 0 0 0 .72em #f6cf55,inset 0 0 0 .95em #fff3d2}
.ca-entry-frame.noart .ca-entry-art{display:none}
.ca-entry-inner{position:absolute;inset:12%;display:flex;flex-direction:column;gap:.55em;min-height:0;min-width:0}
.ca-entry-inner h2{margin:0;padding:0 2.2em;text-align:center;font-size:1.45em;line-height:1.1;font-weight:900;color:#27398a;text-shadow:0 1px 0 #fff9;overflow-wrap:anywhere}
.ca-entry-body{flex:1 1 auto;min-height:0;overflow:auto;display:flex;flex-direction:column;gap:.6em;padding-right:.25em;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
.ca-entry-block h3{margin:0 0 .15em;font-size:1.08em;font-weight:900;color:#7a3b10}
.ca-entry-block p{margin:0;font-size:1em;font-weight:600;line-height:1.35;white-space:pre-wrap;overflow-wrap:anywhere}
.ca-entry-pending{border-top:2px dashed #c79a46;padding-top:.5em}
.ca-entry-chips{list-style:none;margin:.35em 0 0;padding:0;display:flex;flex-wrap:wrap;gap:.35em}
.ca-entry-chips li{background:#fff4d6;border:2px solid #3057b8;border-radius:999px;padding:.15em .7em;font-weight:800;font-size:.95em;color:#1f3a7a}
.ca-entry-chips small{font-weight:700;color:#8a4b12}
.ca-entry-ok{font-weight:800!important;color:#1b6b3d}
.ca-entry-picture{display:block;flex:0 0 auto;max-width:46%;max-height:7.5em;object-fit:contain;margin:0 auto;border-radius:.5em;box-shadow:0 .2em .6em #0004}
.ca-entry-actions{flex:0 0 auto;display:flex;gap:.6em;justify-content:center;flex-wrap:wrap}
.ca-entry-btn{appearance:none;-webkit-appearance:none;cursor:pointer;min-height:2.6em;padding:.45em 1.5em;border:2px solid #fff3b0;border-radius:999px;background:linear-gradient(180deg,#ffd75e,#f2a30f);color:#3a2300;font:900 1.05em/1.1 inherit;font-family:inherit;box-shadow:0 .2em 0 #b9730a,0 .4em .8em #041d4466;transition:transform .08s ease,box-shadow .08s ease}
.ca-entry-btn.secondary{background:linear-gradient(180deg,#fff7df,#f1dca4);border-color:#d3a84a;color:#5a3a10}
.ca-entry-btn:active{transform:translateY(.18em);box-shadow:0 0 0 #b9730a,0 .15em .5em #041d4466}
.ca-entry-btn:focus-visible,.ca-entry-x:focus-visible{outline:3px solid #2b6bff;outline-offset:2px}
.ca-entry-x{position:absolute;top:9%;right:9%;z-index:2;width:2.3em;height:2.3em;padding:0;border-radius:50%;border:2px solid #fff3b0;background:#27398a;color:#fff;font:900 1em/1 inherit;cursor:pointer;box-shadow:0 .15em .4em #0005}
@media (prefers-reduced-motion:reduce){#ca-entry-overlay{animation:none}}
/* painel do professor */
#ca-entry-tools .ca-entry-fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:12px;margin:10px 0}
#ca-entry-tools label{display:flex;flex-direction:column;gap:6px;font-weight:700}
#ca-entry-tools input,#ca-entry-tools textarea,#ca-entry-tools select{width:100%;box-sizing:border-box}
#ca-entry-tools label:has(textarea){grid-column:1/-1}
#ca-entry-tools small{font-weight:600;color:#556}
#ca-entry-tools .ca-entry-row{padding:10px 3px;border-bottom:1px solid #ddd}
#ca-entry-tools .ca-entry-row p{margin:4px 0 0;white-space:pre-wrap;font-size:13px;color:#334}
/* V14.71 — X dourado oficial. O CSS global troca todo botão marcado como "fechar" pela arte ca-x-v9943.png, que NÃO existe na pasta
   (o X ficava transparente e invisível); aqui o X usa a arte oficial que existe: ca-x-mapa-oficial-v9955.png. */
html body #ca-entry-overlay button.ca-entry-x{position:absolute!important;top:6.5%!important;right:7.5%!important;z-index:3;--xw:clamp(64px,calc(var(--S)*.18),112px);width:var(--xw)!important;height:auto!important;aspect-ratio:1635/880;max-width:none!important;max-height:none!important;min-width:0!important;min-height:0!important;padding:0!important;margin:0!important;border:0!important;border-radius:0!important;background:transparent url('ca-x-mapa-oficial-v9955.png?v=1436') center/contain no-repeat!important;font-size:0!important;line-height:0!important;box-shadow:none!important;filter:drop-shadow(0 .15em .2em #0009);cursor:pointer;transition:transform .08s ease}
html body #ca-entry-overlay button.ca-entry-x:hover{transform:scale(1.06)}
html body #ca-entry-overlay button.ca-entry-x:active{transform:scale(.96)}
/* contagem de 3 s depois do toque no X (só na tela de entrada) */
html body #ca-entry-overlay button.ca-entry-x.counting{pointer-events:none;cursor:progress;filter:saturate(.6) drop-shadow(0 .15em .2em #0009)}
/* V14.74 — o número da contagem agora é proporcional ao X (antes media 1,7 × o tamanho da fonte da tela e passava da altura
   do botão: cobria e cortava a arte do X). Ele fica DENTRO do disco azul central do X; o anel dourado e os floreios aparecem. */
html body #ca-entry-overlay button.ca-entry-x.counting::after{content:attr(data-count);position:absolute;left:50%;top:50%;height:58%;width:auto;aspect-ratio:1/1;transform:translate(-50%,-50%);display:grid;place-items:center;border-radius:50%;background:#fff;border:max(2px,calc(var(--xw)*.022)) solid #f2a30f;box-sizing:border-box;color:#1f3a7a;font:900 calc(var(--xw)*.2)/1 system-ui,"Segoe UI",Roboto,sans-serif;box-shadow:0 .06em .2em #0006;overflow:hidden}
.ca-entry-hint{margin:0;text-align:center;font-weight:800;font-size:.95em;color:#7a3b10;width:100%}
