/* Mangá: preto e branco, retícula e um vermelho só para a ação. */
:root {
  --tinta: #111111;
  --papel: #ffffff;
  --cinza: #6b6b6b;
  --linha: #e4e4e4;
  --acao: #d7262e;
  --noite: #121212;
  --fonte-titulo: "Anton", "Impact", sans-serif;
  --fonte-texto: "Inter", system-ui, sans-serif;
  --fonte-balao: "Comic Neue", "Comic Sans MS", sans-serif;
  --fonte-sfx: "Bangers", "Impact", sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--papel); color: var(--tinta); font: 400 16px/1.6 var(--fonte-texto); }
img { max-width: 100%; display: block; }
a { color: inherit; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.caixa { width: min(1080px, 100% - 32px); margin-inline: auto; }

/* ---------- Botões ---------- */
.botao {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border: 0; border-radius: 10px; cursor: pointer;
  background: var(--acao); color: #fff; font: 700 16px/1 var(--fonte-texto); text-decoration: none;
}
.botao:hover { filter: brightness(1.08); }
.botao.fantasma { background: transparent; color: inherit; box-shadow: inset 0 0 0 2px currentColor; }
.botao:focus-visible, .link:focus-visible, button:focus-visible { outline: 3px solid var(--acao); outline-offset: 3px; }

/* ---------- Topo ---------- */
.topo { border-bottom: 1px solid var(--linha); background: var(--papel); }
.topo .caixa { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.marca { font: 400 26px/1 var(--fonte-titulo); letter-spacing: .02em; text-decoration: none; text-transform: uppercase; }
.topo nav a { font-weight: 600; text-decoration: none; margin-left: 20px; }
.topo nav a:hover { color: var(--acao); }

/* ---------- Abertura ---------- */
.abertura { padding: 40px 0 56px; }
.abertura .caixa { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.abertura .selo { display: inline-block; font-size: 14px; color: var(--cinza); margin-bottom: 8px; }
.abertura h1 {
  margin: 0; font: 400 clamp(84px, 16vw, 168px)/.86 var(--fonte-titulo); text-transform: uppercase; letter-spacing: .01em;
}
.abertura .provisorio { font-size: 13px; color: var(--cinza); margin: 10px 0 0; }
.abertura .chamada { font-size: 19px; max-width: 34ch; margin: 22px 0 26px; }
.abertura .acoes { display: flex; gap: 12px; flex-wrap: wrap; }
.capa {
  position: relative; aspect-ratio: 4 / 5; border-radius: 16px; overflow: hidden; background: #000;
}
.capa img { width: 100%; height: 100%; object-fit: cover; }
.capa .cap-num {
  position: absolute; left: 16px; bottom: 16px; background: var(--papel); color: var(--tinta);
  padding: 8px 12px; border-radius: 8px; font-weight: 700; font-size: 14px; line-height: 1.3;
}
.capa .cap-num b { display: block; font: 400 22px/1.1 var(--fonte-titulo); text-transform: uppercase; }

/* ---------- Seções ---------- */
.secao { padding: 56px 0; border-top: 1px solid var(--linha); }
.secao h2 { margin: 0 0 24px; font: 400 clamp(36px, 6vw, 52px)/1 var(--fonte-titulo); text-transform: uppercase; }
.sinopse p { font-size: 19px; max-width: 62ch; margin: 0 0 14px; }

.mundo { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 40px; margin-top: 32px; max-width: 860px; }
.mundo div { border-top: 3px solid var(--tinta); padding-top: 12px; }
.mundo h3 { margin: 0 0 6px; font: 400 26px/1.05 var(--fonte-titulo); text-transform: uppercase; }
.mundo p { margin: 0; font-size: 16px; color: #333; }
@media (max-width: 760px) { .mundo { grid-template-columns: 1fr; } }
.personagens { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 28px 20px; }
.personagem img { aspect-ratio: 1; width: 100%; object-fit: cover; border-radius: 14px; background: #eee; }
.personagem h3 { margin: 12px 0 0; font: 400 24px/1.1 var(--fonte-titulo); text-transform: uppercase; }
.personagem .papel { margin: 2px 0 6px; color: var(--acao); font-weight: 700; font-size: 14px; }
.personagem p { margin: 0; font-size: 15px; color: #333; }

.capitulos { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--tinta); }
.capitulos li { border-bottom: 1px solid var(--linha); }
.capitulos a, .capitulos .breve {
  display: grid; grid-template-columns: 76px 1fr auto; align-items: center; gap: 16px; padding: 18px 4px; text-decoration: none;
}
.capitulos .num { font: 400 40px/1 var(--fonte-titulo); }
.capitulos .nome { font-weight: 700; font-size: 19px; }
.capitulos .info { display: block; color: var(--cinza); font-size: 14px; font-weight: 400; }
.capitulos a:hover .nome { color: var(--acao); }
.capitulos .breve { color: #9a9a9a; }
.capitulos .ir { font-weight: 700; color: var(--acao); }

.rodape { border-top: 1px solid var(--linha); padding: 28px 0 40px; color: var(--cinza); font-size: 14px; }

@media (max-width: 760px) {
  .abertura { padding: 20px 0 40px; }
  .abertura .caixa { grid-template-columns: 1fr; gap: 24px; }
  .abertura .chamada { font-size: 17px; margin: 16px 0 20px; }
  .abertura .botao { flex: 1 1 100%; }
  .topo nav a:not(:last-child) { display: none; }
  .secao { padding: 40px 0; }
  .sinopse p { font-size: 17px; }
  .personagens { grid-template-columns: repeat(2, 1fr); gap: 22px 14px; }
  .personagem h3 { font-size: 20px; }
  .capitulos a, .capitulos .breve { grid-template-columns: 56px 1fr auto; gap: 12px; }
  .capitulos .num { font-size: 32px; }
}

/* =================== LEITOR =================== */
body.leitor { background: var(--noite); color: #eee; min-height: 100svh; display: flex; flex-direction: column; }
.barra-leitor { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; }
.barra-leitor .link { color: #eee; text-decoration: none; font-weight: 600; font-size: 15px; padding: 8px 0; }
.barra-leitor .titulo-cap { margin-left: auto; font-size: 14px; line-height: 1.25; color: #bbb; }
.barra-leitor .titulo-cap b { display: block; color: #fff; font: 400 20px/1.05 var(--fonte-titulo); text-transform: uppercase; }

.palco { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0 16px; }
.visor {
  position: relative; overflow: hidden; background: #000; border-radius: 6px;
  aspect-ratio: 800 / 1180; width: min(100%, 680px, calc((100svh - 168px) * 800 / 1180));
  touch-action: pan-y; user-select: none; -webkit-user-select: none;
}
.pagina {
  position: absolute; inset: 0; transform-origin: 0 0; container-type: inline-size;
  transition: transform .5s cubic-bezier(.22, .7, .2, 1); background: #fff;
}
.pagina > img { width: 100%; height: 100%; object-fit: fill; pointer-events: none; }
.foco {
  position: absolute; z-index: 2; pointer-events: none; box-shadow: 0 0 0 3000px rgba(0, 0, 0, 0);
  transition: box-shadow .4s, left .5s, top .5s, width .5s, height .5s;
}
.visor.modo-quadro .foco { box-shadow: 0 0 0 3000px rgba(8, 8, 8, .9); }
.quadro-baloes { position: absolute; }

/* ---------- Balões (medidas em cqw: 1cqw = 1% da largura da página) ---------- */
.b {
  position: absolute; z-index: 1; color: var(--tinta); background: #fff;
  font: 700 2.6cqw/1.14 var(--fonte-balao); text-transform: uppercase; text-align: center; letter-spacing: .01em;
  padding: 1.5cqw 2.1cqw; border: .32cqw solid var(--tinta); border-radius: 50%;
  display: flex; align-items: center; justify-content: center; min-height: 6cqw; text-wrap: balance;
}
.b.ativo { z-index: 3; }
/* No quadro em foco, o balão cresce até ficar legível no celular (--zb vem do leitor). */
.b:not(.sfx) { transition: transform .35s; transform-origin: var(--zo, 50% 0); }
.visor.modo-quadro .b.ativo:not(.sfx) { transform: scale(var(--zb, 1)); }
.b strong { font-weight: 700; font-size: 1.12em; }
.b.pensa { border-style: dashed; border-radius: 46%; }
.b.sussurro { border-style: dashed; font-weight: 400; font-size: 2.1cqw; }
.b.sussurro.mini { font-size: 1.7cqw; min-height: 0; padding: 1cqw 1.4cqw; }
.b.abafado {
  border-style: dashed; color: #555; font-weight: 400;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 22%, #000 78%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 22%, #000 78%, transparent);
}
.b.legenda, .b.placa, .b.tv { border-radius: 0; text-align: left; justify-content: flex-start; min-height: 0; }
.b.legenda { font-style: italic; padding: 1cqw 1.6cqw; text-transform: none; font-size: 2.2cqw; }
.b.placa { border-width: .5cqw; padding: 1.4cqw 2cqw; font-family: var(--fonte-texto); font-size: 2.4cqw; line-height: 1.35; display: block; }
.b.tv { border-style: double; border-width: .8cqw; padding: 1.1cqw 1.6cqw; }
.b.sombra { background: #0b0b0b; color: #f1f1f1; border-color: #f1f1f1; border-radius: 12% / 30%; font-weight: 400; letter-spacing: .04em; }
.b.grito {
  border: 0; border-radius: 0; background: transparent; padding: 4cqw 5cqw; font-size: 3cqw; font-weight: 700; min-height: 12cqw;
}
.b.grito::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: center / 100% 100% no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 120' preserveAspectRatio='none'%3E%3Cpath d='M100 2 L116 22 L146 6 L146 30 L190 20 L170 46 L198 62 L168 74 L186 104 L144 92 L132 118 L106 98 L82 118 L72 94 L30 108 L40 80 L2 66 L34 50 L10 22 L54 30 L62 4 L84 22 Z' fill='white' stroke='%23111' stroke-width='3' vector-effect='non-scaling-stroke' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.b.sfx {
  background: none; border: 0; padding: 0; min-height: 0; color: #fff; border-radius: 0;
  font: 400 calc(var(--tam, 1) * 7.5cqw)/.95 var(--fonte-sfx); letter-spacing: .03em;
  transform: rotate(var(--rot, -6deg));
  text-shadow: .45cqw .45cqw 0 var(--tinta), -.45cqw .45cqw 0 var(--tinta), .45cqw -.45cqw 0 var(--tinta), -.45cqw -.45cqw 0 var(--tinta),
               0 .55cqw 0 var(--tinta), 0 -.55cqw 0 var(--tinta), .55cqw 0 0 var(--tinta), -.55cqw 0 0 var(--tinta), .9cqw .9cqw 0 var(--acao);
}

.b.nome {
  width: max-content !important; max-width: 70%; min-height: 0; border: 0; border-radius: 0; background: var(--tinta); color: #fff;
  font: 700 1.9cqw/1.2 var(--fonte-texto); letter-spacing: .07em; padding: .7cqw 1.3cqw;
}
.b.titulo {
  background: none; border: 0; border-radius: 0; padding: 0; min-height: 0; color: #fff;
  font: 400 21cqw/.86 var(--fonte-titulo); letter-spacing: .01em;
  text-shadow: .7cqw .7cqw 0 var(--tinta), -.7cqw .7cqw 0 var(--tinta), .7cqw -.7cqw 0 var(--tinta), -.7cqw -.7cqw 0 var(--tinta),
               0 .9cqw 0 var(--tinta), 0 -.9cqw 0 var(--tinta), .9cqw 0 0 var(--tinta), -.9cqw 0 0 var(--tinta), 1.6cqw 1.6cqw 0 var(--acao);
}
.b.creditos {
  border-radius: 0; border-width: .45cqw; min-height: 0; text-align: left; justify-content: flex-start; display: block;
  font: 600 2.4cqw/1.25 var(--fonte-texto); text-transform: none; padding: 1.2cqw 1.6cqw;
}
.b.creditos strong { display: block; font: 400 4.6cqw/1 var(--fonte-titulo); text-transform: uppercase; margin-top: .4cqw; }

/* "Ver o que é novo": acréscimos ao texto dela em vermelho tracejado. */
.marca-novo { display: none; }
.ver-novo .marca-novo { display: block; }
.marca-novo { position: absolute; z-index: 4; pointer-events: none; outline: .6cqw dashed var(--acao); outline-offset: -.9cqw; }
.marca-novo span, .b.novo::after {
  position: absolute; background: var(--acao); color: #fff; font: 700 1.6cqw/1 var(--fonte-texto); text-transform: uppercase;
  padding: .5cqw .8cqw; letter-spacing: .05em;
}
.marca-novo span { top: 1.4cqw; right: 1.4cqw; }
.ver-novo .b.novo { outline: .45cqw dashed var(--acao); outline-offset: .5cqw; }
.ver-novo .b.novo:not([data-cauda])::after { content: "novo"; top: -2.6cqw; left: 0; border: 0; width: auto; height: auto; clip-path: none; }
.bt-novo { border: 0; background: #262626; color: #bbb; padding: 9px 12px; border-radius: 10px; font: 600 14px var(--fonte-texto); cursor: pointer; }
.bt-novo[aria-pressed="true"] { background: var(--acao); color: #fff; }

/* Cauda do balão: triângulo preto + triângulo branco por cima. */
.b[data-cauda]::before, .b[data-cauda]::after { content: ""; position: absolute; }
.b[data-cauda]::before { width: 3cqw; height: 3.6cqw; background: var(--tinta); }
.b[data-cauda]::after { width: 2.1cqw; height: 2.7cqw; background: #fff; }
.b[data-cauda^="b"]::before { top: calc(100% - .4cqw); }
.b[data-cauda^="b"]::after { top: calc(100% - .75cqw); }
.b[data-cauda^="c"]::before { bottom: calc(100% - .4cqw); }
.b[data-cauda^="c"]::after { bottom: calc(100% - .75cqw); }
.b[data-cauda$="e"]::before { left: 24%; } .b[data-cauda$="e"]::after { left: calc(24% + .42cqw); }
.b[data-cauda$="d"]::before { right: 24%; } .b[data-cauda$="d"]::after { right: calc(24% + .42cqw); }
.b[data-cauda="be"]::before, .b[data-cauda="be"]::after { clip-path: polygon(0 0, 100% 0, 18% 100%); }
.b[data-cauda="bd"]::before, .b[data-cauda="bd"]::after { clip-path: polygon(0 0, 100% 0, 82% 100%); }
.b[data-cauda="ce"]::before, .b[data-cauda="ce"]::after { clip-path: polygon(18% 0, 100% 100%, 0 100%); }
.b[data-cauda="cd"]::before, .b[data-cauda="cd"]::after { clip-path: polygon(82% 0, 100% 100%, 0 100%); }
.b.sussurro[data-cauda]::before, .b.sussurro[data-cauda]::after { opacity: .9; }
.b.pensa::before, .b.pensa::after {
  content: ""; position: absolute; border: .3cqw solid var(--tinta); background: #fff; border-radius: 50%;
}
.b.pensa::before { width: 2.4cqw; height: 2.4cqw; top: calc(100% + .6cqw); left: 26%; }
.b.pensa::after { width: 1.4cqw; height: 1.4cqw; top: calc(100% + 3.4cqw); left: 21%; }

/* ---------- Controles ---------- */
.controles { width: min(100%, 680px); display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 12px 0 6px; }
.controles .botao { min-width: 104px; }
.controles .botao.fantasma { color: #eee; }
.botao[disabled] { opacity: .35; cursor: default; }
.contador { text-align: center; font-size: 14px; line-height: 1.3; color: #ccc; }
.contador b { color: #fff; }
.opcoes { width: min(100%, 680px); display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 4px 0 16px; flex-wrap: wrap; }
.modos { display: inline-flex; background: #262626; border-radius: 10px; padding: 3px; }
.modos button { border: 0; background: none; color: #bbb; padding: 8px 12px; border-radius: 8px; font: 600 14px var(--fonte-texto); cursor: pointer; }
.modos button[aria-pressed="true"] { background: #fff; color: var(--tinta); }
.pontos { display: flex; gap: 6px; flex-wrap: wrap; }
.pontos button { width: 30px; height: 30px; border-radius: 50%; border: 0; background: #2b2b2b; color: #ccc; font: 600 12px var(--fonte-texto); cursor: pointer; }
.pontos button[aria-current="true"] { background: var(--acao); color: #fff; }

/* ---------- Fim do capítulo ---------- */
.fim {
  position: absolute; inset: 0; z-index: 5; display: none; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; padding: 24px; text-align: center; background: #0d0d0d; color: #fff;
}
.visor.no-fim .fim { display: flex; }
.fim .rotulo { font: 400 clamp(40px, 11cqw, 76px)/.9 var(--fonte-titulo); text-transform: uppercase; }
.fim .sub { color: #bbb; margin: 0 0 8px; }
.fim .proximo { border-top: 1px solid #333; padding-top: 14px; margin-top: 6px; color: #ddd; }
.fim .botao.fantasma { color: #fff; }
.fim .acoes { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

@media (max-width: 520px) {
  .palco { padding: 0 8px; }
  .visor { width: min(100%, calc((100svh - 190px) * 800 / 1180)); }
  .controles .botao { min-width: 0; padding: 0 16px; }
  .pontos button { width: 26px; height: 26px; font-size: 11px; }
}
/* ---------- Tela cheia ---------- */
.bt-tela {
  flex: none; border: 0; border-radius: 8px; padding: 9px 12px; cursor: pointer;
  background: #2a2a2a; color: #fff; font: 600 14px var(--fonte-texto);
}
.bt-tela:hover { background: #3a3a3a; }
body.imersivo { background: #000; }
body.imersivo .barra-leitor { position: fixed; top: 8px; right: 8px; z-index: 10; padding: 0; }
body.imersivo .barra-leitor .link, body.imersivo .barra-leitor .titulo-cap, body.imersivo .opcoes { display: none; }
body.imersivo .bt-tela { background: #fff; color: var(--tinta); padding: 10px 14px; box-shadow: 0 0 0 2px var(--tinta); }
body.imersivo .bt-tela::before { content: "\2715  "; font-weight: 700; }
body.imersivo .palco { padding-top: 56px; }
body.imersivo .visor { width: min(100%, calc((100svh - 132px) * 800 / 1180)); }
body.imersivo .controles { padding-bottom: 10px; }

@media (prefers-reduced-motion: reduce) { .pagina, .foco { transition: none; } }
