* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #0b1016; color: #f2f4f7;
  font-family: "Segoe UI", system-ui, sans-serif; user-select: none; }
#game { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
.hidden { display: none !important; }

#whud, #bhint { position: fixed; left: 50%; transform: translateX(-50%); bottom: 10px; font-size: 13px;
  background: rgba(8, 12, 18, .6); padding: 6px 14px; border-radius: 20px; white-space: nowrap; }
#prompt { position: fixed; left: 50%; top: 62%; transform: translateX(-50%); background: rgba(8, 12, 18, .8);
  border: 1px solid #ffffff44; padding: 6px 14px; border-radius: 8px; font-weight: 600; }

/* battle hud */
.panel { position: fixed; top: 16px; width: 290px; background: rgba(8, 12, 18, .72); border: 1px solid #ffffff2a;
  border-radius: 12px; padding: 10px 12px; }
#pPanel { left: 16px; } #ePanel { right: 16px; }
.nm { display: flex; justify-content: space-between; font-weight: 700; margin-bottom: 6px; }
.nm .rara { color: #ffd166; text-shadow: 0 0 8px #ffd16699; }
.panel .info { display: flex; flex-wrap: wrap; gap: 2px 10px; font-size: 12px; font-weight: 700; margin: -2px 0 6px; }
.panel .info .rara { color: #ffd166; }
.sub { display: flex; justify-content: space-between; font-size: 12px; opacity: .85; margin-top: 4px; }
.bar { height: 10px; background: #ffffff1c; border-radius: 6px; overflow: hidden; margin-top: 4px; }
.bar i { display: block; height: 100%; width: 100%; border-radius: 6px; transition: width .12s linear; }
.bar.hp { height: 14px; } .bar.hp i { background: linear-gradient(90deg, #3ddc71, #9bf05a); }
.bar.hp i.low { background: linear-gradient(90deg, #e5484d, #ff8a5c); }
.bar.en i { background: #4aa8ff; } .bar.st i { background: #ffc94a; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #3ddc71; margin-left: 4px; }
.dot.off { background: #555; }

#moves { position: fixed; left: 50%; bottom: 46px; transform: translateX(-50%); display: flex; gap: 10px; }
.mv { position: relative; width: 132px; padding: 8px 10px; border-radius: 10px; background: rgba(8, 12, 18, .78);
  border: 2px solid var(--c, #888); overflow: hidden; }
.mv b { display: block; font-size: 14px; } .mv small { font-size: 11px; opacity: .8; }
.mv kbd { position: absolute; right: 6px; top: 4px; font-size: 13px; font-weight: 800; font-family: inherit; background: #ffffff22; border-radius: 4px; padding: 0 5px; }
.mv .cd { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, .65); height: 0; }
.mv.no { opacity: .5; }
/* Símbolos das Naturezas (src/simbolos.js): um círculo com a cor da Natureza e o desenho dela */
.nat { display: inline-flex; align-items: center; justify-content: center; width: 1.3em; height: 1.3em; border-radius: 50%;
  background: var(--c); box-shadow: 0 0 0 1.5px rgba(0, 0, 0, .35); vertical-align: -.28em; flex: none; }
.nat svg { width: 76%; height: 76%; display: block; }
.natnome { margin-left: 4px; }
.natrel { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 3px; } .natrel.forte { color: #7dff9b; } .natrel.fraco { color: #ff8a8a; }
#guia .natrel.forte, #choice .natrel.forte { color: #1f7a34; } #guia .natrel.fraco, #choice .natrel.fraco { color: #b3261e; }
/* Golpes: o símbolo da Natureza do golpe e a vantagem contra o adversário em campo (▲ verde: mais dano; ▼ vermelho: menos) */
.mv .mvnat { position: absolute; left: 6px; top: 6px; font-size: 16px; line-height: 1; }
.mv b { padding-left: 25px; }
.mv .vant { position: absolute; right: 6px; bottom: 3px; font-size: 15px; font-weight: 800; }
.mv.forte { box-shadow: 0 0 0 3px #3ddc71, 0 0 14px #3ddc71aa; } .mv.forte .vant { color: #7dff9b; }
.mv.fraco { box-shadow: 0 0 0 3px #e5484d; } .mv.fraco .vant { color: #ff8a8a; }
.panel .nm .nat { margin-right: 6px; font-size: 19px; }
#eRel { display: block; font-size: 13px; font-weight: 700; margin: 2px 0 4px; } #eRel .nat { font-size: 16px; }

/* dialog */
#dialog { position: fixed; left: 50%; bottom: 44px; transform: translateX(-50%); width: min(760px, 92vw);
  background: rgba(10, 14, 22, .93); border: 2px solid #e8ecf3; border-radius: 14px; padding: 16px 20px 22px; }
#dName { font-weight: 800; color: #ffd166; margin-bottom: 4px; min-height: 0; }
#dText { font-size: 18px; line-height: 1.45; }
#dNext { position: absolute; right: 14px; bottom: 6px; font-size: 12px; opacity: .7; }
#dVoz { position: absolute; right: 10px; top: 8px; width: 40px; height: 40px; border-radius: 50%; border: 2px solid #e8ecf3;
  background: rgba(255, 255, 255, .08); color: #fff; font-size: 20px; line-height: 1; cursor: pointer; opacity: .75; }
#dVoz.on { background: rgba(255, 209, 102, .28); border-color: #ffd166; opacity: 1; }
#dialog:has(#dVoz) #dText { padding-right: 40px; }

#choice, #party { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(560px, 92vw);
  background: rgba(10, 14, 22, .95); border: 2px solid #e8ecf3; border-radius: 14px; padding: 18px; }
#choice h3, #party h3 { margin: 0 0 12px; }
.opt { display: block; width: 100%; text-align: left; margin-top: 8px; padding: 10px 12px; border-radius: 10px;
  border: 1px solid #ffffff33; background: #ffffff10; color: inherit; font: inherit; cursor: pointer; }
.opt:hover { background: #ffffff24; } .opt b { display: block; } .opt small { display: block; opacity: .8; margin-top: 2px; }

/* guia de campo */
#guia { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(940px, 95vw); max-height: 86vh; overflow-y: auto;
  background: rgba(10, 14, 22, .96); border: 2px solid #e8ecf3; border-radius: 14px; padding: 18px 20px; }
#guia h3 { margin: 0; } #guia h4 { margin: 16px 0 6px; color: #ffd166; }
.gsub { margin: 4px 0 0; font-size: 13px; opacity: .8; }
.gg { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 8px; }
.gc { border: 1px solid #ffffff33; border-left: 5px solid var(--c, #666); border-radius: 10px; padding: 9px 11px; background: #ffffff0d; font-size: 13px; line-height: 1.4; }
.gc b { display: block; font-size: 15px; } .gc p { margin: 4px 0 0; } .gc i { opacity: .85; } .gc .k { color: #9fd3ff; }
.gc.un { opacity: .45; } .gc.vi { opacity: .8; }
.gclose { position: sticky; top: 0; float: right; padding: 5px 12px; border-radius: 8px; border: 1px solid #ffffff44; background: #1b2432; color: inherit; font: inherit; cursor: pointer; }

.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 4px; }
.tab { padding: 5px 10px; border-radius: 8px; border: 1px solid #ffffff44; background: #ffffff12; color: inherit; font: inherit; font-size: 13px; cursor: pointer; }
.tab.on { background: #ffd166; color: #10161e; font-weight: 700; } .tab.off { opacity: .5; }
.mapa { display: block; width: min(440px, 100%); margin: 12px auto 6px; }
.mapa text { fill: #fff; font-size: 13px; font-weight: 700; paint-order: stroke; stroke: #10161e; stroke-width: 3px; }
.mapa .no.ok { cursor: pointer; } .mapa .no.ok:hover circle { fill: #9fe3ff; }

#toasts { position: fixed; top: 110px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column;
  gap: 6px; align-items: center; pointer-events: none; }
.toast { background: rgba(8, 12, 18, .85); border: 1px solid #ffffff33; padding: 7px 16px; border-radius: 20px;
  font-weight: 600; animation: fade 2.6s forwards; }
@keyframes fade { 0% { opacity: 0; transform: translateY(-6px); } 10%, 80% { opacity: 1; transform: none; } 100% { opacity: 0; } }

#popups { position: fixed; inset: 0; pointer-events: none; }
.pop { position: absolute; transform: translate(-50%, -50%); font-weight: 800; font-size: 20px;
  text-shadow: 0 2px 4px #000; animation: rise 1.4s forwards; white-space: nowrap; }
.pop.crit { color: #ffd166; font-size: 24px; } .pop.miss { color: #8fd3ff; } .pop.heal { color: #7dff9b; }
/* O que acontece com o Anima no duelo, numa linha do quadro dele (Battle.pop). Apagada, guarda o lugar para o quadro não pular. */
.evento { min-height: 16px; margin-top: 4px; font-size: 12.5px; font-weight: 800; line-height: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: opacity .7s; }
.evento.velho { opacity: 0; } .evento.crit { color: #ffd166; } .evento.miss { color: #8fd3ff; } .evento.heal { color: #7dff9b; }
body.toque .evento { min-height: 14px; line-height: 14px; font-size: 11px; margin-top: 2px; }
body.letra-grande .evento { font-size: 14.5px; min-height: 18px; line-height: 18px; }
@keyframes rise { 0%, 55% { opacity: 1; } to { margin-top: -60px; opacity: 0; } }

/* Minimapa do bioma (canto superior direito) */
#mini { position: fixed; right: 12px; top: 12px; width: 88px; height: 268px; border-radius: 10px; border: 1px solid #ffffff44; background: rgba(8, 12, 18, .6); }
#mini.hidden { display: none; }
#mini.redondo { width: 150px; height: 150px; border-radius: 50%; border: 2px solid #ffffff55; cursor: pointer; } /* (no computador: o mapa redondo, girado com o norte para cima) */
#mini.inteiro { cursor: pointer; }

/* ---------- Celular e tablet: controles de toque (src/toque.js) ---------- */
html, body { touch-action: none; -webkit-user-select: none; -webkit-touch-callout: none; overscroll-behavior: none; }
#guia, #party, #choice { touch-action: pan-y; }
#toque.hidden { display: none; }
#tq-pad { position: fixed; left: max(18px, env(safe-area-inset-left)); bottom: 22px; width: 132px; height: 132px; border-radius: 50%;
  background: rgba(8, 12, 18, .38); border: 2px solid #ffffff55; touch-action: none; }
#tq-pino { position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px; border-radius: 50%;
  background: rgba(255, 255, 255, .55); pointer-events: none; }
.tq-b { min-width: 62px; height: 46px; padding: 0 8px; border-radius: 12px; border: 2px solid #ffffff66; background: rgba(8, 12, 18, .6);
  color: #fff; font: 700 13px "Segoe UI", system-ui, sans-serif; touch-action: none; }
.tq-b.on { background: #ffd166; color: #10161e; }
.tq-grupo { position: fixed; display: grid; gap: 8px; }
.tq-grupo.hidden, .tq-b.hidden { display: none; }
/* Mundo no toque: a mesma roda do duelo (ver "Duelo no toque", logo abaixo), com o mesmo centro: Agir no meio, onde no
   duelo fica o 1º golpe, e em volta (raio de 70 px) Equipe em cima, Guia e Caderno à esquerda, Ajuda e Som à direita e
   Câmera embaixo. (25/11/2026: em grade, os botões tomavam o canto e empurravam o minimapa para o meio da tela.) */
#tq-mundo { right: var(--roda-x); bottom: var(--roda-y); width: 0; height: 0; display: block; transform: scale(var(--roda-k)); }
#tq-mundo > .tq-b { position: absolute; left: 0; top: 0; width: 50px; height: 50px; min-width: 0; margin: -25px 0 0 -25px; padding: 2px;
  border-radius: 50%; font-size: 10.5px; letter-spacing: -.2px; line-height: 1.05; }
#tq-mundo > .tq-b:first-child { width: 68px; height: 68px; margin: -34px 0 0 -34px; font-size: 15px; background: rgba(40, 120, 70, .75); }
#tq-mundo > .tq-b:first-child.on { background: #ffd166; }
#tq-mundo > .tq-b:nth-child(2) { transform: translate(0, -70px); }
#tq-mundo > .tq-b:nth-child(3) { transform: translate(-61px, -35px); }
#tq-mundo > .tq-b:nth-child(4) { transform: translate(-61px, 35px); }
#tq-mundo > .tq-b:nth-child(5) { transform: translate(61px, -35px); }
#tq-mundo > .tq-b:nth-child(6) { transform: translate(61px, 35px); }
#tq-mundo > .tq-b:nth-child(7) { transform: translate(0, 70px); }
/* Correr: redondo também, ao lado do direcional (é usado enquanto se anda) */
#tq-correr { position: fixed; left: calc(max(18px, env(safe-area-inset-left)) + 146px); bottom: 28px; width: 56px; height: 56px; min-width: 0; padding: 2px;
  border-radius: 50%; font-size: 11px; letter-spacing: -.2px; line-height: 1.1; }
/* Duelo no toque: uma roda no canto direito (25/11/2026: em fileiras, os botões ocupavam muito espaço).
   No meio, o 1º golpe; em volta (raio de 82 px), os golpes 2 a 4 em cima, a habilidade à direita, Pular, Esquivar,
   Defender e Selo embaixo. O "Mais" fica de fora, à esquerda e abaixo, e abre Fruto, Trocar e Fugir ao lado dele.
   #moves (golpes, src/battle.js) e #tq-duelo (src/toque.js) são dois pontos de tamanho zero no centro da roda. */
body.toque { --roda-x: calc(max(12px, env(safe-area-inset-right)) + 110px); --roda-y: calc(max(10px, env(safe-area-inset-bottom)) + 110px); --roda-k: 1; }
@media (max-height: 400px) { /* tela baixa (muitos celulares deitados têm 360 px): a roda encolhe um pouco para caber embaixo do quadro do adversário */
  body.toque { --roda-x: calc(max(10px, env(safe-area-inset-right)) + 96px); --roda-y: calc(max(8px, env(safe-area-inset-bottom)) + 96px); --roda-k: .86; }
}
body.toque #moves, #tq-duelo { position: fixed; left: auto; top: auto; right: var(--roda-x); bottom: var(--roda-y); width: 0; height: 0; display: block; transform: scale(var(--roda-k)); }
body.toque #moves > .mv, #tq-duelo > .tq-b { position: absolute; left: 0; top: 0; width: 54px; height: 54px; min-width: 0; margin: -27px 0 0 -27px; padding: 2px;
  border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; line-height: 1.05; touch-action: none; }
#tq-duelo > .tq-b { font-size: 10px; letter-spacing: -.2px; }
#tq-duelo > .tq-b:nth-child(1) { background: rgba(40, 90, 150, .75); } #tq-duelo > .tq-b:nth-child(2) { background: rgba(150, 110, 30, .75); }
#tq-duelo > .tq-b.on { background: #ffd166; color: #10161e; }
body.toque .mv b { font-size: 9.5px; overflow-wrap: break-word; hyphens: auto; } body.toque .mv.longo b { font-size: 8.5px; }
body.toque .mv small { font-size: 9px; margin-top: 1px; } body.toque .mv .tp { display: none; }
body.toque #moves > .mv:first-child { width: 72px; height: 72px; margin: -36px 0 0 -36px; }
body.toque #moves > .mv:first-child b { font-size: 12px; } body.toque #moves > .mv.longo:first-child b { font-size: 10.5px; } body.toque #moves > .mv:first-child small { font-size: 10.5px; }
body.toque #moves > .mv:nth-child(2) { transform: translate(-58px, -58px); }
body.toque #moves > .mv:nth-child(3) { transform: translate(0, -82px); }
body.toque #moves > .mv:nth-child(4) { transform: translate(58px, -58px); }
body.toque #moves > .mv.hab { transform: translate(82px, 0); }
/* na roda, o símbolo da Natureza fica em cima do nome e o ▲/▼ num selinho no canto */
body.toque .mv .mvnat { position: static; font-size: 13px; margin-bottom: 1px; } body.toque .mv b { padding-left: 0; }
body.toque #moves > .mv:first-child .mvnat { font-size: 16px; }
body.toque .mv .vant { left: 2px; right: auto; bottom: auto; top: 50%; transform: translateY(-50%); font-size: 12px; text-shadow: 0 0 3px #000, 0 0 3px #000; }
#tq-duelo > .tq-b:nth-child(1) { transform: translate(-82px, 0); }
#tq-duelo > .tq-b:nth-child(2) { transform: translate(-58px, 58px); }
#tq-duelo > .tq-b:nth-child(3) { transform: translate(0, 82px); }
#tq-duelo > .tq-b:nth-child(4) { transform: translate(58px, 58px); }
#tq-duelo > .tq-b.mais { width: 44px; height: 44px; margin: -22px 0 0 -22px; transform: translate(-132px, 52px); font-size: 11px; }
#tq-mais { right: calc(var(--roda-x) + 154px * var(--roda-k) + 8px); bottom: calc(var(--roda-y) - 52px * var(--roda-k) - 22px); grid-template-columns: repeat(3, auto); } /* (ao lado do "Mais") */
#tq-mais .tq-b { height: 44px; border-radius: 22px; }
@media (orientation: portrait) { /* em pé, o "Mais" iria parar em cima do direcional: ele sobe para cima da roda */
  #tq-duelo > .tq-b.mais { transform: translate(-30px, -142px); }
  #tq-mais { right: calc(var(--roda-x) - 100px); bottom: calc(var(--roda-y) + 172px * var(--roda-k)); }
}

body.toque #bhint { display: none; }
body.toque #whud { bottom: auto; top: 6px; font-size: 11px; max-width: 62vw; white-space: normal; text-align: center; padding: 4px 10px; }
/* Celular: minimapa redondo em volta do jogador; um toque abre o bioma inteiro por 10 s (World.desenharMini).
   Deitado, fica no canto de cima, à esquerda do ⏸, com a roda do mundo embaixo; o bioma inteiro abre à esquerda da roda. */
body.toque #mini { top: 60px; right: max(8px, env(safe-area-inset-right)); touch-action: none; }
body.toque #mini:not(.inteiro) { width: 112px; height: 112px; border-radius: 50%; border: 2px solid #ffffff55; } /* (redondo já antes do primeiro desenho) */
body.toque #mini.inteiro { width: auto; height: min(320px, calc(100vh - 76px)); z-index: 6; box-shadow: 0 4px 18px #0009; }
@media (orientation: landscape) {
  body.toque #mini { top: 8px; right: calc(max(8px, env(safe-area-inset-right)) + 52px); }
  body.toque #mini.inteiro { right: calc(var(--roda-x) + 92px * var(--roda-k) + 10px); height: min(320px, calc(100vh - 16px)); }
}
body.toque .panel { top: 8px; width: min(250px, 38vw); padding: 6px 9px; font-size: 13px; }
body.toque #pPanel { left: 8px; } body.toque #ePanel { right: 8px; }
body.toque .mv kbd { display: none; } /* (a roda dos golpes está mais acima, junto de #tq-duelo) */
/* Celular deitado: o seu quadro no canto esquerdo, o do adversário no direito (ao lado do ⏸, mais largo e mais baixo,
   por cima da roda dos golpes) e o meio da tela livre para ver o adversário. Os avisos do duelo ficam à esquerda,
   embaixo do seu quadro. (Antes da roda, de 25/11/2026, os golpes ocupavam o canto direito de cima a baixo e o quadro
   do adversário ficava no meio, bem na frente dele.) */
@media (orientation: landscape) {
  body.toque .panel { width: min(230px, 27.5vw); }
  body.toque #ePanel { right: calc(max(8px, env(safe-area-inset-right)) + 48px); width: min(290px, 36vw); }
  body.toque .panel .info { font-size: 11px; gap: 1px 8px; margin-bottom: 4px; }
  body.toque #hud:not(.hidden) ~ #toasts { top: 136px; left: max(10px, env(safe-area-inset-left)); transform: none; max-width: calc(50vw - 34px); align-items: flex-start; }
}
body.toque #toasts { top: 78px; } body.toque .toast { font-size: 13px; padding: 5px 12px; }
body.toque #dialog { bottom: 12px; padding: 12px 16px 18px; } body.toque #dText { font-size: 16px; } body.toque #dNext { font-size: 12px; bottom: 4px; }
/* "E ▸" ou "toque ▸": pisca devagar no canto da caixa de fala, para mostrar que é só tocar para seguir */
#dNext { animation: piscaNext 1.6s ease-in-out infinite; font-weight: 700; } @keyframes piscaNext { 0%, 100% { opacity: .45; } 50% { opacity: 1; } }
#dialog.carta #dNext { display: none; }
body.toque #choice, body.toque #party { max-height: 92vh; overflow-y: auto; padding: 12px; }
body.toque .opt { padding: 9px 10px; margin-top: 6px; }
body.toque #prompt { top: 22%; }

/* Em pé, o jogo pede para deitar o aparelho: os controles foram pensados para a tela na horizontal. */
#vire { display: none; }
@media (orientation: portrait) {
  body.toque #vire { display: flex; position: fixed; inset: 0; z-index: 50; background: #0b1016; align-items: center; justify-content: center;
    text-align: center; padding: 30px; font-size: 20px; font-weight: 700; line-height: 1.5; }
}
/* retratos dos Animas nos menus */
.ret { width: 64px; height: 64px; flex: none; object-fit: contain; border-radius: 10px; background: radial-gradient(circle at 50% 60%, #ffffff2a, #ffffff08); }
.ret.g { display: block; width: 132px; height: 132px; margin: 0 auto 8px; border: 1px solid #ffffff33; }
.opt.ci { display: flex; align-items: center; gap: 10px; } .opt.ci > span { flex: 1; min-width: 0; }
.gc .ret { float: right; width: 72px; height: 72px; margin: 0 0 4px 8px; }
#dImg { position: absolute; left: 14px; bottom: calc(100% + 8px); width: 150px; height: 150px; object-fit: contain; border-radius: 14px;
  border: 2px solid #e8ecf3; background: radial-gradient(circle at 50% 60%, #3a5a7a, #101822); }
#dImg.foto { border: 8px solid #f4f1e8; border-bottom-width: 26px; border-radius: 4px; transform: rotate(-3deg); box-shadow: 0 6px 18px #000a; background: linear-gradient(#9fd0ee, #6fae5c 62%, #4f8a44); }
body.toque .ret { width: 52px; height: 52px; } body.toque .ret.g { width: 96px; height: 96px; } body.toque #dImg { width: 110px; height: 110px; }
/* clarão na tela: foto tirada, vínculo criado */
#clarao { position: fixed; inset: 0; background: #fff; opacity: 0; pointer-events: none; z-index: 40; }
#clarao.on { animation: clarao .45s ease-out; } @keyframes clarao { 0% { opacity: .85; } 100% { opacity: 0; } }
/* Anima ainda desconhecido: silhueta clara com contorno de luz (a preta sumia sobre o painel escuro) */
.ret.sombra { filter: brightness(0) invert(.82) drop-shadow(0 0 5px #9fd0ffcc); }
/* Celular deitado: o retrato do encontro fica ao lado do título, para caber junto com as opções sem rolar */
@media (orientation: landscape) { body.toque #choice > .ret.g { float: left; width: 84px; height: 84px; margin: 0 12px 6px 0; } body.toque #choice > .opt { clear: both; } }
#titulo { position: fixed; left: 0; right: 0; top: 26%; text-align: center; pointer-events: none; opacity: 0; z-index: 30; text-shadow: 0 3px 12px #000c; }
#titulo b { display: block; font-size: clamp(26px, 6vw, 54px); letter-spacing: 2px; color: #ffe9a8; } #titulo span { display: block; margin-top: 6px; font-size: clamp(14px, 2.4vw, 20px); }
#titulo.on { animation: titulo 4.6s ease-out; } @keyframes titulo { 0% { opacity: 0; transform: translateY(14px); } 12% { opacity: 1; transform: none; } 78% { opacity: 1; } 100% { opacity: 0; } }
/* cenas em tela cheia (fonte, viagem, soltura, derrota) */
#cena { position: fixed; inset: 0; z-index: 35; display: none; background: #0b1016; cursor: pointer; }
#cena.on { display: block; } #cena canvas { width: 100%; height: 100%; display: block; }
#cena.tres { background: transparent; } /* encenada em 3D no canvas do jogo (src/cenas.js); aqui só as legendas e as barras */
#cena.tres::before, #cena.tres::after { content: ''; position: absolute; left: 0; right: 0; height: 7vh; background: #000; pointer-events: none; }
#cena.tres::before { top: 0; } #cena.tres::after { bottom: 0; }
#cenaTxt { position: absolute; left: 0; right: 0; bottom: 13%; text-align: center; font-size: clamp(16px, 3vw, 26px); font-weight: 700; text-shadow: 0 2px 8px #000c; padding: 0 16px; }
#cena small { position: absolute; right: 14px; bottom: 10px; opacity: .6; font-size: 12px; }

/* ===== Estilo C: o Guia de Campo como caderno de naturalista (papel, tinta sépia, aquarela) ===== */
#guia { background: #f1e7cd; color: #3a2616; border: 2px solid #6b4a2b; border-radius: 6px 14px 14px 6px; box-shadow: inset 14px 0 18px -12px #6b4a2b66, 0 12px 40px #000a;
  background-image: radial-gradient(#00000009 1px, transparent 1.4px), linear-gradient(#f6eedb, #ecdfc0); background-size: 7px 7px, 100% 100%; font-family: Georgia, 'Times New Roman', serif; }
#guia h3 { font-style: italic; font-size: 24px; color: #4a2c14; letter-spacing: .5px; border-bottom: 2px solid #6b4a2b55; padding-bottom: 4px; }
#guia h4 { color: #8a3d1c; font-style: italic; font-size: 18px; border-bottom: 1px dashed #6b4a2b66; }
#guia .gsub { opacity: .85; font-style: italic; }
#guia .gc { background: #fbf5e4; border: 1px solid #6b4a2b55; border-left: 5px solid var(--c, #6b4a2b); border-radius: 3px; box-shadow: 1px 2px 0 #6b4a2b22; }
#guia .gc b { font-style: italic; font-size: 17px; color: #4a2c14; } #guia .gc .k { color: #8a3d1c; font-weight: 700; font-style: normal; }
#guia .gc.un { opacity: .5; border-style: dashed; }
/* faixa fixa no alto: Fechar, título e abas não rolam com a página nem somem atrás dos cartões */
#guia .gtopo { position: sticky; top: -18px; z-index: 6; margin: -18px -20px 8px; padding: 14px 20px 6px; background: linear-gradient(#f6eedb, #f1e7cd); box-shadow: 0 6px 8px -6px #6b4a2b66; }
#guia .gtopo::after { content: ''; display: block; clear: both; } #guia .gtopo .tabs { margin-bottom: 0; } #guia .gtopo .gclose { position: static; }
#guia .gclose { background: #6b4a2b; color: #f6eedb; border-color: #4a2c14; font-family: inherit; }
#guia .tab { border-color: #6b4a2b88; background: #fbf5e4; } #guia .tab.on { background: #8a3d1c; color: #fbf5e4; }
#guia .tab small { opacity: .7; font-size: 11px; margin-left: 2px; }
/* Guia como catálogo: busca, grupos por raridade e uma linha por espécie (a linha abre a ficha completa) */
#guia .gbusca { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin: 10px 0 2px; }
#guia .gbusca input[type=search] { flex: 1 1 240px; padding: 7px 10px; border-radius: 6px; border: 1px solid #6b4a2b88; background: #fbf5e4; color: #3a2616; font: inherit; font-size: 14px; }
#guia .gbusca label { font-size: 13px; display: flex; gap: 5px; align-items: center; cursor: pointer; }
#guia .gbusca .gclose { float: none; font-size: 13px; padding: 4px 10px; }
#guia .gajudatxt { margin-top: 4px; }
#guia h4.glgrupo { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin: 18px 0 4px; color: var(--c); filter: brightness(.62) saturate(1.4); border-bottom: 2px solid var(--c); font-style: normal; font-size: 15px; text-transform: uppercase; letter-spacing: .05em; }
#guia h4.glgrupo small { text-transform: none; letter-spacing: 0; font-size: 12.5px; font-weight: 400; color: #3a2616; }
#guia .glista { display: flex; flex-direction: column; }
#guia .gl { display: grid; grid-template-columns: 30px 46px minmax(0, 1fr) 76px 84px 104px; align-items: center; gap: 0 10px; width: 100%; padding: 4px 6px; border: 0; border-bottom: 1px solid #6b4a2b26; background: none; color: inherit; font: inherit; font-size: 14px; text-align: left; cursor: pointer; border-radius: 4px; }
#guia button.gl:hover, #guia button.gl:focus-visible { background: #6b4a2b14; outline: none; }
#guia .gl.un { cursor: default; opacity: .5; padding-top: 1px; padding-bottom: 1px; }
#guia .gl.un .glret { width: 26px; height: 26px; font-size: 14px; justify-self: center; } #guia .gl.un .glnome { flex-direction: row; gap: 8px; align-items: baseline; }
#guia .gln { color: #6b4a2b; font-size: 12px; text-align: right; }
#guia .gl .glret { width: 42px; height: 42px; float: none; margin: 0; border-radius: 50%; background: radial-gradient(ellipse at 50% 62%, #a8cf8a 0%, #cfe2a8 46%, transparent 70%); }
#guia .gl span.glret { display: flex; align-items: center; justify-content: center; font: 700 20px Georgia, serif; color: #8a7a5a; background: repeating-linear-gradient(45deg, #e6dcc0 0 5px, #efe6cf 5px 10px); }
#guia .glnome { display: flex; flex-direction: column; min-width: 0; }
#guia .glnome b { font-style: italic; font-size: 15.5px; color: #4a2c14; } #guia .glnome small { font-size: 12px; opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#guia .glnat { font-size: 12px; font-weight: 700; padding: 2px 6px; border-radius: 10px; border-left: 4px solid var(--c); background: #fbf5e4; text-align: left; white-space: nowrap; }
#guia .glest { color: #b07800; letter-spacing: 1px; white-space: nowrap; font-size: 13px; }
#guia .glst { font-size: 12px; white-space: nowrap; } #guia .glst.registrado { color: #2f6b2a; font-weight: 700; } #guia .glst.observado { color: #8a3d1c; } #guia .glst.visto { opacity: .7; }
#guia .gficha { grid-template-columns: 1fr; }
/* Ajuda por assuntos (ui.ajuda): grade de cartões e página curta, no papel do Guia */
/* "Seus Animas" (src/plantel.js): filtros, grade de cartões, ficha, troca e comparação, no papel do Guia */
#guia .pl-filtros { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin: 8px 0 4px; font-size: 13.5px; }
#guia .pl-filtros input[type=search] { flex: 1 1 180px; padding: 6px 10px; border-radius: 6px; border: 1px solid #6b4a2b88; background: #fbf5e4; color: #3a2616; font: inherit; }
#guia .pl-filtros select { margin-left: 4px; padding: 4px 6px; border-radius: 6px; border: 1px solid #6b4a2b88; background: #fbf5e4; color: #3a2616; font: inherit; }
#guia .pl-filtros label { display: flex; align-items: center; gap: 4px; cursor: pointer; }
#guia .pl-nats { display: flex; flex-wrap: wrap; gap: 5px; margin: 4px 0 8px; }
#guia .pl-natf { font: inherit; font-size: 12.5px; font-weight: 700; padding: 3px 10px; border-radius: 12px; border: 1px solid #6b4a2b66; border-left: 5px solid var(--c, #6b4a2b); background: #fbf5e4; color: #3a2616; cursor: pointer; }
#guia .pl-natf.on { background: #8a3d1c; color: #fbf5e4; } #guia .pl-natf.limpar { border-left-width: 1px; font-weight: 400; }
#guia .pl-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
#guia .pl-card { display: flex; gap: 8px; align-items: center; text-align: left; padding: 6px 10px 6px 6px; border-radius: 8px; border: 1px solid #6b4a2b55; border-left: 5px solid #6b4a2b55;
  background: #fbf5e4; color: #3a2616; font: inherit; cursor: pointer; min-width: 0; }
#guia .pl-card.equipe { border-left-color: #2f6b2a; } #guia .pl-card:hover { background: #f3e8c8; }
#guia .pl-card.bloq { opacity: .5; } #guia .pl-card.bloq:hover { background: #fbf5e4; }
#guia .pl-card .ret { width: 52px; height: 52px; flex: 0 0 52px; border-radius: 50%; background: radial-gradient(ellipse at 50% 62%, #a8cf8a 0%, #cfe2a8 46%, transparent 70%); }
#guia .pl-txt { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
#guia .pl-txt b { font-size: 15px; font-style: italic; color: #4a2c14; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.2; } /* (até duas linhas: nomes com fase e cor rara não cabiam numa só no celular) */
#guia .pl-txt small { font-size: 12px; opacity: .85; }
#guia .pl-tags { display: flex; flex-wrap: wrap; gap: 3px 6px; align-items: center; margin-top: 2px; }
#guia .pl-tags i { font-style: normal; font-size: 11.5px; font-weight: 700; }
#guia .pl-nat { padding: 0 6px; border-radius: 8px; border-left: 4px solid var(--c); background: #f1e7cd; }
#guia .pl-rar { filter: brightness(.6) saturate(1.5); letter-spacing: -1px; }
#guia .pl-s { color: #6b4a2b; } #guia .pl-s.lider { color: #9a6a00; } #guia .pl-s.melhor { color: #9a6a00; } #guia .pl-s.casal { color: #b0306a; }
#guia .pl-motivo { color: #8a3d1c; font-style: italic; }
#guia .pl-dif { font-weight: 700; } #guia .pl-dif.mais { color: #2f6b2a; } #guia .pl-dif.menos { color: #a03020; }
#guia .pl-msg { background: #e8f0d8; border: 1px solid #2f6b2a66; border-radius: 6px; padding: 6px 10px; font-size: 14px; }
#guia .pl-fic p { margin: 4px 0; }
#guia .pl-acoes { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
#guia .pl-acao { font: inherit; font-size: 14px; padding: 8px 14px; border-radius: 8px; border: 1px solid #6b4a2b; background: #6b4a2b; color: #f6eedb; cursor: pointer; }
#guia .pl-acao.perigo { background: #fbf5e4; color: #a03020; border-color: #a03020; }
#guia .pl-cmp { display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: flex-start; }
#guia .pl-cmp-g { flex: 0 0 auto; text-align: center; } #guia .pl-cmp-g .fa-radar { width: 150px; height: 150px; }
#guia .pl-cmp-g .fa-grade { fill: none; stroke: currentColor; stroke-opacity: .2; }
#guia .pl-leg { font-size: 12px; display: flex; flex-direction: column; gap: 3px; align-items: flex-start; margin: 4px 0 0; }
#guia .pl-leg i { display: inline-block; width: 18px; height: 10px; margin-right: 5px; border-radius: 3px; vertical-align: middle; }
#guia .pl-leg i.tr { background: none; border: 2px dashed; height: 8px; }
#guia .pl-tab { border-collapse: collapse; font-size: 14px; flex: 1 1 300px; }
#guia .pl-tab th, #guia .pl-tab td { padding: 4px 10px; border-bottom: 1px solid #6b4a2b26; text-align: left; }
#guia .pl-tab th small { display: block; font-weight: 400; font-size: 11.5px; opacity: .75; }
#guia .pl-tab td.pl-mais { font-weight: 800; color: #2f6b2a; } #guia .pl-tab td.pl-mais::after { content: ' ▲'; font-size: 10px; }
.opt.pl-abrir { border-color: #ffd16688; }
#guia .ajgrade { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; margin-top: 8px; }
#guia .ajt { display: flex; gap: 10px; align-items: center; text-align: left; padding: 10px 12px; border-radius: 8px; border: 1px solid #6b4a2b55; border-left: 5px solid #8a3d1c;
  background: #fbf5e4; color: #3a2616; font: inherit; cursor: pointer; }
#guia .ajt:hover, #guia .ajt:focus-visible { background: #f3e8c8; outline: none; }
#guia .ajt .aji { font-size: 26px; flex: 0 0 34px; text-align: center; }
#guia .ajt b { display: block; font-size: 16px; font-style: italic; color: #4a2c14; } #guia .ajt small { display: block; font-size: 12.5px; opacity: .8; margin-top: 2px; }
#guia .ajpag { position: relative; padding: 12px 16px; } #guia .ajpag p { font-size: 15.5px; line-height: 1.5; margin: 0 0 10px; }
#guia .ajpag.lista p:not(:first-child):not(:last-child) { margin: 0 0 6px; padding-left: 10px; border-left: 3px solid #6b4a2b44; font-size: 14.5px; }
#guia .ajouvir { float: right; margin: 0 0 6px 10px; padding: 5px 12px; border-radius: 16px; border: 1px solid #6b4a2b88; background: #fbf5e4; color: #3a2616; font: inherit; font-size: 14px; cursor: pointer; }
#guia .ajprox { display: block; margin: 10px 0 4px auto; padding: 8px 14px; border-radius: 8px; border: 1px solid #6b4a2b; background: #6b4a2b; color: #f6eedb; font: inherit; font-size: 14px; cursor: pointer; }
body.letra-grande #guia .ajpag p { font-size: 18px; } body.letra-grande #guia .ajt b { font-size: 18px; }
@media (max-width: 640px) {
  #guia .gl { grid-template-columns: 24px 40px minmax(0, 1fr) 70px; row-gap: 2px; }
  #guia .gl .glret { width: 38px; height: 38px; grid-row: span 2; } #guia .gln { grid-row: span 2; }
  #guia .glnat { grid-column: 3; justify-self: start; } #guia .glest { grid-column: 4; grid-row: 1; } #guia .glst { grid-column: 4; justify-self: end; } #guia .glst small { display: none; }
}
@media (max-height: 520px) { /* celular deitado: o topo fixo do Guia fica baixo, com as abas numa linha que rola de lado */
  #guia .gtopo { padding-top: 8px; } #guia .gtopo h3 { font-size: 19px; padding-bottom: 2px; } #guia .gtopo .gclose { padding: 3px 10px; }
  #guia .gtopo .tabs { flex-wrap: nowrap; overflow-x: auto; margin-top: 6px; padding-bottom: 4px; scrollbar-width: thin; }
  #guia .gtopo .tab { white-space: nowrap; font-size: 12px; padding: 3px 8px; }
}
body.letra-grande #guia .gl { font-size: 16px; } body.letra-grande #guia .glnome b { font-size: 17.5px; } body.letra-grande #guia .glnome small { font-size: 14px; }
/* a ilustração: o Anima desenhado sobre uma aguada de aquarela */
#guia .gc .ret.fruto { float: none; display: inline-block; vertical-align: middle; width: 34px; height: 34px; margin: 0 6px 0 0; background: none; }
#guia .gc .ret {background: radial-gradient(ellipse at 50% 62%, #a8cf8a 0%, #cfe2a8 46%, transparent 70%); border-radius: 50%; width: 84px; height: 84px; }

/* Cartão de atributos (src/ficha.js): gráfico de quatro pontas, barras com a palavra e etiquetas. Usa a cor do texto em
   volta, então serve no papel do Guia e no painel escuro da Equipe. */
.fa { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; overflow: hidden; margin: 8px 0; }
.fa-radar { flex: 0 0 auto; overflow: visible; width: 124px; height: 124px; }
.fa-corpo { --c: initial; } /* (sem a cor da Natureza do quadro em volta: as cores claras sumiam no papel do Guia) */
.fa-radar .fa-grade { fill: none; stroke: currentColor; stroke-opacity: .2; stroke-width: 1; }
.fa-radar .fa-medio { fill: none; stroke: currentColor; stroke-opacity: .5; stroke-dasharray: 3 3; stroke-width: 1.2; }
.fa-radar text { font-size: 11px; }
.fa-barras { flex: 1 1 230px; min-width: 210px; display: flex; flex-direction: column; gap: 6px; }
.fa-lin { display: grid; grid-template-columns: 112px minmax(60px, 1fr) 72px auto; align-items: center; gap: 8px; font-size: 13px; line-height: 1.2; }
.fa-nome { font-weight: 700; white-space: nowrap; }
.fa-bar { height: 10px; border-radius: 5px; background: rgba(127, 127, 127, .22); overflow: hidden; }
.fa-bar i { display: block; height: 100%; border-radius: 5px; }
.fa-pal { font-size: 12px; opacity: .8; white-space: nowrap; }
.fa-tal { display: inline-flex; gap: 2px; } .fa-tal i { width: 7px; height: 7px; border-radius: 50%; background: linear-gradient(90deg, #e9b43a var(--p, 0%), rgba(127, 127, 127, .3) var(--p, 0%)); }
.fa-etqs { flex: 1 1 100%; display: flex; flex-wrap: wrap; gap: 5px; }
.fa-etq { font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 11px; border: 1px solid var(--c, rgba(127, 127, 127, .45)); color: var(--c, inherit); background: rgba(127, 127, 127, .08); white-space: nowrap; }
.fa-etq small { font-weight: 400; opacity: .85; }
.fa-est { color: #d9a21c; letter-spacing: 1px; border-color: #d9a21c88; }
.fa-hab { flex: 1 1 100%; font-size: 13px; line-height: 1.35; padding: 5px 9px; border-radius: 8px; border-left: 4px solid var(--nat); background: rgba(127, 127, 127, .1); }
.fa.mini .fa-radar { width: 86px; height: 86px; } .fa.mini .fa-lin { grid-template-columns: 104px minmax(50px, 1fr) 66px auto; font-size: 12px; }
#guia .gc .fa b { font-size: 13px; font-style: normal; color: inherit; }
#guia .fa-etq[style*="--c"] { filter: brightness(.6) saturate(1.5); } #guia .fa-est { color: #9a6a00; border-color: #9a6a0088; }
.opt .fa b { display: inline; } .opt .fa small { display: inline; margin: 0; } .opt .fa { margin: 6px 0 4px; }
body.letra-grande .fa-lin { font-size: 15px; grid-template-columns: 132px minmax(60px, 1fr) 84px auto; } body.letra-grande .fa-etq, body.letra-grande .fa-hab { font-size: 14px; }
/* a foto real do animal de referência, como uma fotografia colada na página */
.fotoreal { float: right; clear: right; margin: 4px 0 6px 10px; width: 132px; background: #fffdf6; padding: 5px 5px 3px; border: 1px solid #6b4a2b44; box-shadow: 2px 3px 6px #0005; transform: rotate(1.6deg); position: relative; }
.fotoreal::before { content: ''; position: absolute; top: -8px; left: 38px; width: 54px; height: 15px; background: #e8d9a8cc; transform: rotate(-3deg); box-shadow: 0 1px 2px #0003; }
.fotoreal img { display: block; width: 100%; height: auto; max-height: 190px; object-fit: contain; background: #ddd2b4; } /* a foto inteira, sem recorte: em foto em pé o recorte tirava o bicho de cena */
.fotoreal figcaption { font: 9px/1.25 system-ui, sans-serif; color: #5a4630; margin-top: 3px; word-break: break-word; }
body.toque .fotoreal { width: 108px; } body.toque .fotoreal img { max-height: 150px; }
/* a foto tirada no jogo: quando é a foto real, não ganha o fundo pintado */
#dImg.real { object-fit: contain; background: #ddd2b4; }

/* ---------- Tela inicial: a capa do caderno de campo (src/abertura.js) ---------- */
#abertura { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; background: radial-gradient(ellipse at center, #2b1a1055, #2b1a10cc); padding: 10px; }
#abertura.hidden { display: none; }
:is(#abertura, #pausa) .folha { width: min(520px, 96vw); max-height: 96vh; overflow-y: auto; overflow-x: hidden; touch-action: pan-y; box-sizing: border-box; padding: 20px 26px 16px; color: #3a2616; font-family: Georgia, 'Times New Roman', serif;
  background: #f1e7cd; background-image: radial-gradient(#00000009 1px, transparent 1.4px), linear-gradient(#f6eedb, #ecdfc0); background-size: 7px 7px, 100% 100%;
  border: 2px solid #6b4a2b; border-radius: 6px 14px 14px 6px; box-shadow: inset 14px 0 18px -12px #6b4a2b66, 0 12px 40px #000a; }
#abertura .capa { text-align: center; }
#abertura h1 { margin: 6px 0 0; font-size: clamp(30px, 11vw, 50px); letter-spacing: .16em; text-indent: .16em; color: #4a2c14; }
:is(#abertura, #pausa) h2 { margin: 0 0 12px; font-size: 24px; color: #4a2c14; border-bottom: 2px solid #6b4a2b55; padding-bottom: 6px; }
#abertura .subt { margin: 0; font-size: 20px; font-style: italic; color: #8a4a1c; }
#abertura .lema { margin: 6px 0 14px; font-size: 13px; color: #6b4a2b; }
#abertura .pe { margin: 12px 0 0; font-size: 12px; font-style: italic; color: #6b4a2bcc; }
#abertura .marca { display: flex; gap: 7px; justify-content: center; }
#abertura .marca i { width: 13px; height: 13px; background: #e0a02a; border: 2px solid #2b1a10; transform: rotate(45deg); }
#abertura .marca i:nth-child(2) { width: 17px; height: 17px; margin-top: -2px; }
#abertura .lista, :is(#abertura, #pausa) .corpo { display: flex; flex-direction: column; gap: 8px; }
:is(#abertura, #pausa) .corpo p { margin: 0; font-size: 15px; line-height: 1.45; }
:is(#abertura, #pausa) .ab { display: block; width: 100%; text-align: left; cursor: pointer; font-family: inherit; color: #3a2616; background: #fbf5e4; border: 2px solid #6b4a2b; border-radius: 8px; padding: 9px 14px; }
:is(#abertura, #pausa) .ab b { display: block; font-size: 17px; } :is(#abertura, #pausa) .ab small { display: block; font-size: 12px; color: #6b4a2b; margin-top: 2px; }
:is(#abertura, #pausa) .ab:hover, :is(#abertura, #pausa) .ab:focus-visible { background: #fff9e8; outline: 2px solid #e0a02a; }
:is(#abertura, #pausa) .ab.forte { background: #6b4a2b; color: #f6eedb; border-color: #2b1a10; } :is(#abertura, #pausa) .ab.forte small { color: #ecdfc0; } :is(#abertura, #pausa) .ab.forte:hover { background: #7d5833; }
:is(#abertura, #pausa) .ab.perigo { border-color: #a03322; } :is(#abertura, #pausa) .ab.perigo b { color: #a03322; }
:is(#abertura, #pausa) .ab.apagado { opacity: .6; }
:is(#abertura, #pausa) .ab.fino { width: auto; display: inline-block; padding: 7px 18px; }
:is(#abertura, #pausa) .rodape { margin-top: 14px; display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
#abertura .campo small { display: block; font-size: 12px; font-weight: normal; color: #6b4a2b; margin-top: 2px; }
@media (max-height: 520px) { #abertura .novo > .voz-oferta { grid-column: 1 / -1; } }
#abertura .campo { display: block; font-size: 15px; font-weight: bold; }
#abertura input { display: block; width: 100%; box-sizing: border-box; margin-top: 4px; font: inherit; font-size: 19px; font-weight: normal; color: #3a2616; background: #fffaf0; border: 2px solid #6b4a2b; border-radius: 8px; padding: 7px 10px; user-select: text; -webkit-user-select: text; }
#abertura .cores { display: flex; gap: 8px; margin-top: 5px; flex-wrap: wrap; }
#abertura .cor { width: 34px; height: 34px; border-radius: 50%; border: 2px solid #2b1a10; cursor: pointer; padding: 0; }
#abertura .cor.on { outline: 3px solid #e0a02a; outline-offset: 2px; }
#abertura .boneco3d { display: block; width: 130px; height: 150px; margin: 4px auto 0; object-fit: contain; }
#abertura .boneco { position: relative; width: 60px; height: 84px; margin: 2px auto 0; }
#abertura .boneco i { position: absolute; left: 50%; transform: translateX(-50%); border: 2px solid #2b1a10; }
#abertura .boneco .cab { top: 0; width: 34px; height: 22px; border-radius: 17px 17px 6px 6px; z-index: 2; }
#abertura .boneco .rosto { top: 12px; width: 28px; height: 24px; border-radius: 12px; background: #e9b98f; z-index: 1; }
#abertura .boneco .corpo2 { top: 36px; width: 44px; height: 44px; border-radius: 16px 16px 8px 8px; }
:is(#abertura, #pausa) .aviso { min-height: 18px; font-size: 13px !important; color: #a03322; }
#abertura .aviso.dica-ios { color: #4a3b22; background: #f3e6c4; border-left: 3px solid #c08a52; padding: 6px 10px; margin: 8px 0 0; border-radius: 4px; }
body.toque #abertura .folha { padding: 12px 18px 10px; } body.toque #abertura h1 { font-size: 36px; } body.toque #abertura .lema, body.toque #abertura .pe { display: none; }
@media (max-height: 520px) { #abertura .capa .lista { display: grid; grid-template-columns: 1fr 1fr; } #abertura .capa .lista .forte { grid-column: 1 / -1; } #abertura .ab small { display: none; } #abertura .ab.forte small { display: block; } }@media (max-height: 520px) {
  #abertura .folha { width: min(720px, 96vw); padding: 10px 18px 8px; } #abertura h2 { font-size: 19px; margin-bottom: 6px; padding-bottom: 3px; }
  #abertura .novo { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; } #abertura .novo > label, #abertura .novo > .aviso { grid-column: 1 / -1; }
  #abertura .novo .boneco { display: none; } #abertura .cor { width: 30px; height: 30px; } #abertura input { font-size: 17px; padding: 5px 10px; } #abertura .rodape { margin-top: 6px; }
  #abertura .corpo p { font-size: 13.5px; line-height: 1.35; }
}
/* ===== Palco: a história na tela (ver src/palco.js). Fica por trás da caixa de fala. ===== */
/* A cena é desenhada em 3D no próprio canvas do jogo (src/estudio.js); o palco é só a moldura de cinema por cima:
   faixas pretas em cima e embaixo, um leve escurecido nas bordas, e o fundo escuro nas cartas. */
#palco { position: fixed; inset: 0; z-index: 8; background: transparent; cursor: pointer; }
#palco::before, #palco::after { content: ''; position: absolute; left: 0; right: 0; height: 7vh; background: #000; pointer-events: none; }
#palco::before { top: 0; } #palco::after { bottom: 0; }
#palco.hidden { display: none; }
#palco.sem3d { background: #0b1016; }
#palco.carta { background: radial-gradient(ellipse at center, rgba(11, 16, 22, .55), rgba(11, 16, 22, .86)); }
/* Enquanto a cena passa, o que é do jogo (mapa, dicas, botões de toque) sai da frente */
body:has(#palco:not(.hidden)) :is(#whud, #mini, #prompt, #toque, #rede-selo, #rede-conta),
body:has(#cena.on.tres) :is(#whud, #mini, #prompt, #toque, #rede-selo, #rede-conta, #dialog) { visibility: hidden; }
#dialog { z-index: 9; }
/* Cartas: o envelope aparece, e a folha sobe de dentro dele e se abre */
#palcoCarta { position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%); width: min(620px, 90vw); }
#palcoCarta.hidden { display: none; }
#palcoCarta .envelope { position: absolute; left: 50%; bottom: -34px; width: 62%; height: 84px; transform: translateX(-50%); background: #d8c49a; border: 2px solid #5a4630; border-radius: 6px; box-shadow: 0 8px 24px #0008; }
#palcoCarta .envelope i { position: absolute; left: 0; right: 0; top: 0; height: 0; border-left: 190px solid transparent; border-right: 190px solid transparent; border-top: 46px solid #c8b084; width: 0; margin: 0 auto; transform-origin: top; }
#palcoCarta .papel { position: relative; background: #f6efdc; color: #2a2118; border: 1px solid #b8a67e; border-radius: 4px; padding: 18px 22px 12px; box-shadow: 0 10px 30px #000a;
  font-family: Georgia, 'Times New Roman', serif; max-height: 58vh; display: flex; flex-direction: column;
  background-image: repeating-linear-gradient(#0000 0 27px, #b8a67e55 27px 28px); }
#palcoCarta .papel h4 { margin: 0 0 8px; font-size: clamp(15px, 2.4vw, 20px); color: #7a4a22; font-style: italic; }
#palcoCarta .papel .corpo { overflow-y: auto; }
#palcoCarta .papel .corpo p { margin: 0 0 10px; font-size: clamp(14px, 2.1vw, 18px); line-height: 28px; font-style: italic; animation: cartaLinha .5s ease both; }
#palcoCarta .papel .ps { margin: 4px 0 0; text-align: right; font-size: 11px; opacity: .55; }
#palcoCarta.abrindo .papel { animation: cartaSobe .9s cubic-bezier(.2, .9, .3, 1) both; }
#palcoCarta.abrindo .envelope i { animation: cartaAba .5s ease both; }
@keyframes cartaSobe { 0% { transform: translateY(60%) scale(.25, .12) rotate(-6deg); opacity: 0; } 55% { opacity: 1; } 100% { transform: none; opacity: 1; } }
@keyframes cartaAba { 0% { transform: scaleY(1); } 100% { transform: scaleY(-1); } }
@keyframes cartaLinha { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
/* Com o palco aberto, a caixa de fala fica mais discreta nas cartas (o texto está na folha) */
#palco.carta ~ #dialog, body:has(#palco.carta) #dialog { background: rgba(10, 14, 22, .78); }
/* ===== Caderno: fichas ilustradas (missões, você, mochila) ===== */
#guia .mcs { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
#guia .mc { display: flex; gap: 12px; align-items: center; background: #fbf6e6; border: 1px solid #c9b98f; border-left: 5px solid #c9a36a; border-radius: 8px; padding: 8px 12px; color: #2a2118; }
#guia .mc img, #guia .mc .mc-q { width: 54px; height: 54px; flex: 0 0 54px; border-radius: 50%; object-fit: cover; background: #efe6cf; border: 2px solid #5a4630; }
#guia .mc .mc-q { display: flex; align-items: center; justify-content: center; font: 700 28px Georgia, serif; color: #8a7a5a; font-style: normal; background: repeating-linear-gradient(45deg, #e6dcc0 0 6px, #efe6cf 6px 12px); }
#guia .mc span { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
#guia .mc b { font-size: 15px; } #guia .mc small { font-size: 12.5px; opacity: .85; line-height: 1.35; }
#guia .mc.feito { border-left-color: #6fb05a; opacity: .78; } #guia .mc.misterio { border-left-color: #8a7a5a; border-style: dashed; color: #6a5c40; }
#guia .mc.apagado { opacity: .5; }
#guia .mc-barra { height: 7px; background: #d8ccaa; border-radius: 4px; overflow: hidden; margin-top: 4px; } #guia .mc-barra i { display: block; height: 100%; border-radius: 4px; }
#guia .mc-eu { display: flex; gap: 16px; align-items: center; background: #fbf6e6; border: 1px solid #c9b98f; border-radius: 12px; padding: 12px 16px; color: #2a2118; }
#guia .mc-eu img { width: 110px; height: 110px; border-radius: 50%; border: 3px solid #5a4630; }
#guia .mc-eu span { display: flex; flex-direction: column; gap: 4px; flex: 1; } #guia .mc-eu b { font-size: 22px; } #guia .mc-eu em { font-size: 15px; color: #7a4a22; }
#guia .mc-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
#guia .mc-grade.grande { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
#guia .mc-num { background: #fbf6e6; border: 1px solid #c9b98f; border-top: 5px solid var(--c, #c9a36a); border-radius: 8px; padding: 8px 10px; text-align: center; color: #2a2118; }
#guia .mc-num b { display: block; font: 700 26px Georgia, serif; } #guia .mc-num small { font-size: 12px; } #guia .mc-num p { margin: 6px 0 0; font-size: 12px; text-align: left; opacity: .85; }
#guia .mc-fila { display: flex; gap: 8px; flex-wrap: wrap; } #guia .mc-fila img { width: 72px; height: 72px; border-radius: 10px; background: #efe6cf; border: 2px solid #5a4630; object-fit: cover; }#dialog.carta { width: auto; min-width: 240px; padding: 8px 18px; text-align: center; } #dialog.carta #dText, #dialog.carta #dName, #dialog.carta #dImg { display: none; }
#dialog.carta::before { content: 'Toque para continuar a leitura'; font-size: 14px; opacity: .85; }
#palcoCarta.pronta .papel, #palcoCarta.pronta .papel .corpo p { animation: none; } #palcoCarta.pronta .envelope i { animation: none; transform: scaleY(-1); }
#guia .mc-fila.album { flex-wrap: wrap; gap: 6px; } #guia .mc-fila.album img { width: 54px; height: 54px; }
/* ---------- Abertura: marca da Épiro Games e o convite para se tornar naturalista (src/convite.js) ---------- */
#convite { position: fixed; inset: 0; z-index: 70; background: #07090d; color: #f6efdc; overflow: hidden; cursor: pointer; animation: cvEntra .5s ease both; }
#convite.saindo { animation: cvSai .45s ease both; }
#convite.tres { background: transparent; } /* cenas do filme encenadas em 3D no canvas do jogo (src/convite.js) */
#convite .cv-cena.tres { background: none; }
body.com-convite > :not(#convite):not(#game) { visibility: hidden !important; } /* a tela inicial espera atrás */
@keyframes cvEntra { from { opacity: 0; } to { opacity: 1; } }
@keyframes cvSai { to { opacity: 0; } }
#convite .cv-palco { position: absolute; inset: 0; }
#convite .cv-faixa { position: absolute; left: 0; right: 0; height: 0; background: #000; z-index: 3; transition: height .9s ease; }
#convite .cv-faixa.cima { top: 0; } #convite .cv-faixa.baixo { bottom: 0; }
#convite.letterbox .cv-faixa { height: 9vh; }
#convite .cv-pular { position: absolute; right: 16px; bottom: calc(9vh + 12px); z-index: 4; background: rgba(0,0,0,.35); color: #f6efdc; border: 1px solid #f6efdc55; border-radius: 999px; padding: 7px 16px; font: 700 14px system-ui, sans-serif; cursor: pointer; }
#convite:not(.letterbox) .cv-pular { bottom: 16px; }
/* marca */
#convite .cv-marca { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; animation: cvMarca 4.2s ease both; }
@keyframes cvMarca { 0% { opacity: 0; transform: scale(.96); } 18% { opacity: 1; transform: none; } 80% { opacity: 1; } 100% { opacity: 0; } }
#convite .cv-logo { width: clamp(96px, 22vmin, 170px); height: auto; margin-bottom: 6px; filter: drop-shadow(0 6px 18px #0006); }
#convite .cv-nome { font: 800 clamp(34px, 8vmin, 64px)/1 'Baloo 2', Nunito, system-ui, sans-serif; letter-spacing: -.01em; color: #fff8ec; }
#convite .cv-nome span { color: #ff6b5b; }
#convite .cv-lema { font: 800 clamp(10px, 1.9vmin, 14px) Nunito, system-ui, sans-serif; letter-spacing: .26em; text-transform: uppercase; color: #c08a52; }
#convite .cv-apresenta { margin-top: 22px; font: italic 600 clamp(14px, 2.4vmin, 18px) Georgia, serif; color: #f6efdcaa; letter-spacing: .08em; }
/* cenas */
#convite .cv-cena { position: absolute; inset: 0; overflow: hidden; background: linear-gradient(var(--c1), var(--c2) 62%, var(--chao) 62%); animation: cvCena 1.2s ease both; }
@keyframes cvCena { from { opacity: 0; } to { opacity: 1; } }
#convite .cv-cena::after { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 40%, transparent 40%, rgba(0,0,0,.55)); pointer-events: none; }
#convite .cv-cena.escuro { background: linear-gradient(#2a2e33, #4a4a44 62%, #2e2a24 62%); } #convite .cv-cena.escuro .cv-sol, #convite .cv-cena.escuro .cv-serra, #convite .cv-cena.escuro .cv-chao { filter: saturate(.2) brightness(.5); }
#convite .cv-sol { position: absolute; width: 22vmin; height: 22vmin; border-radius: 50%; left: 68%; top: 14%; background: radial-gradient(#fff6d8, #ffd77a 55%, transparent 70%); opacity: .85; }
#convite .cv-serra { position: absolute; left: -10%; right: -10%; bottom: 38%; height: 26%; background: var(--folha); opacity: .55; clip-path: polygon(0 100%, 8% 40%, 18% 70%, 30% 20%, 42% 65%, 55% 30%, 68% 72%, 80% 25%, 92% 60%, 100% 35%, 100% 100%); animation: cvPan 26s linear both; }
#convite .cv-serra.s2 { bottom: 34%; height: 18%; opacity: .85; filter: brightness(.7); clip-path: polygon(0 100%, 10% 55%, 22% 80%, 35% 40%, 50% 75%, 63% 45%, 77% 82%, 90% 50%, 100% 70%, 100% 100%); animation-duration: 18s; }
#convite .cv-chao { position: absolute; left: 0; right: 0; bottom: 0; height: 38%; background: linear-gradient(var(--chao), color-mix(in srgb, var(--chao) 60%, #000)); }
@keyframes cvPan { from { transform: translateX(0); } to { transform: translateX(-6%); } }
#convite .cv-bichos { position: absolute; left: 0; right: 0; bottom: 30%; display: flex; justify-content: center; align-items: flex-end; gap: 2vw; z-index: 1; }
#convite .cv-bichos img { width: clamp(130px, 30vmin, 290px); height: auto; filter: drop-shadow(0 10px 12px rgba(0,0,0,.45)); opacity: 0; animation: cvBicho 1s ease both; animation-delay: calc(.5s + var(--k) * .45s); }
@keyframes cvBicho { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
#convite .cv-ancora { position: absolute; left: 50%; top: 30%; transform: translate(-50%, -50%); font-size: clamp(80px, 22vmin, 180px); color: #111; filter: grayscale(1) brightness(.2) drop-shadow(0 0 18px rgba(255,255,255,.25)); z-index: 1; opacity: 0; animation: cvBicho 1.6s ease .6s both; }
#convite .cv-texto { position: absolute; left: 50%; bottom: calc(9vh + 54px); transform: translateX(-50%); width: min(820px, 88vw); margin: 0; z-index: 2; text-align: center; font: 600 clamp(17px, 2.9vmin, 26px)/1.45 Georgia, 'Times New Roman', serif; color: #fff8ec; text-shadow: 0 2px 10px #000, 0 0 2px #000; opacity: 0; animation: cvTexto 1.2s ease .35s both; }
@keyframes cvTexto { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }
#convite .cv-titulo { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 2; opacity: 0; animation: cvBicho 1.6s ease 2.2s both; padding-bottom: 12vh; }
#convite .cv-titulo h1 { margin: 0; font: 900 clamp(56px, 15vmin, 140px)/1 Georgia, serif; letter-spacing: .14em; color: #fff8ec; text-shadow: 0 6px 24px rgba(0,0,0,.6); }
#convite .cv-titulo p { margin: 4px 0 26px; font: italic 600 clamp(18px, 3.4vmin, 30px) Georgia, serif; color: #f2d24a; text-shadow: 0 2px 10px #000; }
#convite .cv-aceitar { font: 800 clamp(16px, 2.6vmin, 21px) system-ui, sans-serif; padding: 13px 30px; border-radius: 999px; border: 0; background: #e8a02a; color: #2a1c12; box-shadow: 0 5px 0 #8a5a14, 0 10px 30px rgba(0,0,0,.4); cursor: pointer; }
#convite .cv-aceitar:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { #convite *, #convite { animation-duration: .01s !important; animation-delay: 0s !important; } }@media (max-height: 520px) { #convite .cv-bichos { bottom: 44%; } #convite .cv-bichos img { width: clamp(80px, 26vmin, 150px); } #convite .cv-texto { bottom: calc(9vh + 14px); font-size: 15px; } #convite .cv-pular { bottom: 12px; } #convite .cv-titulo { padding-bottom: 20vh; } #convite .cv-titulo p { margin-bottom: 12px; } }

/* ===== Menu de pausa (src/pausa.js): o botão ⏸ e a folha do caderno com as opções ===== */
#pausaBtn, #configBtn { position: fixed; z-index: 20; top: 10px; left: 50%; transform: translateX(-50%); width: 40px; height: 40px; border-radius: 50%;
  border: 2px solid #e8ecf3; background: rgba(8, 12, 18, .62); color: #fff; font: 700 17px/1 "Segoe UI", system-ui, sans-serif; cursor: pointer; padding: 0; touch-action: manipulation; }
#configBtn { left: calc(50% + 26px); transform: none; font-size: 20px; } /* ⚙ Configurações, ao lado do ⏸ (src/pausa.js) */
#pausaBtn:hover, #configBtn:hover { background: rgba(40, 52, 70, .85); }
body.toque :is(#pausaBtn, #configBtn) { left: auto; transform: none; right: max(8px, env(safe-area-inset-right)); top: 8px; width: 44px; height: 44px; font-size: 19px; }
body.toque #configBtn { top: 60px; font-size: 22px; } /* no celular, embaixo do ⏸ (o minimapa fica à esquerda dos dois) */
body:has(#palco:not(.hidden)) :is(#pausaBtn, #configBtn), body:has(#cena.on) :is(#pausaBtn, #configBtn), body:has(#abertura:not(.hidden)) :is(#pausaBtn, #configBtn), body:has(#pausa:not(.hidden)) :is(#pausaBtn, #configBtn) { display: none; }
/* Com o Guia, a Ajuda, a Equipe ou um menu abertos, o ⏸ e o ⚙ saem: no celular eles ficavam em cima do "Fechar" */
body:has(#guia:not(.hidden)) :is(#pausaBtn, #configBtn), body:has(#party:not(.hidden)) :is(#pausaBtn, #configBtn), body:has(#choice:not(.hidden)) :is(#pausaBtn, #configBtn) { display: none; }
#pausa { position: fixed; inset: 0; z-index: 55; display: flex; align-items: center; justify-content: center; padding: 10px; background: rgba(5, 8, 12, .55); touch-action: pan-y; }
#pausa.hidden { display: none; }
#pausa .folha { max-height: 94vh; }
body.toque #pausa .folha { padding: 12px 18px 10px; }
@media (max-height: 520px) {
  #pausa .folha { width: min(720px, 96vw); padding: 10px 18px 8px; } #pausa h2 { font-size: 19px; margin-bottom: 6px; padding-bottom: 3px; }
  #pausa .corpo { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; } #pausa .corpo > .forte, #pausa .corpo > .aviso { grid-column: 1 / -1; }
  #pausa .ab { padding: 7px 12px; } #pausa .ab b { font-size: 15px; } #pausa .ab small { font-size: 11px; }
}

/* Avisos importantes (ui.toast com importante): maiores, no meio da tela, com borda dourada */
#avisos { position: fixed; top: 21%; left: 50%; transform: translateX(-50%); z-index: 25; width: min(640px, 90vw); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast.imp { font-size: 19px; padding: 11px 22px; border: 2px solid #ffd166; background: rgba(10, 14, 22, .93); border-radius: 14px; text-align: center; line-height: 1.35; box-shadow: 0 6px 20px #0008; }
body.toque #avisos { top: 27%; } body.toque .toast.imp { font-size: 16px; padding: 8px 16px; }
/* No duelo, no celular deitado: à esquerda, embaixo dos quadros, sem cobrir os golpes (à direita) nem o adversário (no meio) */
@media (orientation: landscape) {
  body.toque:has(#hud:not(.hidden)) #avisos { top: 176px; left: max(10px, env(safe-area-inset-left)); transform: none; width: calc(50vw - 34px); align-items: flex-start; }
  body.toque:has(#hud:not(.hidden)) .toast.imp { text-align: left; font-size: 15px; }
}
.toast { max-width: min(720px, 92vw); text-align: center; }

/* "Jogo salvo": sinal discreto no canto de cima, à esquerda */
#salvo { position: fixed; top: 14px; right: 112px; z-index: 21; font: 700 12px "Segoe UI", system-ui, sans-serif; color: #bff5c8; background: rgba(8, 12, 18, .7);
  border: 1px solid #7ad08a88; border-radius: 20px; padding: 4px 11px; opacity: 0; pointer-events: none; }
#salvo.on { animation: salvo 2.4s ease both; } @keyframes salvo { 0% { opacity: 0; transform: translateY(-4px); } 12%, 75% { opacity: 1; transform: none; } 100% { opacity: 0; } }
body:has(#hud:not(.hidden)) #salvo { display: none; }
body.toque #salvo { right: calc(max(8px, env(safe-area-inset-right)) + 54px); top: 18px; }
@media (orientation: landscape) { body.toque #salvo { right: calc(max(8px, env(safe-area-inset-right)) + 62px); top: 128px; } } /* (embaixo do minimapa redondo) */

/* Caixa de fala: "ouvir de novo" ao lado do alto-falante */
#dOuvir { position: absolute; right: 56px; top: 8px; width: 40px; height: 40px; border-radius: 50%; border: 2px solid #e8ecf3;
  background: rgba(255, 255, 255, .08); color: #fff; font-size: 21px; line-height: 1; cursor: pointer; opacity: .8; padding: 0; }
#dOuvir:hover { opacity: 1; background: rgba(255, 255, 255, .18); }
#dialog:has(#dOuvir) #dText { padding-right: 90px; }
#dialog.carta #dOuvir, #dialog.carta #dVoz { top: 50%; transform: translateY(-50%); }
#dialog.carta:has(#dOuvir) { padding-right: 104px; }

/* Barra de baixo do mundo: o objetivo em linha própria, maior; relógio, clima e frutos embaixo, menores */
#whud { white-space: normal; width: max-content; max-width: min(900px, 80vw); text-align: center; }
#whud .obj { display: block; font-size: 15px; font-weight: 700; color: #ffe9a8; }
#whud { cursor: pointer; } /* tocar na linha do objetivo mostra a seta por alguns segundos */
/* Textos compactos (Configurações > Textos na tela): o objetivo encolhe para uma linha cortada com "…" depois de alguns
   segundos, e embaixo ficam só relógio, clima e frutos. Tocar mostra tudo de novo. */
#whud.curto { max-width: min(560px, 60vw); padding-top: 4px; padding-bottom: 4px; }
#whud.curto .obj { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.toque #whud.curto { max-width: min(440px, 50vw); }
body.toque #whud.curto .obj { font-size: 12.5px; } body.toque #whud.curto .info { font-size: 10px; }
#whud .info { display: block; font-size: 12px; opacity: .85; margin-top: 1px; }
body.toque #whud .obj { font-size: 13.5px; } body.toque #whud .info { font-size: 10.5px; }
/* Celular deitado: a barra do objetivo fica à esquerda, sem chegar no minimapa (no canto de cima, ao lado do ⏸) */
@media (orientation: landscape) {
  body.toque #whud { left: max(10px, env(safe-area-inset-left)); transform: none; max-width: calc(100vw - 198px - env(safe-area-inset-right)); text-align: left; }
}

/* Quadro do seu Anima no duelo: cada barra com o nome dela */
.lin { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.lin > span { flex: 0 0 64px; font-size: 11px; font-weight: 700; opacity: .9; white-space: nowrap; }
.lin .bar { flex: 1; margin-top: 0; }
body.toque .lin { margin-top: 2px; } body.toque .lin > span { flex-basis: 54px; font-size: 10px; }
.lin > span b { font-weight: inherit; } .lin > span em { font-style: normal; }

/* Quadros do duelo compactos (Configurações > Textos na tela; ver Battle.start): depois dos primeiros segundos, só
   nome, barras (com o ícone no lugar do nome da barra), PS e o que acontece. A ficha do adversário vira dois sinais ao
   lado do nome: a raridade (◆) e a situação no Guia (✚ ainda não registrado, 📷 só observado, ✔ registrado). Tocar
   num quadro abre os dois. */
.panel { cursor: pointer; }
.panel.curto .info { display: none; }
.panel.curto .lin > span, body.toque .panel.curto .lin > span { flex-basis: 16px; text-align: center; } .panel.curto .lin em { display: none; }
.panel.curto .sub > span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#eMarca { margin-left: 6px; font-size: .85em; } #eMarca:empty { display: none; }
@media (orientation: landscape) { body.toque #pPanel.curto { width: min(200px, 24vw); } body.toque #ePanel.curto { width: min(240px, 30vw); } }
#bhint.curto { display: none; }
/* Botões do duelo com quantos Selos e frutos ainda há */
.tq-b small { display: block; font-size: 9px; font-weight: 700; opacity: .85; margin-top: 1px; }
#tq-mais .tq-b small { display: inline; margin: 0 0 0 4px; font-size: 11px; }

/* Avisos e caixa de fala no celular: um pouco menores, para cobrir menos o jogo */
body.toque .toast.imp { font-size: 14.5px; padding: 7px 14px; line-height: 1.3; }
@media (orientation: landscape) { body.toque:has(#hud:not(.hidden)) #avisos { width: calc(44vw - 34px); } body.toque:has(#hud:not(.hidden)) .toast.imp { font-size: 13.5px; } }
body.toque #dialog { width: min(700px, 84vw); padding: 10px 14px 16px; } body.toque #dText { font-size: 15px; line-height: 1.4; }

/* Duelo no toque: Fruto, Trocar e Fugir ficam no botão "Mais"; Selo e Fugir somem no duelo contra treinador */
#hud[data-tipo="treinador"] ~ #toque :is([data-code="KeyQ"], [data-code="Escape"]) { display: none; }
#tq-duelo .tq-b.mais { background: rgba(60, 60, 70, .7); }
#tq-duelo .tq-b.mais.aberto { background: #ffd166; color: #10161e; }

/* Tamanho do texto: grande (Opções) */
body.letra-grande #dText { font-size: 23px; } body.letra-grande #dName { font-size: 1.15em; }
body.letra-grande.toque #dText { font-size: 20px; }
body.letra-grande .opt { font-size: 1.15em; } body.letra-grande #choice h3, body.letra-grande #party h3 { font-size: 1.35em; }
body.letra-grande .toast { font-size: 17px; } body.letra-grande .toast.imp { font-size: 22px; } body.letra-grande.toque .toast.imp { font-size: 19px; }
body.letra-grande #whud .obj { font-size: 18px; } body.letra-grande.toque #whud .obj { font-size: 16px; } body.letra-grande #whud .info { font-size: 13.5px; }
body.letra-grande #guia .gc { font-size: 15.5px; } body.letra-grande .gsub { font-size: 15px; } body.letra-grande #guia .mc small { font-size: 14.5px; }
body.letra-grande .panel .sub, body.letra-grande .lin > span { font-size: 13px; } body.letra-grande:not(.toque) .mv b { font-size: 16px; }
body.letra-grande.toque #moves > .mv:not(.longo) b { font-size: 10.5px; } body.letra-grande.toque #moves > .mv:first-child:not(.longo) b { font-size: 13.5px; } /* (na roda não cabe mais que isso) */
body.letra-grande :is(#abertura, #pausa) .ab b { font-size: 19px; } body.letra-grande :is(#abertura, #pausa) .ab small { font-size: 14px; }
body.letra-grande #prompt { font-size: 19px; }
