/* Fontes da casa (SIL OFL 1.1), ver fontes/LICENCA.md */
@font-face {
  font-family: "Libre Franklin";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("fontes/libre-franklin-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Libre Franklin";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("fontes/libre-franklin-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Chivo Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("fontes/chivo-mono-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Chivo Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("fontes/chivo-mono-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Motor do reprodutor: sistema visual do site (papel claro, plano, sem sombra e sem raio). */
:root {
  --papel: #f3f3ef;
  --tinta: #0b0b0d;
  --cinza: #4b4b52;
  --regua: #c9c9c2;
  --destaque: #ffe23d;
  --texto: "Libre Franklin", Arial, sans-serif;
  --mono: "Chivo Mono", Consolas, monospace;
}
* { box-sizing: border-box; margin: 0; padding: 0; border-radius: 0; box-shadow: none; }
html, body { width: 100%; height: 100%; background: var(--tinta); overflow: hidden; font-family: var(--texto); color: var(--tinta); }
#palco { position: absolute; left: 0; top: 0; width: 1280px; height: 784px; transform-origin: 0 0; }
#stage { position: absolute; left: 0; top: 0; width: 1280px; height: 720px; background: var(--papel); overflow: hidden; }

/* cenas */
.cena { position: absolute; inset: 0; opacity: 0; overflow: hidden; }
.cena > * { position: absolute; }
.pill { background: var(--tinta); color: var(--papel); font-size: 24px; line-height: 1.25; padding: 8px 16px; max-width: 560px; }
.pill.alerta { background: var(--destaque); color: var(--tinta); }
.fonte { font-family: var(--mono); font-size: 16px; color: var(--cinza); }
.grande { font-size: 64px; font-weight: 700; line-height: 1.1; color: var(--tinta); }
.grande.destaque { background: var(--destaque); padding: 0 12px; }
.vazio { color: var(--cinza); font-size: 20px; }
.l { display: inline-block; white-space: pre; }
.jan { overflow: hidden; background: var(--papel); border: 1px solid var(--regua); }
.mundo { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.folha { display: block; max-width: none; }
/* O véu (outline largo, cor do papel) apaga os vizinhos que a proporção da janela deixa à vista no foco. */
.moldura { position: absolute; border: 4px solid var(--destaque); opacity: 0; outline: 4000px solid rgba(243, 243, 239, 0.78); }

/* HUD e legenda */
.topo { position: absolute; left: 0; top: 0; z-index: 20; padding: 18px 24px; pointer-events: none; }
.hud { font-family: var(--mono); font-size: 18px; color: var(--cinza); }
/* Faixa centrada por margem (não por left 50%, que limitava a largura útil a 640px e quebrava linha de 42 caracteres).
   Até 1180px de largura; cada linha do cue é um span sem quebra. Base em 36px: com duas linhas o topo fica em y 608,
   8px abaixo da linha y 600 onde terminam rótulos e encerramento. */
#leg { position: absolute; left: 0; right: 0; margin: 0 auto; width: fit-content; bottom: 36px; z-index: 30; max-width: 1180px;
  background: var(--tinta); color: var(--papel); font-family: var(--texto); font-size: 30px; line-height: 30px; text-align: center; padding: 8px 20px; max-height: 76px; overflow: hidden; }
#leg:empty { display: none; }
#leg span { display: block; white-space: nowrap; }
/* Hash de 64 caracteres: em mono 24px (~920px) cabe com folga; em Libre Franklin 30px maiúsculo passaria de 1180px. */
#leg.longo { font-family: var(--mono); font-size: 24px; }
#stage.semleg #leg { display: none; }

/* capa */
.capa { position: absolute; inset: 0; z-index: 50; background: var(--papel); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px; text-align: center; padding: 0 80px; }
.capa-num { font-family: var(--mono); font-size: 22px; color: var(--cinza); }
.capa-titulo { font-size: 64px; font-weight: 700; line-height: 1.1; }
.capa button { font: inherit; font-size: 24px; background: var(--destaque); color: var(--tinta); border: 2px solid var(--tinta); padding: 12px 36px; cursor: pointer; }

/* controles e rodapé */
.ctl { position: absolute; left: 0; top: 720px; width: 1280px; height: 40px; display: flex; align-items: center; gap: 14px; padding: 0 16px; background: var(--tinta); color: var(--papel); font-size: 15px; }
.ctl button { font: inherit; background: transparent; color: var(--papel); border: 1px solid var(--cinza); padding: 4px 12px; cursor: pointer; }
.ctl button.off { color: var(--cinza); text-decoration: line-through; }
.ctl input[type=range] { flex: 1; accent-color: var(--destaque); }
.ctl .vel { display: flex; gap: 4px; }
.ctl .vel button { padding: 4px 8px; min-width: 44px; }
.ctl .vel button[aria-pressed=true] { background: var(--destaque); color: var(--tinta); border-color: var(--destaque); }
.ctl .vol { display: flex; align-items: center; gap: 8px; }
.ctl .vol input[type=range] { flex: none; width: 90px; }
.ctl .vol[data-sem-volume] input[type=range] { display: none; }
.ctl button[aria-pressed=true]#btMudo { color: var(--cinza); text-decoration: line-through; }
.ctl button:focus-visible, .ctl input:focus-visible, .capa button:focus-visible { outline: 3px solid var(--destaque); outline-offset: 2px; }
#palco:focus { outline: none; }
#tempo { font-family: var(--mono); font-size: 14px; min-width: 96px; text-align: center; }
.rod { position: absolute; left: 0; top: 760px; width: 1280px; height: 24px; background: var(--tinta); color: var(--regua); font-size: 13px; padding: 3px 16px; }

/* tela estreita (celular): controles fora da escala do palco, alvo de toque de 44 x 44 px */
html.estreito .ctl { transform: scale(calc(1 / var(--k))); transform-origin: 0 0; width: var(--larg); height: auto; flex-wrap: wrap; gap: 6px 8px; padding: 6px 8px; font-size: 15px; }
html.estreito .ctl button { min-width: 44px; min-height: 44px; padding: 4px 10px; }
html.estreito .ctl .vel button { min-width: 44px; min-height: 44px; padding: 4px 8px; }
html.estreito .ctl input[type=range] { min-height: 44px; }
html.estreito .ctl #barra { flex: 1 1 100%; order: 9; }
html.estreito .ctl .vol input[type=range] { width: 80px; }
html.estreito #tempo { min-width: 0; }
html.estreito .rod { transform: scale(calc(1 / var(--k))); transform-origin: 0 0; width: var(--larg); height: auto; min-height: 24px; }

/* modo gravação: só o palco, 1280x720 sem escala */
html.gravar, html.gravar body { background: var(--papel); }
html.gravar #palco { position: fixed; left: 0; top: 0; width: 1280px; height: 720px; transform: none !important; }
html.gravar .capa, html.gravar .ctl, html.gravar .rod, html.gravar .aviso { display: none !important; }
html.gravar .topo { background: transparent; }

/* biblioteca de cenas (cenas.js): classes prefixadas pelo tipo */
.mono { font-family: var(--mono); }
.pal { display: inline-block; white-space: nowrap; }
.esp { white-space: normal; }
.ab-raiz, .con-raiz { display: flex; flex-direction: column; justify-content: center; }
.ab-numero { font-size: 24px; color: var(--cinza); margin-bottom: 20px; }
.ab-subtitulo { font-size: 30px; line-height: 1.3; color: var(--cinza); margin-top: 28px; }
.con-raiz { align-items: center; text-align: center; }
.con-frase { font-size: 48px; font-weight: 700; line-height: 1.2; max-width: 1000px; }
.con-destaque { background: var(--destaque); padding: 0 8px; white-space: nowrap; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.con-apoio { font-size: 28px; line-height: 1.35; color: var(--cinza); margin-top: 32px; max-width: 900px; }
.peg-coluna { border-top: 2px solid var(--tinta); padding-top: 18px; }
.peg-titulo { font-size: 28px; font-weight: 700; line-height: 1.2; margin-bottom: 16px; }
.peg-texto { font-size: 24px; line-height: 1.4; overflow-wrap: anywhere; }
.peg-divisoria { background: var(--regua); }
.pill.peg-veredito { max-width: none; text-align: center; font-size: 28px; }
.cron-linha { background: var(--regua); transform-origin: 0 50%; }
.cron-evento > * { position: absolute; left: 0; width: 100%; text-align: center; }
.cron-quando { top: 30px; height: 40px; display: flex; align-items: flex-end; justify-content: center; font-size: 22px; }
.cron-ponto { top: 84px; left: 50%; width: 12px; height: 12px; margin-left: -6px; background: var(--tinta); }
.cron-oque { top: 112px; font-size: 22px; line-height: 1.3; }
.cron-oque.alerta { background: var(--destaque); }
.chk-titulo { font-size: 36px; font-weight: 700; line-height: 1.2; margin-bottom: 32px; }
.chk-item { display: flex; align-items: center; gap: 22px; margin-bottom: 22px; }
.chk-marca { flex: none; width: 28px; height: 28px; border: 2px solid var(--tinta); }
.chk-texto { font-size: 28px; line-height: 1.3; }
.ped-cartao { background: var(--papel); border: 1px solid var(--regua); padding: 36px 48px 40px; max-height: 510px; overflow: hidden; }
.ped-titulo { font-size: 22px; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 8px; }
.ped-trecho { font-size: var(--ped-fonte, 24px); line-height: 1.4; text-align: justify; margin-top: 18px; }
.enc-bloco { display: flex; align-items: center; justify-content: center; text-align: center; }
.enc-frase { font-size: 44px; font-weight: 700; line-height: 1.2; }
.enc-aviso, .enc-proxima { text-align: center; }
.enc-aviso .enc-texto { font-size: 20px; color: var(--cinza); }
.enc-aviso .enc-texto { line-height: 24px; }
.enc-proxima .enc-texto { font-size: 24px; line-height: 28px; }
