/* Lance Imortal - celular primeiro. Paleta própria do jogo. */
:root {
  --fundo: #f4efe4; --papel: #fffaf0; --tinta: #1f2a36; --suave: #5d6b78; --linha: #d9cfbd;
  --acento: #b5462f; --acento2: #2f6f6a; --bem: #2e7d4f; --mal: #b3261e;
  --clara: #e9e2cf; --escura: #6d8f87; --sel: #f2c14e; --ult: rgba(242, 193, 78, .45);
  --raio: 14px;
}
@media (prefers-color-scheme: dark) {
  :root { --fundo: #151b22; --papel: #1f2731; --tinta: #eef0f2; --suave: #a8b3be; --linha: #33404d; --clara: #c9c2ae; --escura: #4f6f68; }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--fundo); color: var(--tinta); }
body { font: 17px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-tap-highlight-color: transparent; }
.app { max-width: 560px; margin: 0 auto; padding: 12px 16px calc(24px + env(safe-area-inset-bottom)); }
button { font: inherit; color: inherit; }
a { color: var(--acento2); }

/* início */
.topo { text-align: center; padding: 8px 0 4px; }
.portal { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; text-decoration: none; color: var(--suave); }
.topo h1 { font-family: Georgia, "Times New Roman", serif; font-size: 38px; margin: 10px 0 0; letter-spacing: .5px; }
.sub { margin: 2px 0 0; color: var(--suave); }
.ato { background: var(--papel); border: 1px solid var(--linha); border-radius: var(--raio); padding: 14px; margin: 16px 0; }
.ato h2 { margin: 0; font-family: Georgia, serif; }
.sub2 { margin: 0 0 6px; color: var(--acento); font-weight: 600; font-size: 15px; }
.abertura { margin: 0 0 12px; color: var(--suave); font-size: 15px; }
.bloqueado { opacity: .6; }
.lista { display: grid; gap: 8px; }
.item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 52px; padding: 8px 12px; border: 1px solid var(--linha); border-radius: 12px; background: var(--fundo); text-align: left; cursor: pointer; }
.item:disabled { cursor: default; opacity: .55; }
.item.feito { border-color: var(--acento2); }
.item.grande { margin-top: 10px; font-weight: 600; }
.item.caderno { background: var(--papel); border-color: var(--acento); }
.item .num { flex: 0 0 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--tinta); color: var(--fundo); font-size: 14px; font-weight: 700; }
.item .tit { flex: 1; }
.item .est { color: var(--acento); font-size: 15px; white-space: nowrap; }
.rodape { color: var(--suave); font-size: 13px; text-align: center; margin-top: 20px; }
.opc { display: inline-flex; gap: 8px; align-items: center; font-size: 15px; }

/* passo */
.barra { display: flex; align-items: center; gap: 10px; }
.voltar { border: 0; background: none; font-size: 22px; width: 44px; height: 44px; cursor: pointer; }
.prog { flex: 1; height: 8px; border-radius: 8px; background: var(--linha); overflow: hidden; }
.prog div { height: 100%; background: var(--acento2); transition: width .3s; }
.cont { color: var(--suave); font-size: 14px; }
.titbarra { font-size: 17px; margin: 0; }
.titpasso { font-size: 15px; color: var(--suave); margin: 8px 0 4px; font-weight: 600; }
.fora { display: inline-block; margin: 4px 0; padding: 2px 10px; border-radius: 20px; background: var(--acento); color: #fff; font-size: 13px; }
.enunciado { display: flex; gap: 8px; align-items: flex-start; }
.enunciado p { flex: 1; margin: 4px 0 10px; font-size: 19px; }
.ouvir { flex: 0 0 44px; height: 44px; border-radius: 50%; border: 1px solid var(--linha); background: var(--papel); cursor: pointer; font-size: 20px; }
.retorno { min-height: 1.5em; margin: 10px 0; font-weight: 600; }
.retorno.bem { color: var(--bem); }
.retorno.mal { color: var(--mal); }
.acoes, .opcoes { display: flex; flex-wrap: wrap; gap: 8px; }
.opcoes { margin-top: 10px; }
.btn { min-height: 48px; padding: 10px 18px; border-radius: 12px; border: 1px solid var(--linha); background: var(--papel); cursor: pointer; font-weight: 600; }
.btn.principal { background: var(--tinta); color: var(--fundo); border-color: var(--tinta); flex: 1; }
.btn.opcao { flex: 1 1 40%; }
.btn.certo { background: var(--bem); color: #fff; border-color: var(--bem); }
.btn.errado { background: var(--mal); color: #fff; border-color: var(--mal); }
.btn.dica { outline: 3px dashed var(--bem); }
.anotacao { font-family: ui-monospace, Consolas, monospace; font-size: 15px; color: var(--suave); }
.fim { text-align: center; padding: 30px 0; }
.fim h2 { font-family: Georgia, serif; font-size: 30px; }
.fim p { font-size: 18px; }
.fim .acoes { justify-content: center; }

/* tabuleiro */
.tab { position: relative; width: min(100%, 480px); margin: 0 auto; }
.tab-grade { display: grid; grid-template-columns: repeat(8, 1fr); aspect-ratio: 1; border-radius: 6px; overflow: hidden; box-shadow: 0 2px 10px rgba(0, 0, 0, .18); touch-action: manipulation; }
.casa { position: relative; border: 0; padding: 0; margin: 0; aspect-ratio: 1; cursor: pointer; display: grid; place-items: center; }
.casa.clara { background: var(--clara); }
.casa.escura { background: var(--escura); }
.casa.ult { box-shadow: inset 0 0 0 100px var(--ult); }
.casa.sel { box-shadow: inset 0 0 0 100px rgba(242, 193, 78, .75); }
.casa.xeque { background: radial-gradient(circle, #e5533c 20%, transparent 75%), var(--escura); }
.casa.escolhida { box-shadow: inset 0 0 0 4px var(--acento2), inset 0 0 0 100px rgba(47, 111, 106, .35); }
.casa.certo { box-shadow: inset 0 0 0 100px rgba(46, 125, 79, .6); }
.casa.errado { box-shadow: inset 0 0 0 100px rgba(179, 38, 30, .6); }
.peca { width: 88%; height: 88%; pointer-events: none; }
.pb { fill: #fbf7ee; stroke: #26303a; stroke-width: 3.2; stroke-linejoin: round; }
.pp { fill: #2a3138; stroke: #0e1114; stroke-width: 3.2; stroke-linejoin: round; }
.peca .d { fill: none; stroke-width: 3; stroke-linecap: round; }
.pp .d { stroke: #c9cfd5; }
.pb .o { fill: #26303a; stroke: none; }
.pp .o { fill: #c9cfd5; stroke: none; }
.ponto { position: absolute; width: 28%; height: 28%; border-radius: 50%; background: rgba(31, 42, 54, .35); pointer-events: none; }
.anel { position: absolute; inset: 4%; border-radius: 50%; border: 4px solid rgba(31, 42, 54, .4); pointer-events: none; }
.rot { position: absolute; font-size: 11px; font-weight: 700; pointer-events: none; opacity: .8; }
.clara .rot { color: var(--escura); }
.escura .rot { color: var(--clara); }
.rc { right: 3px; bottom: 1px; }
.rf { left: 3px; top: 1px; }
.promo { position: absolute; inset: 30% 10%; background: var(--papel); border-radius: var(--raio); box-shadow: 0 6px 24px rgba(0, 0, 0, .3); display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; padding: 10px; }
.promo p { width: 100%; text-align: center; margin: 0; font-weight: 600; }
.promo button { width: 22%; aspect-ratio: 1; border: 1px solid var(--linha); border-radius: 10px; background: var(--clara); cursor: pointer; padding: 4px; }
.promo .peca { width: 100%; height: 100%; }
.carregando { text-align: center; color: var(--suave); padding: 40px; }

/* Conta Épiro (portão do Ato II) */
.portao { border: 1px dashed var(--linha); border-radius: var(--raio); padding: 12px; margin-top: 10px; }
.portao p { margin: 0 0 10px; }
.codigo { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; margin-top: 10px; }
.codigo input { font-size: 22px; letter-spacing: 4px; width: 8.5ch; padding: 6px 8px; border: 1px solid var(--linha); border-radius: 10px; background: var(--clara); color: inherit; }
.link { background: none; border: 0; padding: 0; color: inherit; text-decoration: underline; cursor: pointer; font: inherit; }
.exerc { margin: 10px 0; }
.exerc summary { cursor: pointer; padding: 10px 12px; border: 1px dashed var(--linha); border-radius: 12px; color: var(--acento2); font-weight: 600; font-size: 15px; }
.exerc[open] summary { margin-bottom: 8px; }

/* Mestre Bispo, o mentor */
.mentor { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 14px; text-align: left; }
.mentor svg { flex: none; }
.mentor .balao { position: relative; background: var(--papel); border: 1px solid var(--linha); border-radius: 12px; padding: 8px 12px; font-size: 15px; }
.mentor .balao::before { content: ''; position: absolute; left: -7px; top: 18px; width: 12px; height: 12px; background: inherit; border-left: 1px solid var(--linha); border-bottom: 1px solid var(--linha); transform: rotate(45deg); }
.mentor .balao b { font-size: 13px; color: var(--suave); }
.mentor .balao p { margin: 2px 0 0; }
.mentor.curta { margin-top: 0; }
.fim .mentor { max-width: 520px; margin: 18px auto; }
.fim .mentor .balao p { font-size: 16px; }
