/* Teleprompter — app instalável (GR/Caveat). Tema escuro fixo: é usado em set, perto da lente. */
:root {
  --bg: #0b0b0d; --sup: #151518; --sup2: #1d1d22; --sup3: #26262c; --linha: #2c2c33;
  --tx: #f3f2ef; --tx2: #a4a3ab; --tx3: #6f6e77;
  --ac: #ffc83d; --ac-tx: #1b1400; --ok: #34c759; --perigo: #ff5d52;
  --raio: 16px;
  --topo: env(safe-area-inset-top, 0px); --base: env(safe-area-inset-bottom, 0px);
  --esq: env(safe-area-inset-left, 0px); --dir: env(safe-area-inset-right, 0px);
  --fonte: -apple-system, system-ui, "SF Pro Text", "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--tx); overflow: hidden; overscroll-behavior: none; }
body { font: 16px/1.45 var(--fonte); -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; position: fixed; inset: 0; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; border: 0; background: none; padding: 0; }
button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--ac); outline-offset: 2px; }
svg { width: 22px; height: 22px; flex: none; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
[hidden] { display: none !important; }

.tela { position: fixed; inset: 0; display: none; flex-direction: column; background: var(--bg); }
.tela.ativa { display: flex; }

/* ---------- topo ---------- */
.topo {
  display: flex; align-items: center; gap: 10px; flex: none;
  padding: calc(var(--topo) + 10px) calc(var(--dir) + 14px) 10px calc(var(--esq) + 14px);
  border-bottom: 1px solid var(--linha); background: rgba(11, 11, 13, .92);
}
.marca { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.marca img { border-radius: 8px; }
.marca h1 { font-size: 19px; font-weight: 700; letter-spacing: -.015em; margin: 0; }
.bt-icone { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; color: var(--tx); }
.bt-icone:active { background: var(--sup2); }

.bt-pri, .bt-sec {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px;
  border-radius: 14px; font-weight: 650; font-size: 16px; white-space: nowrap;
}
.bt-pri { background: var(--ac); color: var(--ac-tx); }
.bt-pri:active { filter: brightness(.9); }
.bt-sec { background: var(--sup2); color: var(--tx); border: 1px solid var(--linha); }
.bt-sec:active { background: var(--sup3); }
.bt-pri svg, .bt-sec svg { width: 20px; height: 20px; }
.largo { width: 100%; margin-top: 14px; }

/* ---------- lista de roteiros ---------- */
.rolagem { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: 14px calc(var(--dir) + 14px) 120px calc(var(--esq) + 14px); }
.lista { list-style: none; margin: 0 auto; padding: 0; display: grid; gap: 10px; max-width: 760px; }
.item { display: flex; align-items: stretch; background: var(--sup); border: 1px solid var(--linha); border-radius: var(--raio); overflow: hidden; }
.item-abrir { flex: 1; min-width: 0; text-align: left; padding: 14px 4px 14px 16px; }
.item-abrir h3 { margin: 0 0 3px; font-size: 17px; font-weight: 650; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-abrir p { margin: 0 0 8px; color: var(--tx2); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12.5px; color: var(--tx3); font-variant-numeric: tabular-nums; }
.item-acoes { display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 6px 8px 6px 0; }
.item-ler { width: 48px; height: 48px; border-radius: 50%; background: var(--ac); color: var(--ac-tx); display: grid; place-items: center; }
.item-ler svg { width: 20px; height: 20px; margin-left: 2px; }
.item-mais { width: 48px; height: 36px; display: grid; place-items: center; color: var(--tx2); border-radius: 10px; }
.item-mais:active { background: var(--sup2); }

.vazio { text-align: center; color: var(--tx2); padding: 64px 20px; }
.vazio svg { width: 44px; height: 44px; color: var(--tx3); }
.vazio p { color: var(--tx); font-size: 18px; font-weight: 600; margin: 12px 0 4px; }

.acoes-fixas {
  position: absolute; left: 0; right: 0; bottom: 0; display: flex; gap: 10px; justify-content: center;
  padding: 16px calc(var(--dir) + 14px) calc(var(--base) + 16px) calc(var(--esq) + 14px);
  background: linear-gradient(to top, var(--bg) 55%, rgba(11, 11, 13, 0));
}
.acoes-fixas .bt-pri { flex: 0 1 260px; }
.acoes-fixas .bt-sec { flex: 0 1 160px; }

/* faixas (instalar / atualizar) */
#faixas { display: grid; gap: 8px; padding: 0 calc(var(--dir) + 14px) 0 calc(var(--esq) + 14px); }
#faixas:not(:empty) { padding-top: 12px; }
.faixa-aviso {
  display: flex; align-items: center; gap: 12px; max-width: 760px; width: 100%; margin: 0 auto;
  background: var(--sup2); border: 1px solid var(--linha); border-radius: 14px; padding: 12px 12px 12px 14px; font-size: 14px;
}
.faixa-aviso img { width: 40px; height: 40px; border-radius: 10px; flex: none; }
.faixa-aviso div { flex: 1; min-width: 0; }
.faixa-aviso b { display: block; font-size: 15px; }
.faixa-aviso span { color: var(--tx2); }
.faixa-aviso .bt-pri { min-height: 40px; padding: 0 14px; font-size: 15px; }
.faixa-aviso .bt-icone { width: 36px; height: 36px; color: var(--tx2); }
.faixa-aviso .bt-icone svg { width: 18px; height: 18px; }

/* ---------- editor ---------- */
.titulo-ed { flex: 1; min-width: 0; background: transparent; border: 0; font-size: 18px; font-weight: 650; padding: 8px 4px; border-radius: 8px; }
.titulo-ed::placeholder { color: var(--tx3); }
.bt-ler { min-height: 42px; padding: 0 16px; }
.ferramentas { display: flex; gap: 8px; overflow-x: auto; padding: 10px calc(var(--dir) + 14px) 10px calc(var(--esq) + 14px); flex: none; scrollbar-width: none; border-bottom: 1px solid var(--linha); }
.ferramentas::-webkit-scrollbar { display: none; }
.ferramentas button { flex: none; min-height: 38px; padding: 0 12px; border-radius: 10px; background: var(--sup2); border: 1px solid var(--linha); font-size: 14px; color: var(--tx2); display: inline-flex; align-items: center; gap: 6px; }
.ferramentas button b { color: var(--ac); font-weight: 700; }
.ferramentas button:active { background: var(--sup3); }
.pilula-mini { font-size: 10px; font-weight: 800; letter-spacing: .06em; color: var(--ac-tx); background: var(--ac); border-radius: 5px; padding: 2px 5px; }
#edTexto {
  flex: 1; width: 100%; resize: none; border: 0; background: var(--bg); color: var(--tx);
  padding: 18px calc(var(--dir) + 18px) 24px calc(var(--esq) + 18px); font-size: 18px; line-height: 1.6; outline: none;
}
#edTexto::placeholder { color: var(--tx3); }
.rodape-ed { display: flex; justify-content: space-between; gap: 12px; padding: 10px calc(var(--dir) + 16px) calc(var(--base) + 10px) calc(var(--esq) + 16px); border-top: 1px solid var(--linha); color: var(--tx2); font-size: 13.5px; font-variant-numeric: tabular-nums; }
.salvo { color: var(--ok); transition: opacity .3s; }
.salvo.salvando { color: var(--tx3); }

/* ---------- leitura ---------- */
#telaPrompter { --tp-bg: #000; --tp-fg: #fff; --tp-rgb: 0, 0, 0; --tp-ac: #ffc83d; --tp-dir: #8fb8ff; background: var(--tp-bg); overflow: hidden; user-select: none; -webkit-user-select: none; }
#telaPrompter.cor-amarelo { --tp-fg: #ffdc4a; --tp-ac: #fff; }
#telaPrompter.cor-verde { --tp-fg: #7dff9e; --tp-ac: #ffdc4a; }
#telaPrompter.cor-claro { --tp-bg: #fff; --tp-fg: #0b0b0d; --tp-rgb: 255, 255, 255; --tp-ac: #b4510a; --tp-dir: #2557c7; }
#telaPrompter.com-camera { --tp-bg: transparent; --tp-rgb: 0, 0, 0; }

#cam { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); display: none; }
#escurecer { position: absolute; inset: 0; background: #000; opacity: .55; display: none; pointer-events: none; }
.com-camera #cam, .com-camera #escurecer { display: block; }

#palco { position: absolute; left: 50%; top: 50%; overflow: hidden; touch-action: none; cursor: grab; transform-origin: 50% 50%; }
.texto {
  position: absolute; left: 0; right: 0; top: 0; color: var(--tp-fg); will-change: transform;
  font-weight: 500; letter-spacing: .005em; overflow-wrap: break-word; hyphens: manual;
  font-family: var(--fonte); text-rendering: optimizeLegibility;
}
.texto.f-serifa { font-family: Georgia, "Iowan Old Style", "Times New Roman", serif; }
.texto.f-larga { font-family: Verdana, "Trebuchet MS", Tahoma, "DejaVu Sans", sans-serif; letter-spacing: 0; }
.texto.f-mono { font-family: ui-monospace, "SF Mono", Menlo, "Cascadia Mono", Consolas, monospace; letter-spacing: -.01em; }
.texto.grossa { font-weight: 750; }
.texto.maiusculas { text-transform: uppercase; }
.texto.centro { text-align: center; }
.texto p { margin: 0 0 .7em; }
.texto b { color: var(--tp-ac); font-weight: 800; }
.texto .secao { margin: 1em 0 .5em; font-size: .52em; line-height: 1.2; font-weight: 750; letter-spacing: .14em; text-transform: uppercase; color: var(--tp-ac); display: flex; align-items: center; gap: .6em; }
.texto.centro .secao { justify-content: center; }
.texto .secao::after { content: ""; flex: 1; height: 2px; background: currentColor; opacity: .35; border-radius: 2px; }
.texto.centro .secao::before { content: ""; flex: 1; height: 2px; background: currentColor; opacity: .35; border-radius: 2px; }
.texto .dir { color: var(--tp-dir); font-style: italic; font-weight: 500; font-size: .62em; letter-spacing: .02em; }
.texto .dir::before { content: "("; } .texto .dir::after { content: ")"; }
.texto .pausa {
  display: inline-block; vertical-align: middle; font-size: .36em; font-weight: 800; letter-spacing: .14em; line-height: 1;
  color: #1b1400; background: var(--tp-ac); border-radius: .4em; padding: .45em .7em; margin: 0 .25em; font-style: normal; text-transform: uppercase;
}
.texto .pausa::before { content: "■ PAUSA"; }
.texto .fim { margin-top: 1.4em; font-size: .4em; letter-spacing: .3em; color: var(--tp-ac); text-align: center; opacity: .8; }
.texto .w.lida { opacity: .45; transition: opacity .25s; }

#veu { position: absolute; left: 0; right: 0; top: 0; pointer-events: none; background: linear-gradient(to bottom, rgba(var(--tp-rgb), .82), rgba(var(--tp-rgb), .52) 78%, rgba(var(--tp-rgb), 0)); }
#guia { position: absolute; left: 0; right: 0; pointer-events: none; }
#guia .seta { position: absolute; top: 50%; width: 0; height: 0; border: .5em solid transparent; transform: translateY(-50%); }
#guia .seta.e { left: 2px; border-left: .78em solid var(--tp-ac); border-right-width: 0; }
#guia .seta.d { right: 2px; border-right: .78em solid var(--tp-ac); border-left-width: 0; }
#guia::before { content: ""; position: absolute; inset: 0; background: rgba(255, 200, 61, .07); border-top: 1px solid rgba(255, 200, 61, .16); border-bottom: 1px solid rgba(255, 200, 61, .16); }
.cor-claro #guia::before { background: rgba(180, 81, 10, .07); border-color: rgba(180, 81, 10, .18); }

#barra { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(128, 128, 128, .22); pointer-events: none; }
#barra i { display: block; height: 100%; width: 0; background: var(--tp-ac); }
#relogio { position: absolute; right: 14px; top: 10px; font: 650 15px/1 var(--fonte); color: var(--tp-fg); opacity: .7; font-variant-numeric: tabular-nums; pointer-events: none; }
#contagem { position: absolute; inset: 0; display: grid; place-items: center; font: 800 min(38vw, 38vh)/1 var(--fonte); color: var(--tp-ac); pointer-events: none; opacity: 0; text-shadow: 0 0 40px rgba(var(--tp-rgb), .9); }
#contagem.ver { opacity: 1; }
#contagem.pulso { animation: pulso 1s ease-out; }
@keyframes pulso { from { transform: scale(1.25); opacity: 0; } 20% { opacity: 1; } to { transform: scale(1); opacity: .9; } }
#toastPalco { position: absolute; left: 50%; bottom: 14%; transform: translateX(-50%); background: rgba(20, 20, 24, .88); color: #fff; padding: 10px 18px; border-radius: 999px; font: 700 18px/1.2 var(--fonte); white-space: nowrap; opacity: 0; transition: opacity .25s; pointer-events: none; font-variant-numeric: tabular-nums; }
#toastPalco.ver { opacity: 1; }

#rec { position: absolute; top: calc(var(--topo) + 10px); left: calc(var(--esq) + 12px); z-index: 6; display: flex; align-items: center; gap: 8px; background: rgba(0, 0, 0, .6); color: #fff; padding: 6px 12px; border-radius: 999px; font: 700 14px/1 var(--fonte); font-variant-numeric: tabular-nums; pointer-events: none; }
#rec i { width: 10px; height: 10px; border-radius: 50%; background: var(--perigo); animation: pisca 1.2s infinite; }
@keyframes pisca { 50% { opacity: .25; } }

/* HUD (aparece com a leitura pausada) */
#hud { position: absolute; inset: 0; z-index: 5; pointer-events: none; display: flex; flex-direction: column; justify-content: space-between; transition: opacity .25s; }
#telaPrompter.tocando #hud { opacity: 0; }
#telaPrompter.tocando #hud * { pointer-events: none !important; }
.hud-topo, .hud-base { pointer-events: auto; display: flex; align-items: center; gap: 8px; }
.hud-topo { padding: calc(var(--topo) + 10px) calc(var(--dir) + 12px) 26px calc(var(--esq) + 12px); background: linear-gradient(to bottom, rgba(0, 0, 0, .78), rgba(0, 0, 0, 0)); }
.hud-titulo { flex: 1; min-width: 0; display: flex; flex-direction: column; color: #fff; text-shadow: 0 1px 6px rgba(0, 0, 0, .6); }
.hud-titulo strong { font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hud-titulo span { font-size: 12.5px; color: rgba(255, 255, 255, .72); font-variant-numeric: tabular-nums; }
.hud-base { flex-wrap: wrap; justify-content: center; gap: 10px 14px; padding: 36px calc(var(--dir) + 12px) calc(var(--base) + 14px) calc(var(--esq) + 12px); background: linear-gradient(to top, rgba(0, 0, 0, .94) 62%, rgba(0, 0, 0, 0)); }
@media (max-width: 640px) {
  .hud-base { display: grid; grid-template-columns: 1fr auto 1fr; grid-template-areas: "vel vel vel" "nav play letra" "extra extra extra"; gap: 14px 10px; align-items: center; }
  .g-vel { grid-area: vel; justify-self: center; } .g-nav { grid-area: nav; justify-self: start; }
  .bt-play { grid-area: play; } .g-letra { grid-area: letra; justify-self: end; }
  .g-extra { grid-area: extra; justify-self: center; gap: 10px; }
}
.grupo { display: flex; align-items: center; gap: 6px; }
.bt-vidro { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; color: #fff; background: rgba(40, 40, 46, .78); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border: 1px solid rgba(255, 255, 255, .09); }
.bt-vidro:active { background: rgba(70, 70, 78, .9); }
.bt-vidro[aria-pressed="true"] { background: var(--ac); color: var(--ac-tx); border-color: transparent; }
.bt-txt { font-weight: 700; font-size: 14px; } .bt-txt.grande { font-size: 22px; }
.bt-rec svg { color: var(--perigo); }
.bt-rec.gravando { background: var(--perigo); } .bt-rec.gravando svg { color: #fff; }
.bt-play { width: 66px; height: 66px; border-radius: 50%; background: var(--ac); color: var(--ac-tx); display: grid; place-items: center; box-shadow: 0 6px 24px rgba(255, 200, 61, .25); }
.bt-play svg { width: 30px; height: 30px; margin-left: 3px; }
.bt-play.pausar svg { margin-left: 0; }
#pVel { min-width: 92px; text-align: center; color: #fff; line-height: 1.05; display: flex; flex-direction: column; font-variant-numeric: tabular-nums; }
#pVel b { font-size: 22px; } #pVel small { font-size: 10.5px; color: rgba(255, 255, 255, .7); letter-spacing: .02em; }
#pVel.voz b { font-size: 15px; color: var(--ac); }
.dica { pointer-events: none; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(86%, 520px); margin: 0; text-align: center; color: #fff; font-size: 14.5px; background: rgba(20, 20, 24, .85); padding: 12px 16px; border-radius: 14px; }

/* painel de ajustes */
.painel {
  position: absolute; z-index: 8; left: 0; right: 0; bottom: 0; max-height: 72%;
  display: flex; flex-direction: column; background: rgba(21, 21, 24, .97); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  border-top: 1px solid var(--linha); border-radius: 20px 20px 0 0; box-shadow: 0 -12px 40px rgba(0, 0, 0, .5);
  padding-left: var(--esq); padding-right: var(--dir); color: var(--tx); user-select: none;
}
@media (orientation: landscape) and (max-height: 600px), (min-width: 900px) {
  .painel { left: auto; top: 0; bottom: 0; width: min(400px, 100%); max-height: none; border-radius: 0; border-top: 0; border-left: 1px solid var(--linha); padding-left: 0; padding-top: var(--topo); }
}
.painel header { display: flex; align-items: center; justify-content: space-between; padding: 10px 10px 4px 20px; flex: none; }
.painel h2 { margin: 0; font-size: 18px; }
.aj-corpo { overflow-y: auto; overscroll-behavior: contain; padding: 0 20px calc(var(--base) + 24px); -webkit-overflow-scrolling: touch; }
.aj-corpo h3 { margin: 22px 0 6px; font-size: 12px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; color: var(--ac); }
.faixa { display: block; padding: 10px 0 4px; }
.faixa > span, .opcao > span, .chave > span { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 15px; }
.faixa output { color: var(--tx2); font-variant-numeric: tabular-nums; font-size: 14px; }
.chave > span, .opcao > span { display: block; }
.chave small, .opcao small { display: block; color: var(--tx3); font-size: 12.5px; }
.chave em { font-style: normal; font-size: 11px; font-weight: 800; color: var(--ac-tx); background: var(--ac); border-radius: 4px; padding: 1px 5px; letter-spacing: .05em; }
input[type="range"] { width: 100%; height: 34px; margin: 0; -webkit-appearance: none; appearance: none; background: transparent; touch-action: pan-y; }
input[type="range"]::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: var(--sup3); }
input[type="range"]::-moz-range-track { height: 6px; border-radius: 3px; background: var(--sup3); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; margin-top: -10px; border-radius: 50%; background: #fff; box-shadow: 0 1px 6px rgba(0, 0, 0, .5); }
input[type="range"]::-moz-range-thumb { width: 26px; height: 26px; border: 0; border-radius: 50%; background: #fff; }
.chave { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 11px 0; border-bottom: 1px solid rgba(255, 255, 255, .05); cursor: pointer; }
.chave input { position: absolute; opacity: 0; pointer-events: none; }
.chave i { flex: none; width: 50px; height: 30px; border-radius: 15px; background: var(--sup3); position: relative; transition: background .2s; }
.chave i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0, 0, 0, .4); }
.chave input:checked + i { background: var(--ok); }
.chave input:checked + i::after { transform: translateX(20px); }
.chave input:focus-visible + i { outline: 2px solid var(--ac); outline-offset: 2px; }
.opcao { padding: 10px 0; }
.seg { display: flex; gap: 4px; margin-top: 8px; background: var(--sup2); border-radius: 12px; padding: 4px; }
.seg button { flex: 1; min-height: 38px; border-radius: 9px; font-size: 14px; color: var(--tx2); font-weight: 600; }
.seg button[aria-pressed="true"] { background: var(--sup3); color: var(--tx); box-shadow: 0 1px 3px rgba(0, 0, 0, .4); }
.seg .f-serifa { font-family: Georgia, serif; } .seg .f-larga { font-family: Verdana, sans-serif; } .seg .f-mono { font-family: ui-monospace, Menlo, Consolas, monospace; }
.cores button { padding: 3px; }
.am { display: grid; place-items: center; height: 34px; border-radius: 7px; font-style: normal; font-weight: 800; font-size: 15px; background: #000; border: 2px solid transparent; }
.am.branco { color: #fff; } .am.amarelo { color: #ffdc4a; } .am.verde { color: #7dff9e; } .am.claro { color: #0b0b0d; background: #fff; }
.cores button[aria-pressed="true"] { background: transparent; box-shadow: none; }
.cores button[aria-pressed="true"] .am { border-color: var(--ac); }
.duracao { display: flex; align-items: center; gap: 8px; padding: 6px 0 8px; font-size: 15px; }
.duracao span { flex: 1; }
.duracao input { width: 78px; min-height: 42px; text-align: center; background: var(--sup2); border: 1px solid var(--linha); border-radius: 10px; font-variant-numeric: tabular-nums; font-size: 16px; }
.duracao .bt-sec { min-height: 42px; padding: 0 14px; font-size: 15px; }
.nota { color: var(--tx2); font-size: 13.5px; line-height: 1.6; margin: 8px 0 0; }
kbd { font: 600 12px/1 var(--fonte); background: var(--sup3); border: 1px solid #3a3a42; border-bottom-width: 2px; border-radius: 5px; padding: 2px 6px; color: var(--tx); }

/* folha de opções */
.folha { position: fixed; inset: 0; z-index: 20; background: rgba(0, 0, 0, .55); display: flex; align-items: flex-end; justify-content: center; padding: 12px calc(var(--dir) + 12px) calc(var(--base) + 12px) calc(var(--esq) + 12px); animation: surge .18s ease-out; }
@keyframes surge { from { opacity: 0; } }
.folha-caixa { width: 100%; max-width: 460px; max-height: 80%; overflow-y: auto; background: var(--sup); border: 1px solid var(--linha); border-radius: 20px; padding: 18px 14px 12px; box-shadow: 0 20px 60px rgba(0, 0, 0, .6); }
.folha h2 { margin: 0 6px 4px; font-size: 17px; }
.folha p { margin: 0 6px 12px; color: var(--tx2); font-size: 14.5px; }
.folha p:empty { display: none; }
#folhaItens { display: grid; gap: 6px; }
#folhaItens button { min-height: 50px; border-radius: 12px; background: var(--sup2); text-align: left; padding: 0 16px; font-size: 16px; font-weight: 550; display: flex; align-items: center; gap: 10px; }
#folhaItens button:active { background: var(--sup3); }
#folhaItens button.perigo { color: var(--perigo); }
#folhaItens button.pri { background: var(--ac); color: var(--ac-tx); justify-content: center; font-weight: 700; }
#folhaItens button.cancelar { background: transparent; justify-content: center; color: var(--tx2); }
#folhaItens .passo { font-size: 15px; color: var(--tx2); padding: 4px 6px; line-height: 1.55; }
#folhaItens .passo b { color: var(--tx); }

/* aviso (operador) */
#aviso { position: fixed; z-index: 30; left: 50%; bottom: calc(var(--base) + 96px); transform: translate(-50%, 20px); max-width: min(92vw, 520px); display: flex; align-items: center; gap: 14px; background: #f3f2ef; color: #111; padding: 12px 16px; border-radius: 14px; font-size: 15px; font-weight: 550; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
#aviso.ver { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
#aviso button { color: #8a5a00; font-weight: 800; white-space: nowrap; min-height: 32px; }

#acordado { position: fixed; width: 2px; height: 2px; opacity: .01; pointer-events: none; left: 0; top: 0; }

@media (min-width: 700px) {
  #edTexto { font-size: 19px; padding-left: max(18px, calc(50% - 380px)); padding-right: max(18px, calc(50% - 380px)); }
}
@media (prefers-reduced-motion: reduce) { #contagem.pulso { animation: none; } }
