/* Pray System — tela do operador (tema escuro, bom para a cabine de som) */
/* Tema claro: fundo branco, detalhes dourados */
:root {
  color-scheme: light;
  --bg: #eaf3fc;
  --panel: #ffffff;
  --panel2: #f1f6fc;
  --field: #ffffff;
  --hover: #e4eef9;
  --line: #d5e1ee;
  --line-strong: #b9c0cc;
  --text: #1c2230;
  --muted: #687284;
  --accent: #2f86da;
  --accent-ink: #ffffff;
  --live: #d83a40;
  --live-soft: #fdecec;
  --ok: #23955a;
  --ok-soft: #e7f6ee;
  --chip: #e8f0f9;
  --shadow: 0 1px 2px rgba(28,34,48,.06), 0 2px 8px rgba(28,34,48,.05);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font: 15px/1.4 'Segoe UI', Roboto, Arial, sans-serif; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); }
[hidden] { display: none !important; }
kbd { background: var(--chip); border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; font-size: 12px; }
code { background: var(--chip); padding: 1px 5px; border-radius: 4px; font-size: 13px; }
h1, h2, h3 { margin: 0; font-weight: 650; }
h2 { font-size: 16px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mt { margin-top: 18px; }

/* Layout */
.app { container: app / inline-size; display: grid; grid-template-rows: auto 1fr auto; height: 100vh; }
.main { overflow: auto; padding: 14px; min-height: 0; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row.tight { gap: 4px; flex-wrap: nowrap; }
.row.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.spacer { flex: 1; }

/* Botões */
.btn {
  background: var(--panel2); border: 1px solid var(--line); border-radius: 9px;
  padding: 8px 14px; cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px;
}
.btn:hover { border-color: var(--line-strong); background: var(--hover); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 650; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.live { background: var(--live); border-color: var(--live); color: #fff; font-weight: 650; }
.btn.danger { background: transparent; border-color: #f0b8ba; color: var(--live); }
.btn.ghost { background: transparent; }
.btn.proj { background: var(--ok); border-color: var(--ok); color: #fff; font-weight: 650; }
.btn.sm { padding: 5px 10px; font-size: 13px; }
.btn.xs { padding: 3px 7px; font-size: 12px; border-radius: 7px; }
.btn.block { width: 100%; justify-content: center; padding: 11px; }
.btn.on { background: var(--live-soft); border-color: var(--live); color: var(--live); }
.btn:disabled { opacity: .5; cursor: default; }

.input {
  background: var(--field); border: 1px solid var(--line); border-radius: 9px; padding: 8px 11px; width: 100%;
}
.input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.input.sm { width: auto; padding: 5px 8px; }
.input.num { width: 90px; }
select.input { width: auto; }
textarea.input { resize: vertical; }
.mono { font-family: Consolas, 'Courier New', monospace; font-size: 14px; }
.fld { display: block; margin: 10px 0; color: var(--muted); font-size: 13px; }
.fld .input { margin-top: 4px; color: var(--text); font-size: 15px; }

/* Menu superior */
.topbar { background: var(--panel); box-shadow: var(--shadow); border-bottom: 1px solid var(--line); }
.menu, .sectionbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 14px; }
.brand { font-weight: 800; font-size: 18px; margin-right: 12px; display: flex; align-items: center; gap: 8px; letter-spacing: .01em; }
button.brand { background: none; border: 0; padding: 4px 6px; border-radius: 9px; cursor: pointer; }
button.brand:hover { background: var(--hover); }
.mbtn.active, .mbtn.active:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
/* Menu compacto enquanto uma seção está aberta */
.menu.compact { padding-block: 6px; }
.menu.compact .mbtn { flex-direction: row; gap: 6px; min-width: 0; padding: 7px 10px; }
.menu.compact .badge { display: none; }
.menu.compact .btn { padding: 7px 11px; }
.menu.compact .mbtn span { font-size: 18px; }
.brand.big { font-size: 26px; justify-content: center; }
.logo { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font-size: 18px; }
.mbtn {
  display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 112px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; cursor: pointer; font-weight: 600;
}
.mbtn span { font-size: 24px; line-height: 1; }
.mbtn:hover { border-color: var(--accent); background: var(--panel2); }
.sectionbar h1 { font-size: 20px; margin-left: 6px; }
.badge { font-size: 12px; padding: 4px 10px; border-radius: 99px; background: var(--panel2); color: var(--muted); border: 1px solid var(--line); }
.badge.cloud { color: #1f5f9e; border-color: #b8d3ee; }

/* Início */
.home { display: grid; grid-template-columns: 1fr 320px; gap: 14px; max-width: 1100px; }
.home-hero, .modules { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.home-hero h2 { font-size: 24px; margin-bottom: 6px; }
.steps { line-height: 1.9; padding-left: 20px; }
.modules h3 { margin-bottom: 10px; }
.mod { display: flex; justify-content: space-between; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; margin-bottom: 8px; color: var(--muted); }
.mod span { font-size: 12px; }
.mod.on { color: var(--text); border-color: var(--ok); background: var(--ok-soft); }
.mod.on span { color: var(--ok); }

/* Painéis */
.section { height: 100%; min-height: 0; }
.panel { box-shadow: var(--shadow); background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 10px; min-height: 0; overflow: auto; }
.panel-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.panel.full { height: 100%; }
.cols-songs { display: grid; grid-template-columns: minmax(240px, 1fr) minmax(240px, 1fr) minmax(320px, 2fr); gap: 12px; }
.cols-bg { display: grid; grid-template-columns: 2fr minmax(280px, 1fr); gap: 12px; }
.cols-ann { display: grid; grid-template-columns: 3fr 2fr; gap: 12px; align-items: start; }
.cols-poll { display: grid; grid-template-columns: 3fr 2fr; gap: 12px; align-items: start; }
.cols-cfg { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }

/* Listas */
.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; overflow: auto; }
.item { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 9px; background: var(--panel2); border: 1px solid transparent; cursor: pointer; }
.item:hover { border-color: var(--line); }
.item.sel { border-color: var(--accent); }
.item small { display: block; color: var(--muted); font-size: 12px; }
.item b { font-weight: 600; }
.numbered { counter-reset: n; }
.numbered .item::before { counter-increment: n; content: counter(n); color: var(--accent); font-weight: 800; width: 18px; }
.empty { color: var(--muted); padding: 10px; font-size: 14px; }

/* Slides de música */
.slides { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; align-content: start; }
.slide {
  text-align: left; background: var(--field); border: 2px solid var(--line); border-radius: 10px; padding: 12px; cursor: pointer;
  min-height: 96px; font-size: 14px; line-height: 1.45;
}
.slide:hover { border-color: var(--line-strong); }
.slide:focus, .verse:focus, .card:focus { outline: none; }
.slide-n { display: block; font-size: 11px; color: var(--accent); font-weight: 700; text-transform: uppercase; margin-bottom: 5px; letter-spacing: .04em; }
.live { border-color: var(--live) !important; box-shadow: 0 0 0 2px rgba(216,58,64,.25); }
.slide.live, .verse.live { background: var(--live-soft); }

/* Bíblia */
.bible-top { overflow: visible; position: relative; z-index: 20; flex-direction: row; align-items: flex-end; flex-wrap: wrap; margin-bottom: 10px; }
.bible-top form { flex: 1; min-width: 260px; flex-wrap: nowrap; }
/* Botão de versão com lista suspensa */
.ver-wrap { position: relative; }
.ver-btn { max-width: 360px; overflow: hidden; text-overflow: ellipsis; }
.ver-btn .caret { color: var(--muted); }
.ver-pop { position: absolute; top: calc(100% + 6px); left: 0; z-index: 50; width: min(380px, 86vw); max-height: 60vh; overflow: auto;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 30px rgba(28,34,48,.18); padding: 6px; display: flex; flex-direction: column; gap: 2px; }
.vp-item { display: grid; grid-template-columns: 96px 1fr auto; gap: 8px; align-items: center; text-align: left; background: none; border: 0; border-radius: 8px; padding: 8px 10px; cursor: pointer; }
.vp-item:hover { background: var(--hover); }
.vp-item.sel { background: var(--chip); }
.vp-item span { font-size: 13px; color: var(--muted); }
.vp-item em { font-style: normal; font-size: 12px; color: var(--ok); }
.vp-item.off em { color: var(--accent); }
.vp-item.more { display: block; color: var(--accent); font-weight: 600; border-top: 1px solid var(--line); border-radius: 0 0 8px 8px; margin-top: 4px; }
.vyr { font-weight: 400; font-size: 12px; color: var(--muted); }
.vp-h { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 8px 10px 2px; }
/* Busca em 3 campos */
.ref-fields { flex: 1 1 420px; display: grid; grid-template-columns: minmax(0, 2fr) minmax(90px, 1fr) minmax(90px, 1fr); gap: 8px; min-width: 0; }
.ref-f { position: relative; display: grid; gap: 3px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); min-width: 0; }
.ref-f .input { font-size: 16px; text-transform: none; letter-spacing: 0; color: var(--text); }
.ref-f.num .sug { min-width: 260px; }
.ref-f.num:last-child .sug { left: auto; right: 0; min-width: min(560px, 80vw); }
/* Sugestões da busca */
.ref-wrap { position: relative; min-width: 240px; }
.sug { font-size: 15px; text-transform: none; letter-spacing: 0; position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 50; max-height: 55vh; overflow: auto;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 30px rgba(28,34,48,.18); padding: 6px; }
.sug-h { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 6px 10px; }
.sug-i { display: flex; gap: 10px; align-items: baseline; width: 100%; text-align: left; background: none; border: 0; border-radius: 8px; padding: 8px 10px; cursor: pointer; }
.sug-i small { color: var(--muted); font-size: 12px; margin-left: auto; }
.sug-i span { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sug-i:hover, .sug-i.on { background: var(--chip); }
.sug-i.on { outline: 2px solid var(--accent); outline-offset: -2px; }
.sug.chapter { display: flex; flex-wrap: wrap; gap: 4px; }
.sug.chapter .sug-h { width: 100%; }
.sug-i b { color: var(--text); }
.sug.chapter .sug-i { width: auto; min-width: 44px; justify-content: center; }
.versions { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-bottom: 10px; }
.ver { text-align: left; background: var(--panel); border: 1px dashed var(--line); border-radius: 10px; padding: 8px 10px; cursor: pointer; display: flex; flex-direction: column; }
.ver b { font-size: 16px; }
.ver span { font-size: 12px; color: var(--muted); }
.ver em { font-style: normal; font-size: 12px; color: var(--accent); margin-top: 2px; }
.ver.ok { border-style: solid; border-color: var(--ok); background: var(--ok-soft); }
.ver.ok em { color: var(--ok); }
.cols-bible { display: grid; grid-template-columns: minmax(260px, 1.2fr) minmax(160px, .8fr) 2fr; gap: 12px; height: calc(100% - 96px); min-height: 360px; }
.books { display: grid; grid-template-columns: repeat(auto-fill, minmax(50px, 1fr)); gap: 5px; }
.bk { background: var(--panel2); border: 1px solid var(--line); border-radius: 7px; padding: 6px 0; cursor: pointer; font-size: 13px; font-weight: 600; }
.bk.nt { grid-column-start: 1; }
.bk.off { opacity: .35; }
.bk.sel, .chip.sel { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-content: start; }
.chip { background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; padding: 6px 11px; cursor: pointer; min-width: 40px; }
.chip:hover, .bk:hover { border-color: var(--accent); }
.verses { display: flex; flex-direction: column; gap: 6px; }
.verse { text-align: left; background: var(--field); border: 2px solid var(--line); border-radius: 9px; padding: 9px 11px; cursor: pointer; line-height: 1.45; }
.verse b { color: var(--accent); margin-right: 4px; }
.verse:hover { border-color: var(--line-strong); }

/* Grade de fundos/mídias */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; align-content: start; }
.card { position: relative; background: var(--field); border: 2px solid var(--line); border-radius: 10px; overflow: hidden; cursor: pointer; }
.card:hover { border-color: var(--line-strong); }
.card .th { display: block; width: 100%; aspect-ratio: 16/9; object-fit: cover; background: #000; }
.card-f { display: flex; justify-content: space-between; align-items: center; gap: 6px; padding: 6px 8px; font-size: 13px; }
.card-f > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vtag { position: absolute; top: 6px; left: 6px; background: rgba(0,0,0,.65); color: #fff; font-size: 11px; padding: 2px 6px; border-radius: 5px; }
.star { color: var(--muted); }
.star.on { color: var(--accent); }

.form { display: grid; gap: 10px; }
.form label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.form label.check { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: 14px; }
.form.inline { display: flex; flex-wrap: wrap; gap: 10px; }
.form input[type=color] { width: 60px; height: 34px; border: 1px solid var(--line); background: none; border-radius: 8px; }

/* Barra AO VIVO */
.dock {
  display: grid; grid-template-columns: 400px 1fr minmax(260px, 400px); gap: 14px; align-items: stretch;
  padding: 10px 14px; background: var(--panel); border-top: 1px solid var(--line); box-shadow: 0 -2px 10px rgba(28,34,48,.06);
}
.dock-prev { position: relative; }
#preview { width: 100%; aspect-ratio: 16/9; border-radius: 8px; border: 2px solid var(--live); }
.live-badge { position: absolute; top: 6px; left: 6px; background: var(--live); color: #fff; font-size: 10px; font-weight: 800; padding: 2px 7px; border-radius: 4px; letter-spacing: .08em; }
.dock-ctl { display: flex; flex-direction: column; gap: 8px; justify-content: center; min-width: 0; }
.dock-info { font-weight: 600; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dock-bgs { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.dock-h { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.quick-bgs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.qbg { padding: 0; border: 2px solid var(--line); border-radius: 7px; overflow: hidden; cursor: pointer; background: #000; position: relative; }
.qbg .th { display: block; width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.qbg .vtag { font-size: 9px; padding: 1px 4px; top: 3px; left: 3px; }
.qbg:hover { border-color: var(--accent); }
.qbg.empty { background: transparent; border: 2px dashed var(--line); aspect-ratio: 16/9; cursor: default; }
.qbg.empty:hover { border-color: var(--line); }

/* Diálogos e login */
.dlg { background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 16px; width: min(760px, 94vw); padding: 22px; }
.dlg::backdrop { background: rgba(20,24,34,.45); }
.dlg h2 { font-size: 20px; margin-bottom: 8px; }
.login { position: fixed; inset: 0; display: grid; place-items: center; background: radial-gradient(circle at 30% 20%, #d6eefc, var(--bg) 60%); padding: 16px; }
.login-card { width: min(420px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 28px; display: flex; flex-direction: column; gap: 4px; }
.login-card p { text-align: center; }

.toast {
  position: fixed; left: 50%; top: 18px; transform: translate(-50%, -150%); background: var(--text); color: #fff; border: 1px solid var(--text);
  padding: 10px 18px; border-radius: 10px; z-index: 100; transition: transform .3s, opacity .3s; opacity: 0; pointer-events: none; box-shadow: 0 10px 30px rgba(0,0,0,.2); max-width: 90vw;
}
.toast.on { transform: translate(-50%, 0); opacity: 1; }

/* Telas menores (notebook) */
@container app (max-width: 1100px) {
  .cols-songs { grid-template-columns: 1fr 1fr; }
  .cols-songs > .panel:last-child { grid-column: 1 / -1; }
  .cols-bible { grid-template-columns: 1fr 1fr; height: auto; }
  .cols-bible > .panel:last-child { grid-column: 1 / -1; }
  .versions { grid-template-columns: repeat(3, 1fr); }
  .dock { grid-template-columns: 300px 1fr; }
  .dock-bgs { grid-column: 1 / -1; }
  .quick-bgs { grid-template-columns: repeat(12, 1fr); }
  .menu { flex-wrap: wrap; }
}
@container app (max-width: 700px) {
  .cols-songs, .cols-bg, .cols-ann, .cols-poll, .cols-cfg, .cols-bible, .home { grid-template-columns: 1fr; }
  .dock { grid-template-columns: 1fr; }
  .mbtn { min-width: 0; flex: 1 1 30%; }
  .sectionbar { flex-wrap: wrap; }
  .sectionbar h1 { font-size: 17px; }
  .quick-bgs { grid-template-columns: repeat(6, 1fr); }
  .versions { grid-template-columns: 1fr 1fr; }
  .main, .dock, .menu, .sectionbar { padding-left: max(12px, env(safe-area-inset-left, 0px)); padding-right: max(12px, env(safe-area-inset-right, 0px)); }
  .bible-top form { min-width: 0; }
  .ref-fields { grid-template-columns: 1fr 1fr; flex-basis: 100%; }
  .ref-f.book { grid-column: 1 / -1; }
  .ref-f.num:last-child .sug { min-width: 0; left: auto; right: 0; width: 86vw; }
  .books { grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); }
}

/* Projetor na própria tela */
.proj-overlay { position: fixed; inset: 0; z-index: 200; background: #000; }
.proj-overlay-stage { position: absolute; inset: 0; }
.proj-overlay-close { position: absolute; top: calc(12px + env(safe-area-inset-top, 0px)); right: calc(12px + env(safe-area-inset-right, 0px)); opacity: 0; transition: opacity .3s; z-index: 2; }
.proj-overlay:hover .proj-overlay-close, .proj-overlay-close:focus { opacity: 1; }
@media (hover: none) { .proj-overlay-close { opacity: .8; } }
.small-dlg { width: min(440px, 94vw); }
.small-dlg p { margin: 0 0 12px; font-size: 16px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Editor de música com aparência */
.dlg.wide { width: min(1120px, 96vw); }
.song-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 18px; }
.song-look { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.song-look h3 { font-size: 15px; }
.sg-preview { width: 100%; aspect-ratio: 16/9; border-radius: 10px; border: 1px solid var(--line); }
.mini-bgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 6px; max-height: 190px; overflow: auto; margin-top: 4px; padding: 2px; }
.mbg { padding: 0; border: 2px solid var(--line); border-radius: 7px; overflow: hidden; cursor: pointer; background: var(--chip); position: relative; }
.mbg .th { display: block; width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.mbg .vtag { font-size: 9px; padding: 1px 4px; top: 3px; left: 3px; }
.mbg.none { font-size: 12px; color: var(--muted); aspect-ratio: 16/9; padding: 4px; }
.mbg.sel { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(208,138,28,.3); }
.up-btn { margin-top: 6px; }
.form.two { grid-template-columns: 1fr 1fr; }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; }

/* Bíblia: anotar versículo e culto de hoje */
.verse-row { display: flex; gap: 6px; align-items: stretch; }
.verse-row .verse { flex: 1; min-width: 0; }
.note-btn { opacity: .55; }
.note-btn:hover, .note-btn.on { opacity: 1; }
.note-btn.on { background: #fff4e0; border-color: var(--accent); }
.culto-btn { align-self: flex-end; }
.count { background: var(--accent); color: var(--accent-ink); border-radius: 99px; font-size: 12px; padding: 0 7px; font-weight: 700; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 94vw); z-index: 150; background: var(--panel); border-left: 1px solid var(--line);
  box-shadow: -10px 0 30px rgba(28,34,48,.15); padding: calc(14px + env(safe-area-inset-top, 0px)) calc(14px + env(safe-area-inset-right, 0px)) 14px 14px;
  display: flex; flex-direction: column; gap: 12px; overflow: auto; }
.drawer h3 { font-size: 14px; }
.drawer-sec { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--line); padding-top: 10px; }
.small-item { padding: 6px 8px; font-size: 14px; cursor: default; }
.item.static { cursor: default; background: #fff4e0; }
.hora { color: var(--muted); font-variant-numeric: tabular-nums; }
@media (max-width: 800px) { .song-grid { grid-template-columns: 1fr; } }
@media (min-width: 1100px) { body.drawer-open .main { margin-right: min(420px, 94vw); } }
@media (max-width: 700px) { .app { height: auto; min-height: 100vh; } }

/* Meia tela: slide em uma metade, painel na outra */
body.half .app { margin-left: 50vw; width: 50vw; }
body.half .dock-prev { display: none; }
.proj-overlay.half { right: auto; width: 50vw; background: #0d0f14; border-right: 2px solid var(--live); }
.proj-overlay.half .proj-overlay-stage { inset: auto 0; top: 50%; transform: translateY(-50%); aspect-ratio: 16 / 9; }
.proj-overlay.half .proj-overlay-close { opacity: 1; }
.half-label { position: absolute; top: calc(12px + env(safe-area-inset-top, 0px)); left: 12px; background: var(--live); color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .08em; padding: 3px 8px; border-radius: 4px; z-index: 2; }
.proj-overlay:not(.half) .half-label { display: none; }
.btnHere.on { background: var(--live-soft); border-color: var(--live); color: var(--live); }
#qAnn { min-width: 200px; }
.split-btn { display: inline-flex; }
.split-btn .btn:first-child { border-radius: 9px 0 0 9px; }
.split-btn .btn:last-child { border-radius: 0 9px 9px 0; border-left: 0; padding-inline: 10px; }

.fld.tema { margin: 0; }
.fld.tema .input { font-size: 16px; font-weight: 600; }

/* Meia tela: painel compacto para sobrar espaço para o conteúdo */
body.half .menu { gap: 5px; padding: 5px 8px; }
body.half .menu .brand { font-size: 0; margin-right: 2px; padding: 2px; }
body.half .menu .brand .logo { font-size: 15px; width: 28px; height: 28px; }
body.half .menu.compact .mbtn, body.half .menu .mbtn { padding: 4px 8px; font-size: 13px; gap: 4px; flex-direction: row; min-width: 0; }
body.half .menu .mbtn span { font-size: 15px; }
body.half .menu .btn { padding: 4px 9px; font-size: 13px; }
body.half .main { padding: 8px; }
body.half .panel { padding: 10px; gap: 8px; }
body.half .dock { grid-template-columns: 1fr; gap: 6px; padding: 6px 10px; }
body.half .dock-ctl { gap: 5px; }
body.half .dock-ctl .row { flex-wrap: nowrap; gap: 5px; }
body.half .dock .btn { padding: 4px 9px; font-size: 13px; border-radius: 7px; }
body.half .dock kbd { display: none; }
body.half .dock-info { font-size: 12px; }
body.half #qAnn { min-width: 0; padding: 4px 9px; font-size: 13px; }
body.half .dock-h { font-size: 11px; }
body.half .quick-bgs { grid-template-columns: repeat(12, 1fr); gap: 4px; }
body.half .qbg { border-width: 1px; border-radius: 5px; }
body.half .qbg .vtag { display: none; }
body.half .split-btn .btn:first-child { border-radius: 7px 0 0 7px; }
body.half .split-btn .btn:last-child { border-radius: 0 7px 7px 0; }
body.half .menu .mbtn { flex: 0 0 auto; }
body.half .bible-top { padding: 8px; gap: 6px; }
body.half .ref-fields { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); flex-basis: 100%; gap: 6px; }
body.half .ref-f.book { grid-column: auto; }
body.half .ref-f .input { padding: 5px 9px; font-size: 14px; }
body.half .ver-btn, body.half .culto-btn { padding: 4px 9px; font-size: 13px; }
body.half .cols-bible { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); height: auto; gap: 8px; }
body.half .cols-bible > .panel:last-child { grid-column: 1 / -1; }
body.half .books { grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); gap: 3px; }
body.half .bk { padding: 3px 0; font-size: 12px; }
body.half .chip { padding: 3px 8px; min-width: 32px; font-size: 13px; }
body.half .panel h2 { font-size: 14px; }

/* Lista de versículos ocupa a largura dos 3 campos (não vaza para fora do painel) */
.ref-fields { position: relative; }
.ref-f.num:last-child { position: static; }
.ref-f.num:last-child .sug, body.half .ref-f.num:last-child .sug { left: 0; right: 0; width: auto; min-width: 0; }
.sug.verse .sug-i span { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* Avisos sempre por cima; na meia tela ficam centralizados no painel */
.toast { z-index: 300; }
body.half .toast { left: 75vw; max-width: 46vw; }
.snip { font-style: italic; margin-top: 2px; }
.snip mark { background: #ffe7b3; color: var(--text); border-radius: 3px; padding: 0 1px; font-style: normal; font-weight: 600; }

/* Meia tela: tudo mais compacto em todas as seções */
body.half .btn { padding: 4px 9px; font-size: 13px; border-radius: 7px; gap: 4px; }
body.half .btn.xs { padding: 2px 6px; font-size: 12px; }
body.half .btn.block { padding: 7px; }
body.half .input { padding: 5px 9px; font-size: 14px; border-radius: 7px; }
body.half textarea.input { min-height: 0; }
body.half .item { padding: 6px 8px; font-size: 14px; gap: 6px; }
body.half .form { gap: 6px; }
body.half .form label { font-size: 12px; }
body.half .form.inline { gap: 6px; }
body.half .fld { margin: 6px 0; font-size: 12px; }
body.half .panel-h h2, body.half .panel h2 { font-size: 14px; }
body.half .mt { margin-top: 8px; }
body.half .cols-songs, body.half .cols-bg, body.half .cols-ann, body.half .cols-cfg { gap: 8px; }
body.half .cols-ann, body.half .cols-poll { grid-template-columns: 1fr; }
body.half #annText { height: 52px; }
body.half #annList .item .grow { font-size: 14px; }
body.half .grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 6px; }
body.half .card-f { padding: 4px 6px; font-size: 12px; }
body.half .slides { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 6px; }
body.half .slide { min-height: 70px; padding: 8px; font-size: 13px; }
body.half .verse { padding: 6px 9px; font-size: 14px; }
body.half .input.num { width: 64px; }
body.half .section { height: auto; }
body.half .panel { overflow: visible; }
body.half .cols-bg .form { grid-template-columns: 1fr 1fr; }
body.half .chips { gap: 4px; }
body.half .chip { padding: 3px 8px; font-size: 13px; }
body.half .cols-songs { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
body.half .cols-songs > .panel:last-child { grid-column: 1 / -1; }
body.half #songList .item { flex-wrap: wrap; }

/* Barra AO VIVO compacta (sempre) */
.dock { padding-block: 8px; gap: 12px; }
.dock-ctl { gap: 6px; }
.dock-ctl .row { gap: 5px; }
.dock .btn { padding: 4px 10px; font-size: 13px; border-radius: 7px; gap: 4px; }
.dock .split-btn .btn:first-child { border-radius: 7px 0 0 7px; }
.dock .split-btn .btn:last-child { border-radius: 0 7px 7px 0; padding-inline: 8px; }
.dock kbd { font-size: 10px; padding: 0 4px; opacity: .75; }
.dock .input { padding: 5px 10px; font-size: 13px; border-radius: 7px; }
.dock-info { font-size: 13px; }
.dock-h { font-size: 11px; }
.dock .btn.xs { padding: 2px 7px; font-size: 12px; }
.quick-bgs { gap: 5px; }
.qbg { border-width: 1px; border-radius: 6px; }

/* Bíblia: busca e títulos (Livros, Capítulo, Versículos) fixos; só as listas rolam */
.main:has(> #sec-biblia:not([hidden])) { display: flex; flex-direction: column; }
#sec-biblia, body.half #sec-biblia { display: flex; flex-direction: column; flex: 1; height: auto; min-height: 0; }
#sec-biblia .bible-top { flex: none; margin-bottom: 10px; position: sticky; top: -14px; }
body.half #sec-biblia .bible-top { top: -8px; }
#sec-biblia .cols-bible, body.half #sec-biblia .cols-bible { flex: 1 0 auto; height: 0; min-height: 160px; grid-template-rows: minmax(0, 1fr); }
#sec-biblia .cols-bible > .panel, body.half #sec-biblia .cols-bible > .panel { overflow: hidden; min-height: 0; }
#sec-biblia .cols-bible > .panel > h2 { flex: none; }
#bBooks, #bChapters, #bVerses { flex: 1; min-height: 0; overflow: auto; padding-right: 2px; }
@container app (max-width: 1100px) {
  #sec-biblia .cols-bible { grid-template-rows: minmax(0, 1fr) minmax(0, 1.2fr); }
}
body.half #sec-biblia .cols-bible { grid-template-rows: minmax(0, 1fr) minmax(0, 1.2fr); }
/* Celular: a página rola inteira, a busca fica grudada no topo */
@media (max-width: 700px) {
  body:not(.half) #sec-biblia .cols-bible { grid-template-rows: none; height: auto; }
  body:not(.half) #sec-biblia .cols-bible > .panel { overflow: visible; }
}

/* Fundo do resumo da palavra */
.tema-bg { display: flex; align-items: center; gap: 10px; padding: 8px; border: 1px solid var(--line); border-radius: 9px; background: var(--chip); }
.tema-bg .grow { display: flex; flex-direction: column; min-width: 0; }
.tema-bg b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tema-th { width: 64px; aspect-ratio: 16/9; border-radius: 6px; overflow: hidden; flex: none; background: repeating-linear-gradient(45deg, #eef0f4 0 6px, #fff 6px 12px); border: 1px solid var(--line); }
.tema-th .th { display: block; width: 100%; height: 100%; object-fit: cover; }
#temaDlg .sg-preview { width: min(100%, 540px); margin: 0 auto; }

/* Busca de letra no cadastro de música */
.lyr-search { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--chip); margin-top: 8px; }
.lyr-search .input { flex: 1; min-width: 0; }
.ls-ico { font-size: 16px; }
.ls-help { margin: 4px 2px 8px; }
@media (max-width: 700px) { .lyr-search { flex-wrap: wrap; } .lyr-search .btn { width: 100%; } }
.ls-help p { margin: 2px 0; }
.ls-help { margin: 4px 2px 8px; }
.btn.bm { cursor: grab; }

/* Modelos da letra com botão de excluir */
.chip.preset { display: inline-flex; align-items: center; padding: 0; overflow: hidden; }
.chip.preset .chip-in { border: 0; background: none; font: inherit; color: inherit; padding: 5px 4px 5px 12px; cursor: pointer; }
.chip.preset .chip-x { border: 0; background: none; color: var(--muted); padding: 5px 9px 5px 5px; cursor: pointer; font-size: 11px; }
.chip.preset .chip-x:hover { color: var(--live); }

/* ===================== Acolhimento ===================== */
.acol { display: flex; flex-direction: column; gap: 12px; }
.acol-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.acol-tabs { display: flex; gap: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 4px; flex-wrap: wrap; }
.atab { background: none; border: 0; border-radius: 9px; padding: 8px 14px; cursor: pointer; font-weight: 600; color: var(--muted); display: inline-flex; gap: 6px; align-items: center; }
.atab:hover { background: var(--hover); color: var(--text); }
.atab.active { background: var(--accent); color: var(--accent-ink); }
.acount { background: var(--live); color: #fff; border-radius: 99px; font-size: 11px; padding: 0 7px; line-height: 18px; }
.acount:empty { display: none; }
.acol-body { flex: 1; min-height: 320px; }
.acol-body h3 { font-size: 15px; margin-bottom: 8px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.tile { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: var(--panel2); display: flex; flex-direction: column; gap: 2px; }
.tile b { font-size: 30px; line-height: 1.1; }
.tile span { font-size: 13px; }
.tile small { font-size: 12px; color: var(--muted); }
.tile.warn { background: #fff4e0; border-color: #f1cf8e; }
.tile.ok { background: var(--ok-soft); border-color: #b5dfc6; }
.ac-cols { display: grid; grid-template-columns: 3fr 2fr; gap: 18px; margin-top: 8px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: #dceefc; color: #1d6fbf; display: grid; place-items: center; font-weight: 700; flex: none; }
.tag { font-size: 11px; padding: 2px 8px; border-radius: 99px; background: var(--chip); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
.tag.ok { background: var(--ok-soft); color: var(--ok); border-color: #b5dfc6; }
.tag.warn { background: #fff4e0; color: #9a6210; border-color: #f1cf8e; }
.tag.c1 { color: var(--muted); }
.tag.c2 { color: #1f5f9e; border-color: #b8d3ee; background: #eef5fc; }
.tag.c3 { color: #23955a; border-color: #b5dfc6; background: var(--ok-soft); }
.tag.mute { font-style: italic; }
.item.alert { border-left: 4px solid var(--line-strong); }
.item.alert.l3 { border-left-color: var(--live); }
.item.alert.l2 { border-left-color: var(--accent); }
.chip.here { background: var(--ok-soft); border-color: var(--ok); color: var(--ok); }
.chip.static { cursor: default; display: inline-flex; align-items: center; gap: 4px; }
.chip .x { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 0 2px; }
.chip.meet small { color: var(--muted); }
.ac-empty { text-align: center; max-width: 520px; margin: 30px auto; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.ac-empty h2 { font-size: 20px; }
.ac-empty-ico { font-size: 40px; width: 72px; height: 72px; border-radius: 50%; background: #dceefc; display: grid; place-items: center; }
.hosts { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.host { border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.link { cursor: pointer; }
.link:hover { color: var(--accent); }
.pd-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 18px; margin-top: 8px; }
.pd-col h3 { font-size: 14px; margin-bottom: 6px; }
.pd-box { border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.pd-box .list { max-height: 140px; }
.consent { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.copt { border: 2px solid var(--line); border-radius: 10px; padding: 10px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.copt input { display: none; }
.copt small { color: var(--muted); font-size: 12px; }
.copt.sel { border-color: var(--accent); background: #fff8ec; }
.btn.wa { background: #25a35a; border-color: #25a35a; color: #fff; }
.card-qr-wrap { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.card-qr img { width: 200px; height: 200px; border: 1px solid var(--line); border-radius: 12px; padding: 8px; background: #fff; }
@container app (max-width: 900px) {
  .ac-cols, .pd-grid { grid-template-columns: 1fr; }
  .consent { grid-template-columns: 1fr; }
}
/* Menu com o botão Acolhimento: um pouco mais justo para caber numa linha */
.mbtn { min-width: 98px; padding: 10px; }
.menu.compact .mbtn { padding: 7px 9px; font-size: 14px; }
.menu.compact .mbtn span { font-size: 17px; }

/* ===================== Páginas próprias (tela inicial e Acolhimento) ===================== */
body.page { height: auto; min-height: 100%; }
.page .main.page-main { max-width: 1200px; margin: 0 auto; padding: 18px 16px 40px; overflow: visible; }
.page-name { font-weight: 650; color: var(--muted); }
a.brand { color: var(--text); text-decoration: none; }
a.btn { text-decoration: none; color: inherit; }
.hello { margin: 8px 0 18px; }
.hello h1 { font-size: 26px; }
.tiles-mod { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.tile-mod { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 20px; display: flex; flex-direction: column; gap: 6px; color: var(--text); text-decoration: none; box-shadow: var(--shadow); min-height: 180px; }
a.tile-mod:hover { border-color: var(--accent); transform: translateY(-1px); }
.tile-mod .tm-ico { font-size: 34px; line-height: 1; margin-bottom: 4px; }
.tile-mod b { font-size: 18px; }
.tile-mod small { color: var(--muted); font-size: 13px; flex: 1; }
.tile-mod .tm-go { font-size: 13px; font-weight: 650; color: var(--accent); }
.tile-mod.off { background: var(--panel2); box-shadow: none; }
.tile-mod.off b, .tile-mod.off .tm-ico { opacity: .55; }
.tile-mod.off .tm-go { color: var(--muted); font-weight: 500; }
.users-panel { margin-top: 22px; overflow: visible; }
.umods { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.page .acol-body { min-height: 60vh; overflow: visible; }

/* Fotos e vídeos em dois locais */
.cols-media { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cols-media > .panel { min-height: 0; }
@container app (max-width: 900px) { .cols-media { grid-template-columns: 1fr; height: auto; } }
body.half .cols-media { grid-template-columns: 1fr; }

/* Fundos rápidos por seção */
.btn.star.ctx { padding: 2px 5px; filter: grayscale(1); opacity: .55; }
.fav-chips { display: flex; flex-wrap: wrap; gap: 3px; padding: 0 8px 7px; }
.btn.star.ctx.on { filter: none; opacity: 1; background: #fdf1dc; border-color: var(--accent); }

/* Novidades de outras igrejas */
.notif-wrap { position: relative; }
.notif-btn.has { border-color: var(--accent); background: #fdf1dc; }
.notif-btn .count { margin-left: 2px; }
.notif-pop { position: absolute; right: 0; top: calc(100% + 8px); width: min(440px, 92vw); max-height: 70vh; overflow: auto; z-index: 120;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(0,0,0,.18); padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.notif-pop h2 { font-size: 16px; margin: 0; }
.notif-pop h3 { font-size: 14px; margin: 0; }
.offers { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.offer { border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: var(--panel); }
.offer .th { display: block; width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.offer-f { display: flex; flex-direction: column; gap: 5px; padding: 6px 8px; font-size: 13px; }
.bg-pending { border: 1px dashed var(--accent); background: #fffaf0; border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 8px; margin-bottom: 4px; }
.tag-new { display: inline-block; font-size: 10px; font-weight: 700; color: #fff; background: var(--ok); border-radius: 5px; padding: 1px 6px; vertical-align: middle; text-transform: uppercase; }
.menu.compact #modeBadge { display: none; }
@container app (max-width: 1500px) { .menu.compact .lbl { display: none; } }

/* Abas de fundos: Imagens / Vídeos / Cores */
.bg-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 2px; }
.bg-tabs .tab { border: 0; background: none; font: inherit; font-weight: 600; color: var(--muted); padding: 8px 14px; border-bottom: 3px solid transparent; margin-bottom: -1px; cursor: pointer; border-radius: 8px 8px 0 0; }
.bg-tabs .tab:hover { color: var(--text, #222); background: var(--chip); }
.bg-tabs .tab.on { color: var(--accent); border-bottom-color: var(--accent); }
.bg-tabs .count { font-size: 11px; font-weight: 600; background: var(--chip); color: var(--muted); border-radius: 10px; padding: 1px 7px; margin-left: 3px; }
.bg-tabs .tab.on .count { background: #fdf1dc; color: var(--accent); }
body.half .bg-tabs .tab { padding: 5px 9px; font-size: 13px; }

/* Imagem recebida da internet */
.img-in-prev { background: #111; border-radius: 10px; overflow: hidden; aspect-ratio: 16/9; display: grid; place-items: center; margin: 8px 0; }
.img-in-prev img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }

/* Botão Baixar (bookmarklet) visível no menu e no início */
.bm-pop { width: min(400px, 92vw); }
.bm-pop ol { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.bm-drag { display: grid; place-items: center; padding: 14px; border: 2px dashed var(--line); border-radius: var(--radius); }
.bm-drag .btn { font-size: 16px; padding: 10px 18px; }
.bm-home { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); display: grid; gap: 8px; justify-items: start; }
p.warn { background: #fff4e0; border: 1px solid #f1cf8e; color: #7a4d0c; border-radius: 8px; padding: 8px 10px; margin: 8px 0 0; }

/* Músicas: o nome da música fica fixo em cima; só os slides rolam */
#sec-musicas > .panel:last-child { overflow: hidden; }
#sec-musicas > .panel:last-child > .panel-h { flex: none; }
#slides { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 2px; }
@media (max-width: 1100px) { #sec-musicas > .panel:last-child { max-height: 75vh; } }
body.half #sec-musicas > .panel:last-child { max-height: 70vh; }
@container app (max-width: 1500px) { .menu #modeBadge { display: none; } }
/* Prévia da música embaixo, à esquerda (fica visível ao rolar, sem cobrir os fundos) */
#songDlg .song-lyrics { display: flex; flex-direction: column; }
#songDlg .sg-prev-wrap { margin-top: 10px; display: grid; gap: 4px; }
#songDlg .sg-prev-wrap .sg-preview { width: min(100%, 420px); }

/* Interação: nuvem de palavras */
.pl-count { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; padding: 12px 14px; border-radius: 12px; background: #eef6fd; border: 1px solid #cfe6f8; }
.pl-count b { font-size: 34px; line-height: 1; color: var(--accent); }
.pl-count span { font-weight: 600; }
.pl-test { border: 1px dashed var(--line-strong); border-radius: 12px; padding: 10px 12px; display: grid; gap: 6px; }
.pl-test p { margin: 0; }
.pl-qr-row { display: flex; gap: 14px; align-items: flex-start; }
.pl-qr { width: 150px; height: 150px; flex: none; border: 1px solid var(--line); border-radius: 12px; padding: 8px; background: #fff; display: grid; place-items: center; }
.pl-qr img { width: 100%; height: 100%; image-rendering: pixelated; }
.pl-list { max-height: 360px; }
.pl-list .item { cursor: default; }
.pl-list .item.off b { text-decoration: line-through; color: var(--muted); }
.pl-list .n { min-width: 26px; text-align: center; font-weight: 800; color: var(--accent); }
#plThemes .chip { font-size: 13px; }
.pl-kinds { flex-basis: 100%; display: flex; gap: 16px; flex-wrap: wrap; font-size: 14px; }
.pl-kinds b { font-size: 18px; color: var(--accent); }
.pl-hist { max-height: 420px; }
.pl-hist .item { cursor: default; align-items: flex-start; }
.pl-hist .h-main { flex: 1; min-width: 0; }
.pl-hist .h-nums { display: flex; gap: 10px; flex-wrap: wrap; font-size: 13px; margin-top: 3px; }
.pl-hist .h-nums b { color: var(--accent); }
.pl-hist .h-words { font-size: 12px; color: var(--muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.half .pl-qr { width: 110px; height: 110px; }

/* Fundos: título, botões e abas ficam fixos no topo ao rolar */
.bg-head { position: sticky; top: -14px; z-index: 5; background: var(--panel); margin: -14px -14px 0; padding: 14px 14px 0; display: grid; gap: 10px; }

/* Cabeçalhos das telas: selo colorido com ícone, título e uma linha explicando */
#sec-musicas, body[data-sec="musicas"] { --acc: #2f86da; } #sec-biblia, body[data-sec="biblia"] { --acc: #1f5fc4; } #sec-midia, body[data-sec="midia"] { --acc: #1f8a52; }
#sec-recados, body[data-sec="recados"] { --acc: #d83a40; } #sec-fundos, body[data-sec="fundos"] { --acc: #7b3fb3; } #sec-interacao, body[data-sec="interacao"] { --acc: #0f8a9c; }
.section .panel { border-top: 3px solid var(--acc, var(--accent)); }
h2.ph { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: center; font-size: 17px; font-weight: 750; line-height: 1.2; min-width: 0; }
h2.ph::before { content: attr(data-ico); grid-row: span 2; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-size: 18px; font-weight: 400;
  background: color-mix(in srgb, var(--acc, var(--accent)) 14%, #fff); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--acc, var(--accent)) 25%, #fff); }
h2.ph[data-sub]::after { content: attr(data-sub); font-size: 12px; font-weight: 500; color: var(--muted); }
h2.ph.mt { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); }
body.half h2.ph { font-size: 14px; }
body.half h2.ph::before { width: 26px; height: 26px; font-size: 14px; border-radius: 8px; }
body.half h2.ph::after { display: none; }
/* Número do slide como selo pequeno, com a estrofe começando na mesma linha */
.slide-n { display: inline-block; margin: 0 6px 0 0; padding: 1px 6px; border-radius: 6px; background: color-mix(in srgb, var(--accent) 14%, #fff); vertical-align: 1px; line-height: 1.5; }
.slide { min-height: 64px; }
/* Cartões das estrofes crescem até caber o texto todo */
#slides { grid-auto-rows: max-content; }
.slide { height: auto; overflow: visible; padding: 12px 14px; }

/* Cada aba usa a sua cor nos botões, abas, seleções e molduras */
body[data-sec] { --accent: var(--acc); }
body[data-sec] .dock, body[data-sec] .drawer { border-top: 3px solid var(--acc); }
body[data-sec] .dlg { border-top: 4px solid var(--acc); }
.mbg.sel { box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 30%, transparent); }
.note-btn.on, .btn.star.ctx.on, .notif-btn.has { background: color-mix(in srgb, var(--accent) 12%, #fff); }
.bg-tabs .tab.on .count { background: color-mix(in srgb, var(--accent) 14%, #fff); }
.copt.sel { background: color-mix(in srgb, var(--accent) 8%, #fff); }
.bg-pending { background: color-mix(in srgb, var(--accent) 5%, #fff); }

/* Barra ao vivo: como o recado aparece (onde, cor, fundo e tempo) */
.dock-ann { gap: 6px; flex-wrap: nowrap; }
.dock-ann .input { padding: 5px 8px; font-size: 13px; min-width: 0; flex: 1 1 0; }
.ann-bg-btn { padding: 3px 8px; display: inline-flex; align-items: center; gap: 4px; flex: none; }
.ann-th { width: 30px; height: 20px; border-radius: 4px; overflow: hidden; border: 1px solid var(--line); display: inline-block; background: repeating-linear-gradient(45deg, #eee 0 4px, #fff 4px 8px); }
.ann-th .th { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Botões da direita do menu no mesmo formato dos botões das abas (ícone em cima, nome embaixo) */
.menu .tbtn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-width: 92px; align-self: stretch;
  border-radius: 12px; padding: 10px 12px; font-weight: 600; position: relative; }
.menu .tbtn .ic { font-size: 24px; line-height: 1; }
.menu .tbtn:not(.proj):not(.church-chip):not(.has) { background: var(--panel); }
.menu .tbtn:not(.proj):not(.church-chip):hover { border-color: var(--accent); background: var(--panel2); }
.menu .tbtn .count { position: absolute; top: 4px; right: 6px; }
.menu .church-chip { background: var(--panel2); border: 1px solid var(--line); color: var(--text); cursor: default; max-width: 170px; }
.menu .church-chip .lbl { max-width: 146px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.menu.compact .tbtn { flex-direction: row; gap: 6px; padding: 7px 10px; min-width: 0; }
.menu.compact .tbtn .ic { font-size: 18px; }
.menu.compact .tbtn .count { position: static; }
body.half .menu .tbtn { flex-direction: row; gap: 4px; padding: 4px 9px; min-width: 0; }
body.half .menu .tbtn .ic { font-size: 15px; }

/* Novidades: marcar fundos para baixar de uma vez */
.offer.pick { position: relative; cursor: pointer; display: block; }
.offer.pick .pick-box { position: absolute; top: 6px; left: 6px; width: 20px; height: 20px; accent-color: var(--accent); z-index: 1; }
.offer.pick.on { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 35%, transparent); }
.offer-bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin: 6px 0 8px; }
/* Músicas: busca na mesma linha do título */
#sec-musicas .panel-h:has(#songSearch) { flex-wrap: nowrap; }
#sec-musicas .panel-h:has(#songSearch) h2.ph { flex: none; }
#sec-musicas #songSearch { flex: 1 1 auto; min-width: 90px; width: auto; }
#sec-musicas #songNew { flex: none; }

/* Nova música: passos para baixar a letra */
.ls-help { display: flex; flex-direction: column; gap: 6px; margin: 8px 0 12px; padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, var(--accent) 6%, #fff); border: 1px solid color-mix(in srgb, var(--accent) 25%, var(--line)); }
.ls-step { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; line-height: 1.45; }
.ls-step .ls-n { font-size: 18px; line-height: 1.2; flex: none; }
.ls-step .bm { margin-left: 4px; }
.ls-help p { margin: 2px 0 0; }
/* "Pray System" no menu: botão que volta para a tela dos módulos */
#menu a.brand { align-self: stretch; padding: 8px 16px 8px 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); }
#menu a.brand:hover { border-color: #2f86da; background: var(--panel2); }
#menu.compact a.brand { padding: 4px 12px 4px 6px; }

/* Tela inicial do Data Show ocupando a largura toda */
.home { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: none; align-items: stretch; }
.home-hero, .home .modules { border-width: 2px; }
.home .bm-home { margin-top: 0; padding-top: 0; border-top: 0; }
.menu .home-btn { margin-right: 4px; }
@media (max-width: 1000px) { .home { grid-template-columns: 1fr; } }

/* Menu de cima: botões com contorno mais grosso, espalhados pela largura toda (também com uma seção aberta e na meia tela) */
#menu .spacer { display: none; }
.menu .mbtn, .menu .tbtn, #menu a.brand { border-width: 2px; }
.menu > .mbtn, .menu > .tbtn, .menu > .notif-wrap, .menu > #brandPortal { flex: 1 1 0; min-width: 0; }
body.half .menu > .mbtn, body.half .menu > .tbtn, body.half .menu > .notif-wrap { flex: 1 1 0; }
.menu > .notif-wrap > .tbtn { width: 100%; height: 100%; }
.menu > #brandPortal { flex-grow: 1.6; justify-content: center; margin-right: 0; white-space: nowrap; }
#menu { align-items: stretch; gap: 6px; }
.menu .mbtn, .menu .tbtn { white-space: nowrap; justify-content: center; padding-inline: 6px; overflow: hidden; }
/* Os 3 cartões da tela inicial com títulos e textos do mesmo tamanho */
.home .modules h3 { font-size: 24px; margin-bottom: 6px; }
.home .modules p.small { font-size: 15px; line-height: 1.55; }
.home-hero h2, .home .modules h3 { font-size: 24px; font-weight: 750; line-height: 1.25; }
/* Com uma seção aberta: o "Pray System" fica só com o logo para caber o nome de todos os botões */
.menu.compact > #brandPortal { flex-grow: .5; font-size: 0; gap: 0; }
.menu.compact > #brandPortal .logo { font-size: 18px; }
.menu.compact .mbtn, .menu.compact .tbtn { font-size: 13.5px; gap: 5px; }
@container app (max-width: 1500px) { .menu.compact .tbtn .lbl { display: inline; } }
/* Meia tela: só os ícones */
body.half .menu .mbtn, body.half .menu .tbtn { font-size: 0; }
body.half .menu .count { font-size: 11px; }
@container app (max-width: 1500px) { body.half .menu .tbtn .lbl { display: none; } }
body.half .menu.compact .mbtn, body.half .menu.compact .tbtn { font-size: 0; }
@container app (max-width: 1500px) { .menu.compact #notifBtn .lbl { display: none; } }

/* Tela dos módulos (index.html): cabeçalho com a igreja em destaque e Sair no canto direito; cartões menores */
.page .topbar .menu { align-items: center; }
.page .menu .page-name:not(:empty) { color: var(--text); background: var(--panel2); border: 1px solid var(--line); border-radius: 99px; padding: 6px 14px; font-size: 15px; }
#pChurch:not(:empty)::before { content: "⛪ "; }
.page .menu #pOut { margin-left: 4px; }
.page .main.page-main { padding-top: 12px; }
.hello { margin: 4px 0 12px; }
.hello h1 { font-size: 24px; }
.tiles-mod { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.tile-mod { min-height: 0; padding: 14px 16px; gap: 4px; border-width: 2px; }
.tile-mod .tm-ico { font-size: 28px; margin-bottom: 2px; }
.tile-mod b { font-size: 17px; }
.tile-mod small { font-size: 13px; }
.users-panel { margin-top: 14px; }
/* Tela inicial do Data Show: cartões mais compactos */
.home-hero, .home .modules { padding: 16px 18px; }
.home-hero h2, .home .modules h3 { font-size: 20px; margin-bottom: 4px; }
.home-hero > p, .home .modules p.small { font-size: 14px; line-height: 1.5; }
.home .steps { line-height: 1.6; font-size: 14px; margin-top: 8px; }
.home .bm-home { gap: 6px; }
/* Novidades com uma seção aberta: sino + número, sem cortar (o nome aparece ao passar o mouse) */
.menu.compact #notifBtn .lbl { display: none; }
.menu.compact #notifBtn { overflow: visible; gap: 6px; }
.menu.compact #notifBtn .count { position: static; margin: 0; }

/* Logo Pray System (azul) — sempre no canto do menu e na tela de login */
.logo { background: #fff url(../img/logo-icone.svg) center / 82% no-repeat; border: 1px solid #cfe6f8; font-size: 0 !important; color: transparent; }
.menu.compact > #brandPortal .logo, body.half .menu .brand .logo { font-size: 0 !important; }
#menu a.brand:hover { border-color: #3a8fe0; }
.login { background: radial-gradient(circle at 25% 15%, #d6eefc, transparent 55%), radial-gradient(circle at 80% 90%, #cfe3fa, transparent 50%), #f3f8fd; }
.login-card { border: 2px solid #cfe6f8; box-shadow: 0 10px 40px rgba(47,134,218,.12); }
.login-logo { display: block; width: 190px; max-width: 70%; margin: 0 auto 6px; }
.login-card .lg-title { text-align: center; color: #2f86da; }
.login-card .btn.primary { background: linear-gradient(180deg, #5bb4f0, #2f86da); border-color: #2f86da; color: #fff; }
.login-card .btn.primary:hover { filter: brightness(1.06); }
.login-card a { color: #2f86da; }
.login-card .input:focus { outline: 2px solid #3a8fe0; }
.menu .brand .logo { width: 40px; height: 40px; background-size: 88%; }
body.half .menu .brand .logo { width: 30px; height: 30px; }
/* Login compacto: cabe na tela de notebook e rola se precisar */
.login { display: flex; overflow-y: auto; padding: 12px; }
.login-card { margin: auto; padding: 18px 24px; gap: 2px; }
.login-logo { width: 120px; margin: 0 auto 2px; }
.login-card .lg-title { margin-top: 2px; font-size: 17px; }
.login-card p:empty { display: none; }
.login-card .fld { margin: 6px 0; }
.login-card .lg-hint { margin-top: 4px; font-size: 12px; }
.login-card .lg-links { margin-top: 4px; }
.login-card .lg-test { margin-top: 10px; padding: 8px 10px; }
.login-card .lg-test #lgTestList { gap: 4px; margin: 6px 0; }
.login-card .lg-test #lgTestList > * { padding-top: 6px; padding-bottom: 6px; }

/* Azul do logo em todo o sistema: botão principal com o mesmo degradê do login */
.btn.primary { background: linear-gradient(180deg, #5bb4f0, #2f86da); border-color: #2f86da; color: #fff; }
body[data-sec] .btn.primary { background: var(--accent); border-color: var(--accent); }
/* Logo maior no cabeçalho */
.menu .brand .logo { flex: none; width: 52px; height: 52px; border-radius: 12px; background-size: 90%; }
.menu .brand { font-size: 20px; }
#menu.compact .brand .logo { width: 40px; height: 40px; }
body.half .menu .brand .logo { width: 30px; height: 30px; }
#menu a.brand { flex: 0 0 auto; min-width: max-content; padding: 6px 14px 6px 8px; }

/* Identidade visual: fundo azul bem clarinho, igual ao login, em todas as telas */
body.page { background: radial-gradient(circle at 20% 0%, #d6eefc, transparent 45%), radial-gradient(circle at 90% 100%, #d4e6fa, transparent 45%), var(--bg); background-attachment: fixed; }
/* Tela dos módulos: logo grande à esquerda dos cartões */
#portal .main.page-main { max-width: 1340px; }
.portal-top { display: grid; grid-template-columns: 220px 1fr; gap: 24px; align-items: center; margin-bottom: 14px; }
.portal-logo { width: 100%; display: block; }
.portal-right { min-width: 0; }
.portal-right .tiles-mod { grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); }
@media (max-width: 760px) { .portal-top { grid-template-columns: 1fr; } .portal-logo { width: 150px; margin: 0 auto; } }

/* Recados: configurações de como aparecem ficam no painel Recados salvos */
.ann-set-l { margin: 4px 0 -2px; }
.ann-set { flex-wrap: wrap; padding: 8px; background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; }
.ann-set .input { flex: 1 1 140px; font-size: 14px; padding: 7px 10px; }
.ann-set { flex-wrap: nowrap; align-items: stretch; }
.ann-set .input { flex: 1 1 0; }
.ann-set .btn { flex: none; }
#qAnnForm .q-color { flex: 0 1 170px; min-width: 0; padding: 6px 8px; font-size: 13px; }
#qAnnForm { flex-wrap: nowrap; } #qAnnForm .input.grow { min-width: 0; flex: 1 1 auto; } #qAnnForm .btn { flex: none; }
#qAnnForm .q-color { flex: 0 0 150px; }

/* Selecionado com um clique (ainda não está no telão); dois cliques projetam */
.slide.pick, .verse.pick, #annList .item.pick { box-shadow: inset 0 0 0 2px var(--accent); }
.slide.pick:not(.live), .verse.pick:not(.live), #annList .item.pick { background: color-mix(in srgb, var(--accent) 8%, #fff); }
#annList .item[data-t] { cursor: pointer; user-select: none; }
.slide, .verse { user-select: none; }
/* Barra ao vivo: botões maiores, ocupando toda a largura entre a prévia e os fundos rápidos */
body:not(.half) .dock-ctl { gap: 10px; }
body:not(.half) .dock-ctl > .row { flex-wrap: nowrap; gap: 8px; }
body:not(.half) .dock-ctl > .row > .btn, body:not(.half) .dock-ctl > .row > .split-btn { flex: 1 1 0; justify-content: center; }
body:not(.half) .dock-ctl > .row > .split-btn { display: flex; }
body:not(.half) .dock-ctl > .row > .split-btn > .btn:first-child { flex: 1 1 auto; justify-content: center; }
body:not(.half) .dock-ctl .btn, body:not(.half) .dock-ctl .input { font-size: 15px; padding-block: 10px; }
body:not(.half) .dock-ctl > .row > .btn, body:not(.half) #qAnnForm > .btn { white-space: nowrap; }
body:not(.half) #qAnnForm .input.grow { flex: 2 1 0; }
body:not(.half) #qAnnForm .q-color { flex: 1 1 0; min-width: 140px; }
body:not(.half) #qAnnForm > .btn { flex: 0 0 auto; padding-inline: 18px; }
body:not(.half) .dock-info { font-size: 14px; }
body:not(.half) #qAnnForm .q-color { font-size: 15px; padding-block: 10px; }
.dock-ctl { container-type: inline-size; }
body:not(.half) .dock-ctl > .row > .btn, body:not(.half) .dock-ctl > .row > .split-btn { flex: 1 1 auto; min-width: 0; }
@container (max-width: 700px) {
  .dock-ctl kbd { display: none; }
  body:not(.half) .dock-ctl .btn, body:not(.half) .dock-ctl .input, body:not(.half) #qAnnForm .q-color { font-size: 14px; padding-inline: 8px; }
  body:not(.half) #qAnnForm .q-color { min-width: 0; flex: 1 1 0; }
  body:not(.half) #qAnnForm > .btn { padding-inline: 10px; }
}

/* Fundos da barra ao vivo: todos, com barra de rolagem (os rápidos ⭐ primeiro) */
.dock-bgs { height: 0; min-height: 100%; }
.quick-bgs { flex: 1 1 auto; min-height: 0; overflow-y: auto; align-content: start; padding-right: 4px; scrollbar-width: thin; }
.qbg.fav::after { content: '⭐'; position: absolute; right: 2px; bottom: 1px; font-size: 10px; line-height: 1; filter: drop-shadow(0 0 2px rgba(0,0,0,.6)); }
@container app (max-width: 1100px) { .dock-bgs { height: auto; min-height: 0; } .quick-bgs { max-height: 132px; } }
body.half .dock-bgs { height: auto; min-height: 0; }
body.half .quick-bgs { max-height: 110px; }
/* Clicar entre as estrofes não pinta nada de azul (seleção de texto do navegador) */
.dock, #preview, .dock-prev, #slides, #bVerses, #annList { user-select: none; -webkit-user-select: none; }

/* Músicas: Lista do culto (1ª coluna), letra inteira (2ª) e slides (3ª); Biblioteca abre numa janela */
.lib-open { margin-bottom: 10px; font-size: 15px; padding: 10px 12px; }
.lib-open .muted-in { font-weight: 500; opacity: .85; font-size: 13px; }
.lib-dlg { width: min(720px, 94vw); height: min(640px, 86vh); padding: 18px; display: none; }
.lib-dlg[open] { display: flex; flex-direction: column; gap: 10px; }
.lib-dlg .panel-h { display: flex; gap: 8px; align-items: center; }
.lib-dlg #songSearch { flex: 1 1 auto; min-width: 0; }
.lib-dlg #songList { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.lyr-full { flex: 1 1 auto; min-height: 0; overflow-y: auto; font-size: 15px; line-height: 1.55; padding-right: 6px; }
.lyr-full p { margin: 0 0 14px; }
.lyr-full .lyr-artist { color: var(--muted); font-size: 13px; margin-bottom: 10px; }
.lib-open { justify-content: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lib-dlg .panel-h { flex-wrap: nowrap; }
.lib-dlg .panel-h h2 { flex: none; }
.quick-bgs { grid-auto-rows: max-content; }
.quick-bgs .qbg { aspect-ratio: 16 / 9; flex-shrink: 0; }
.quick-bgs .qbg .th { height: 100%; }

/* Filtro dos fundos no rodapé */
.quick-type { display: flex; gap: 4px; }
.quick-type .qt { flex: 1 1 0; font: inherit; font-size: 12px; padding: 4px 6px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); color: var(--text); cursor: pointer; white-space: nowrap; }
.quick-type .qt:hover { border-color: var(--accent); }
.quick-type .qt.on { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 650; }
.qbg-none { grid-column: 1 / -1; margin: 6px 0; }
/* Miniaturas dos fundos no rodapé maiores (3 por linha), com rolagem */
.dock .quick-bgs { grid-template-columns: repeat(3, 1fr); gap: 6px; }
@container app (max-width: 1100px) { .dock .quick-bgs { grid-template-columns: repeat(6, 1fr); max-height: 200px; } }
body.half .dock .quick-bgs { grid-template-columns: repeat(6, 1fr); max-height: 150px; }

/* ===================== PADRÃO DO CABEÇALHO (todas as telas) =====================
   Mesmo formato em Data Show, Acolhimento, Pregações, Painel geral e tela dos módulos:
   "Pray System" com o logo de verdade (desenho + letreiro azul), botões com ícone em cima
   e nome embaixo, contorno de 2px, cantos arredondados e a mesma altura. */
.topbar :is(#menu, .menu) { display: flex; flex-wrap: nowrap; align-items: stretch; gap: 6px; padding: 8px 12px; }
.topbar :is(#menu, .menu) > * { flex-shrink: 1; }
/* Marca: desenho + letreiro "PRAY SYSTEM" igual ao logo */
.topbar :is(#menu, .menu) .brand { flex: 0 0 auto; min-width: 0; display: flex; align-items: center; gap: 10px; margin: 0;
  padding: 4px 12px 4px 6px; gap: 8px; border: 2px solid var(--line); border-radius: 12px; background: var(--panel); font-size: 0; color: transparent; }
.topbar :is(#menu, .menu) a.brand:hover { border-color: var(--accent); background: var(--panel2); }
.topbar :is(#menu, .menu) .brand .logo { flex: none; width: 36px; height: 36px; border-radius: 9px; background-size: 90%; }
.brand-word { display: block; height: 26px; width: auto; flex: none; }
/* Todos os botões do cabeçalho iguais */
.topbar :is(#menu, .menu) :is(.mbtn, .tbtn) { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  min-width: 0; margin: 0; padding: 8px 6px; border: 2px solid var(--line); border-radius: 12px; background: var(--panel);
  font-size: 14.5px; font-weight: 600; line-height: 1.15; text-align: center; white-space: normal; overflow: hidden; position: relative; color: var(--text); text-decoration: none; }
.topbar :is(#menu, .menu) :is(.mbtn, .tbtn) > span:first-child, .topbar :is(#menu, .menu) .tbtn .ic { font-size: 24px; line-height: 1; flex: none; }
.topbar :is(#menu, .menu) :is(.mbtn, .tbtn) .lbl { display: block; max-width: 100%; }
.topbar :is(#menu, .menu) :is(.mbtn, .tbtn):not(.page-tab):not(.church-chip):not(.active):not(.proj):hover { border-color: var(--accent); background: var(--panel2); }
.topbar :is(#menu, .menu) .mbtn.active, .topbar :is(#menu, .menu) .page-tab { background: var(--accent); border-color: var(--accent); color: #fff; }
.topbar :is(#menu, .menu) .tbtn.proj { background: var(--ok); border-color: var(--ok); color: #fff; }
.topbar :is(#menu, .menu) .tbtn.proj:hover { background: var(--ok); filter: brightness(1.08); }
.topbar :is(#menu, .menu) .notif-btn.has { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, #fff); }
.topbar :is(#menu, .menu) .tbtn.grv-btn.has { background: var(--live-soft); border-color: var(--live); color: var(--live); }
.topbar :is(#menu, .menu) .tbtn.grv-btn.paused { background: #fdf1e3; border-color: #e3a35a; color: #9a5410; }
.topbar :is(#menu, .menu) .tbtn .count { position: absolute; top: 4px; right: 6px; }
/* Nome da pessoa / igreja: mesma altura, texto menor e cinza */
.topbar :is(#menu, .menu) .church-chip { background: var(--panel2); color: var(--muted); font-size: 13px; font-weight: 600; cursor: default; padding-inline: 12px; }
.topbar :is(#menu, .menu) button.church-chip { cursor: pointer; }
.topbar :is(#menu, .menu) button.church-chip:hover { border-color: var(--accent); color: var(--text); }
.topbar :is(#menu, .menu) .church-chip:empty { display: none; }
#pChurch::before { content: none !important; }

/* Data Show: os botões dividem a largura toda em partes iguais, sem sobrepor */
#menu .spacer { display: none; }
#menu > :is(.mbtn, .tbtn, .notif-wrap, .grv-wrap) { flex: 1 1 0; min-width: 0; }
#menu > :is(.notif-wrap, .grv-wrap) { display: flex; position: relative; }
#menu > :is(.notif-wrap, .grv-wrap) > .tbtn { flex: 1 1 auto; width: 100%; min-width: 0; height: auto; }
#menu > #modeBadge { flex: 0 1 150px; max-width: 170px; }
#menu > #modeBadge .lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@container app (max-width: 1500px) { #menu > #modeBadge { display: none; } }
@container app (max-width: 1400px) { .topbar #menu :is(.mbtn, .tbtn) { font-size: 13px; } }
@container app (max-width: 1250px) { .topbar #menu:not(.compact) .brand-word { display: none; } .topbar #menu :is(.mbtn, .tbtn) { font-size: 12.5px; padding-inline: 3px; } }

/* Outras telas: botões do mesmo tamanho, encostados à direita */
.topbar .menu:not(#menu) > :is(.tbtn) { flex: 0 0 auto; min-width: 104px; padding-inline: 14px; }
.topbar .menu:not(#menu) > .church-chip { min-width: 0; max-width: 260px; }
.topbar .menu:not(#menu) > .spacer { flex: 1 1 auto; }

/* Data Show com uma seção aberta: menu mais baixo, ícone ao lado do nome */
.topbar #menu.compact { padding-block: 6px; }
.topbar #menu.compact :is(.mbtn, .tbtn) { flex-direction: row; gap: 6px; padding: 7px 6px; font-size: 13.5px; }
.topbar #menu.compact :is(.mbtn, .tbtn) > span:first-child, .topbar #menu.compact .tbtn .ic { font-size: 18px; }
.topbar #menu.compact .tbtn .count { position: static; margin: 0; }
.topbar #menu.compact #notifBtn .lbl { display: none; }
@container app (max-width: 1500px) { .topbar #menu.compact .brand-word { display: none; } }
@container app (max-width: 1300px) { .topbar #menu.compact :is(.mbtn, .tbtn) { flex-direction: column; gap: 2px; font-size: 12px; } .topbar #menu.compact :is(.mbtn, .tbtn) > span:first-child, .topbar #menu.compact .tbtn .ic { font-size: 16px; } }

/* Meia tela: só os ícones (o nome aparece ao passar o mouse) */
body.half .topbar #menu { gap: 4px; padding: 5px 6px; }
body.half .topbar #menu .brand { padding: 2px 4px; }
body.half .topbar #menu .brand .logo { width: 30px; height: 30px; }
body.half .topbar #menu .brand-word { display: none; }
body.half .topbar #menu :is(.mbtn, .tbtn) { flex-direction: row; padding: 5px 2px; font-size: 0; gap: 0; }
body.half .topbar #menu :is(.mbtn, .tbtn) .lbl { display: none; }
body.half .topbar #menu :is(.mbtn, .tbtn) > span:first-child, body.half .topbar #menu .tbtn .ic { font-size: 16px; }
body.half .topbar #menu .count { font-size: 11px; position: static; }

/* Celular: o cabeçalho das outras telas pode quebrar linha */
@media (max-width: 760px) {
  .topbar .menu:not(#menu) { flex-wrap: wrap; }
  .topbar .menu:not(#menu) > .tbtn { min-width: 0; flex: 1 1 auto; padding-inline: 8px; }
  .brand-word { height: 22px; }
}

/* Letra inteira: número do cartão ao lado de cada estrofe */
.lyr-full p.lyr-st { position: relative; padding-left: 34px; }
.lyr-full p.lyr-st .slide-n { position: absolute; left: 0; top: 2px; margin: 0; }
.lyr-full .lyr-lbl { color: var(--accent); font-weight: 700; text-transform: uppercase; font-size: 11px; letter-spacing: .04em; }
/* Mesma altura do cabeçalho em todas as telas (o Data Show não fica maior que as outras) */
.topbar :is(#menu, .menu):not(.compact) > :is(.brand, .mbtn, .tbtn, .notif-wrap, .grv-wrap) { height: 66px; }
.topbar :is(#menu, .menu):not(.compact) :is(.mbtn, .tbtn) { padding-block: 5px; gap: 3px; }
.topbar #menu:not(.compact) :is(.mbtn, .tbtn) { padding-inline: 3px; line-height: 1.05; }
body.half .topbar #menu > :is(.brand, .mbtn, .tbtn, .notif-wrap, .grv-wrap) { height: auto; }

/* 🅰️ Fonte: ajuste rápido da letra no telão (barra ao vivo) */
.dock-ctl { position: relative; }
.qf-pop { position: absolute; left: 0; bottom: calc(100% + 8px); z-index: 140; width: min(430px, 92vw); background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 32px rgba(28,34,48,.2); padding: 12px 14px; display: flex; flex-direction: column; gap: 9px; }
.qf-pop[hidden] { display: none !important; }
.qf-hint { margin: -4px 0 0; }
.qf-row { display: flex; align-items: center; gap: 8px; }
.qf-l { width: 66px; flex: none; font-size: 13px; font-weight: 600; color: var(--muted); }
.qf-row input[type=range] { flex: 1 1 auto; min-width: 0; }
.qf-row select { flex: 1 1 auto; min-width: 0; }
.qf-colors { display: flex; gap: 6px; align-items: center; }
.qf-c { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line); cursor: pointer; padding: 0; }
.qf-c.on-sel { outline: 3px solid var(--accent); outline-offset: 1px; }
#qfColor { width: 34px; height: 30px; padding: 0 2px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); cursor: pointer; }
.qf-seg { display: flex; gap: 4px; flex: 1 1 auto; }
.qf-seg .btn { flex: 1 1 0; justify-content: center; }
.qf-seg .btn.on-sel { background: var(--accent); border-color: var(--accent); color: #fff; }
.qf-checks { flex-wrap: wrap; gap: 6px 14px; font-size: 14px; }
#kFont.qf-on { background: color-mix(in srgb, var(--accent) 14%, #fff); border-color: var(--accent); color: var(--accent); font-weight: 650; }

/* Janelinha: projetor ainda com as barras do Chrome */
.fs-dlg { max-width: 460px; }
.fs-dlg h2 { font-size: 18px; margin-bottom: 8px; }
.fs-steps { margin: 6px 0 10px; padding-left: 22px; display: grid; gap: 8px; line-height: 1.45; }

/* 🔆 Imagem do telão */
#tvPop .qf-l { width: 96px; }
#tvPop .qf-seg .btn { padding-left: 6px; padding-right: 6px; }
.tv-v { width: 42px; text-align: right; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
#kTv.qf-on { background: color-mix(in srgb, var(--accent) 14%, #fff); border-color: var(--accent); color: var(--accent); font-weight: 650; }

/* Barra ao vivo em tela menor: Fonte e Imagem só com o ícone (o nome aparece ao passar o mouse) */
@media (max-width: 1500px) { #kFont .kl, #kTv .kl { display: none; } #kFont, #kTv { padding-left: 10px; padding-right: 10px; } }
@media (max-width: 1500px) { #kTimer:not(.qf-on) .kl { display: none; } #kTimer { padding-left: 10px; padding-right: 10px; } }
#kTimer.qf-on .kl { font-variant-numeric: tabular-nums; font-weight: 700; }
/* Painel geral: botões de cada igreja (Editar, Contrato) */
.adm-table td.ch-acts { white-space: nowrap; }
.adm-table td.ch-acts .btn { margin-right: 6px; }
.adm-table td.ch-acts small { display: block; margin-top: 6px; }
/* Cartão Igrejas: aviso de fundos e músicas novas */
.tile-mod .tm-news { font-size: 12.5px; font-weight: 650; color: #9a3b00; background: #fff1e0; border: 1px solid #f3c58f; border-radius: 99px; padding: 3px 10px; align-self: flex-start; }
.tile-mod.has-news { border-color: #f0a24a; }
/* Painel geral: barra de novidades (fundos e músicas para aprovar) */
.news-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: #fff7ec; border: 1px solid #f3c58f; border-radius: 14px; padding: 10px 14px; margin: 0 0 14px; }
.adm-table td.ch-val { white-space: nowrap; }
.adm-table td.ch-val small { display: block; }
/* Editar música: abas do fundo (mesmo visual e ordem das abas da seção Fundos) */
.sg-bg-tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin: 6px 0 8px; }
.sg-bg-tabs .tab { border: 0; background: none; font: inherit; font-weight: 600; font-size: 13px; color: var(--muted); padding: 6px 10px; border-bottom: 3px solid transparent; margin-bottom: -1px; cursor: pointer; border-radius: 8px 8px 0 0; }
.sg-bg-tabs .tab:hover { color: var(--text, #222); background: var(--chip); }
.sg-bg-tabs .tab.on { color: var(--accent); border-bottom-color: var(--accent); }
.sg-bg-tabs .count { font-size: 11px; font-weight: 600; background: var(--chip); color: var(--muted); border-radius: 10px; padding: 1px 7px; margin-left: 3px; }
.sg-bg-tabs .tab.on .count { background: color-mix(in srgb, var(--accent) 14%, #fff); color: var(--accent); }
/* Nuvem de palavras: pergunta escolhida e as 30 palavras do público */
#plThemes .chip.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, #fff); color: var(--accent); font-weight: 600; }
.pl-opts { line-height: 1.6; margin: 6px 0 10px; }
/* Sorteio na nuvem de palavras (Data Show) */
.pl-raf { padding: 0 0 0 26px; display: grid; gap: 8px; } /* sem caixa: continua a lista de opções, logo abaixo do 🎁 Sorteio */
.pl-raf .row { align-items: center; }
.pl-raf select.sm { width: auto; padding: 6px 10px; }
.pl-raf-win { margin: 0; }
.pl-raf-win:empty { display: none; }
.pl-raf-win small { font-weight: 400; }
.pl-raf .row { flex-wrap: wrap; }

/* Bíblia: 🔎 Buscar no texto */
.ref-f.txt { flex: 1 1 260px; }
.sug.txt { min-width: min(620px, 90vw); left: auto; right: 0; }
.sug-i.tx { flex-direction: column; gap: 2px; align-items: stretch; }
.sug-i.tx b { color: var(--accent); font-size: 14px; }
.sug-i.tx span { white-space: normal; color: var(--text); font-size: 14px; line-height: 1.4; }
.sug-i.tx mark { background: #ffe58a; color: inherit; border-radius: 3px; padding: 0 1px; }

/* Bíblia: 🧠 resultados pelo sentido */
.sug-i.tx.sn b { color: #7b3fb3; }
.sug-h.sn-wait { color: #7b3fb3; font-weight: 600; }
.sug-i.tx b em { font-style: normal; font-weight: 600; font-size: 11px; color: var(--muted); margin-left: 6px; text-transform: uppercase; letter-spacing: .04em; }

/* ===== Ajuda na tela: balãozinho, bolinhas ⓘ e apostila ===== */
.tip { position: fixed; z-index: 9999; max-width: 340px; background: #1c2230; color: #fff; font-size: 13px; line-height: 1.45; padding: 9px 12px; border-radius: 10px; box-shadow: 0 8px 24px rgba(28,34,48,.28); pointer-events: none; text-align: left; font-weight: 400; text-transform: none; letter-spacing: 0; }
.tip[hidden] { display: none; }
.tip kbd { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.3); color: #fff; border-radius: 4px; padding: 0 5px; font-size: 11px; }
.tip b { color: #9fd3ff; }
.tip .tip-more { color: #9fd3ff; font-size: 12px; }
.help-btn .help-ic { width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #fff; font: 800 17px/26px Arial, sans-serif !important; text-align: center; display: inline-block; }
.menu.compact .help-btn .help-ic { width: 20px; height: 20px; font-size: 13px !important; line-height: 20px !important; }
.help-btn.help-float { position: fixed; right: 16px; bottom: 16px; z-index: 900; display: flex; align-items: center; gap: 8px; padding: 8px 14px 8px 8px; border-radius: 999px; box-shadow: 0 6px 18px rgba(28,34,48,.2); background: var(--panel); border: 1px solid var(--line); font-weight: 650; }
.info-dot { width: 20px; height: 20px; min-width: 20px; border-radius: 50%; border: 1.5px solid var(--accent); background: var(--panel); color: var(--accent); font: italic 700 12px/1 Georgia, serif; display: inline-grid; place-items: center; cursor: pointer; padding: 0; margin-left: 6px; vertical-align: middle; flex: none; }
.info-dot:hover { background: var(--accent); color: #fff; }
.section { position: relative; }
.info-dot.sec-dot { position: absolute; top: 6px; right: 6px; z-index: 25; width: 24px; height: 24px; font-size: 14px; margin: 0; box-shadow: 0 2px 8px rgba(28,34,48,.15); }
.help-dlg { width: min(980px, 96vw); max-height: 90vh; padding: 0; overflow: hidden; }
.help-dlg[open] { display: flex; flex-direction: column; }
.hp-head { padding: 14px 18px; border-bottom: 1px solid var(--line); }
.hp-head h2 { margin: 0; font-size: 19px; }
.hp-body { display: grid; grid-template-columns: 220px 1fr; min-height: 0; flex: 1; }
.hp-nav { display: flex; flex-direction: column; gap: 2px; padding: 10px; border-right: 1px solid var(--line); overflow: auto; background: var(--bg); }
.hp-tab { text-align: left; background: none; border: 0; border-radius: 8px; padding: 9px 10px; font-size: 14px; cursor: pointer; color: var(--text); }
.hp-tab:hover { background: var(--chip); }
.hp-tab.on { background: var(--accent); color: #fff; font-weight: 650; }
.hp-content { padding: 6px 22px 22px; overflow: auto; font-size: 15px; line-height: 1.55; }
.hp-content h3 { font-size: 20px; margin: 12px 0 8px; color: var(--accent); }
.hp-content h4 { margin: 14px 0 4px; font-size: 15px; }
.hp-content ul, .hp-content ol { padding-left: 20px; margin: 4px 0 8px; display: grid; gap: 5px; }
.hp-keys td { padding: 5px 14px 5px 0; vertical-align: top; }
.hp-keys td:first-child { white-space: nowrap; }
.hp-warn { margin-top: 14px; background: #fff7e0; border: 1px solid #f0d58a; border-radius: 12px; padding: 10px 14px; }
.hp-warn ul { margin-bottom: 0; }
@media (max-width: 700px) { .hp-body { grid-template-columns: 1fr; } .hp-nav { flex-direction: row; flex-wrap: wrap; border-right: 0; border-bottom: 1px solid var(--line); } }

/* Interação: tipo (Nuvem / Quiz / Verdadeiro ou Falso) */
.ix-type { display: grid; gap: 6px; font-weight: 700; padding: 12px 14px; border-radius: 12px; background: #eef6fd; border: 1px solid #cfe6f8; }
.ix-type select { font-size: 16px; font-weight: 600; }
.ix-box { display: grid; gap: 12px; }
.qz-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.qz-opts label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.qz-opts label { min-width: 0; }
/* Botões de controle da Interação (nuvem, quiz e V/F) */
.ix-ctrl { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0 4px; }
.ix-ctrl .btn { min-height: 42px; padding-left: 14px; padding-right: 14px; white-space: nowrap; }
.ix-ctrl .btn:disabled { opacity: .45; cursor: not-allowed; }
.ix-ctrl .btn.paused { background: #fff3d6; border-color: #e7b84a; color: #7a5200; font-weight: 700; }
.ix-ctrl .btn.onair { background: #fff; color: #b3261e; border-color: #e6a19b; }
.ix-ctrl .spacer { flex: 1 1 0; min-width: 0; }
@media (max-width: 760px) { .ix-ctrl .spacer { display: none; } .ix-ctrl .btn { flex: 1 1 45%; } }
.ix-paused { margin: 6px 0; padding: 8px 12px; border-radius: 10px; background: #fff3d6; border: 1px solid #f0d38b; color: #7a5200; font-size: 13px; font-weight: 600; }
.qz-opts .input { width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box; }
.qz-opts { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); }
.qz-opts:has(#qzTemaL[hidden]) { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
@media (max-width: 700px) { .qz-opts, .qz-opts:has(#qzTemaL[hidden]) { grid-template-columns: minmax(0, 1fr); } }
.qz-status { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; padding: 12px 14px; border-radius: 12px; background: #fff7e6; border: 1px solid #f3dca8; }
.qz-status b { font-size: 17px; }
.qz-now { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; background: #fff; }
.qz-now ol { margin: 6px 0; padding-left: 22px; list-style: upper-alpha; }
.qz-now li.ok { color: #1f7a43; font-weight: 700; }
.qz-list .qz-pts { font-weight: 800; color: #c27a10; min-width: 52px; text-align: right; }
/* Acolhimento: o que o visitante contou no cartão (sentimentos e recado) */
.pd-feel { margin: 4px 0 10px; padding: 10px 14px; border-radius: 12px; background: #fff7e6; border: 1px solid #f3dca8; font-size: 14px; line-height: 1.5; }

/* ---------- 🛟 Centro de Acolhimento (visão do pastor) ---------- */
.atab.ct-tab { color: #1d6fbf; }
.atab.ct-tab.active { background: #1d6fbf; color: #fff; }
.ct-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.ct-title { margin: 0 0 2px; font-size: 20px; }
.ct-mes { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13px; }
.ct-mes select { min-width: 160px; }
.ct-tiles .tile.bad { background: #fde8e8; border-color: #f0b4b4; }
.ct-good { color: #1f8a4c !important; font-weight: 600; }
.ct-bad { color: #c0392b !important; font-weight: 600; }
.ct-h { margin: 18px 0 6px; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.ct-h.red { color: #c0392b; }
.ct-h.yellow { color: #a36a00; }
.ct-list .item { align-items: flex-start; cursor: default; }
.ct-row { flex-wrap: wrap; }
.ct-row .grow { flex: 1 1 260px; min-width: 0; }
.ct-feel { font-size: 12px; color: #8a5a00; margin-top: 3px; }
.ct-note { font-size: 12px; font-style: italic; color: var(--muted); margin-top: 2px; }
.ct-acts { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.btn.wa, a.btn.wa { background: #25d366; border-color: #1fb457; color: #fff; text-decoration: none; }
.btn.wa:hover { background: #1fb457; }
.ct-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ct-table th, .ct-table td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.ct-table th { font-size: 12px; color: var(--muted); font-weight: 600; }
.ct-table td small { display: block; color: var(--muted); font-size: 12px; }
@media (max-width: 640px) { .ct-table { display: block; overflow-x: auto; } }

/* Botões da Interação na linha do AO VIVO (no lugar de Anterior/Próximo) */
.dock-ctl > .ix-dock { margin: 0; flex-wrap: nowrap; }
.dock-ctl > .ix-dock[hidden], .dock-ctl > #kRow[hidden] { display: none; }
.ix-dockhint { margin: 10px 0 4px; padding: 8px 12px; border-radius: 8px; background: var(--soft, #eef5fc); color: var(--muted); font-size: 13px; }
/* Coluna estreita: os botões do jogo quebram em 2 linhas de 3 (sem cortar o texto) */
@container (max-width: 700px) {
  body .dock-ctl > .row.ix-dock { flex-wrap: wrap; }
  body .dock-ctl > .row.ix-dock > .btn { flex: 1 1 30%; min-width: 0; padding-inline: 6px; }
  body.half .dock-ctl > .row.ix-dock > .btn { min-height: 32px; }
}
.pl-raf .row.wrap:not(:has(.btn:not([hidden]))) { display: none; }
.pl-raf > p.muted { margin: 0; }

/* Interação: 🅰️ Fonte e 🔆 Imagem ficam na linha do título, ao lado de "Quiz bíblico na tela" */
.dock-info-row { display: flex; align-items: center; gap: 10px; min-width: 0; padding-right: 34px; }
.dock-info-row .dock-info { flex: 0 1 auto; min-width: 0; }
.ix-tools { display: flex; gap: 6px; flex: none; }
.ix-tools[hidden] { display: none; }
body .dock .ix-tools .btn.ix-ico { padding: 3px 10px; font-size: 13px; min-height: 0; }

/* Recado rápido: posição (Rodapé / Em cima / Tela cheia) e ✏️ fundo do recado */
#qAnnForm { flex-wrap: nowrap; }
#qAnnForm #qAnn { min-width: 120px; }
#qAnnForm .q-mode { width: auto; flex: none; }
#qAnnForm .q-color { min-width: 0; flex: 0 1 auto; width: auto; }
#qAnnForm .q-bg { flex: none; display: inline-flex; align-items: center; gap: 4px; padding-inline: 8px; }
#qAnnForm .q-bg .ann-th:empty { display: none; }
#qAnnForm .q-bg .ann-th { width: 30px; height: 20px; border-radius: 4px; overflow: hidden; display: inline-block; }
#qAnnForm .q-bg .ann-th img, #qAnnForm .q-bg .ann-th video, #qAnnForm .q-bg .ann-th > * { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Coluna estreita (tela menor ou meia tela): recado em 2 linhas e botões da letra em 2 linhas, sem nada por cima de nada */
@container (max-width: 700px) {
  body #qAnnForm { flex-wrap: wrap; }
  body #qAnnForm #qAnn { flex: 1 1 100%; }
  body #qAnnForm .q-mode, body #qAnnForm .q-color { flex: 1 1 0; }
}
@container (max-width: 600px) {
  body .dock-ctl > #kRow { flex-wrap: wrap; }
  body .dock-ctl > #kRow > .btn, body .dock-ctl > #kRow > .split-btn { flex: 1 1 30%; }
}
#qAnnForm .q-dur { width: auto; flex: none; }
@container (max-width: 700px) { body #qAnnForm .q-dur { flex: 1 1 0; } }
/* Recado rápido em 2 linhas: texto + Mostrar/Ocultar em cima; posição, fundo, ✏️ e tempo embaixo */
body #qAnnForm { display: grid; grid-template-columns: 1fr 1fr 1fr auto auto; grid-template-areas: "txt txt txt show hide" "mode color dur bg bg"; gap: 8px; }
body #qAnnForm #qAnn { grid-area: txt; min-width: 0; width: 100%; }
body #qAnnForm .q-mode { grid-area: mode; width: 100%; min-width: 0; }
body #qAnnForm .q-color { grid-area: color; width: 100%; min-width: 0; }
body #qAnnForm .q-dur { grid-area: dur; width: 100%; min-width: 0; }
body #qAnnForm .q-bg { grid-area: bg; justify-content: center; }
body #qAnnForm > .btn.live { grid-area: show; }
body #qAnnForm > #qAnnHide { grid-area: hide; }
body.half #qAnnForm { gap: 5px; }
body #qAnnForm .q-bg { white-space: nowrap; overflow: hidden; }

/* Menu do Data Show (06/11, Alex): cada botão com a largura do próprio nome, sem quebrar a escrita.
   A letra continua do mesmo tamanho; o que diminui é a sobra dentro dos botões. O chip da igreja sai do menu. */
.topbar #menu > :is(.mbtn, .tbtn), .topbar #menu > .notif-wrap { flex: 1 1 auto; }
.topbar #menu :is(.mbtn, .tbtn) { padding-inline: 8px; }
.topbar #menu :is(.mbtn, .tbtn) .lbl, .topbar #menu .mbtn { white-space: nowrap; }
.topbar #menu > #modeBadge { display: none; }
.topbar #menu > .grv-wrap { flex: 1 1 auto; min-width: 0; }
.topbar #menu > .grv-wrap > .tbtn { width: 100%; }
.media-grid .card.sel:not(.live) { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.cols-media .panel:last-child .panel-h { padding-right: 30px; } /* espaço para o ⓘ da ajuda */

/* Importar várias músicas */
.imp-dlg { width: min(720px, 94vw); max-height: 92vh; overflow-y: auto; }
.imp-dlg textarea { width: 100%; box-sizing: border-box; }
.imp-file { display: inline-flex; margin: 8px 0 4px; cursor: pointer; }
.imp-or { margin: 6px 0 4px; }
.imp-list { max-height: 300px; overflow-y: auto; margin-top: 6px; }
.imp-row { display: flex; gap: 10px; align-items: center; width: 100%; cursor: pointer; }
.imp-row input { width: 18px; height: 18px; flex: none; }
.imp-row small { display: block; }
.imp-dup { opacity: .6; }
.tag-dup { display: inline-block; font-size: 10px; font-weight: 700; color: #fff; background: #d98a1f; border-radius: 5px; padding: 1px 6px; vertical-align: middle; text-transform: uppercase; }

/* ⏱ Contador */
#tmPop .qf-l { width: 70px; flex: none; }
.tm-clock { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--text); line-height: 1; margin-left: auto; margin-right: 8px; }
.tm-clock.end { color: #d64545; }
.tm-time input[type=number] { width: 64px; flex: none; }
.tm-pre { display: flex; gap: 4px; margin-left: auto; }
.tm-btns { gap: 6px; }
.tm-btns .btn { flex: 1 1 0; justify-content: center; white-space: nowrap; }
#tmPop .qf-row > .input:not([type=number]) { flex: 1 1 auto; min-width: 0; }
.tm-pos .btn { padding-left: 8px; padding-right: 8px; }
#preview .pr-tm-in { pointer-events: auto; cursor: grab; touch-action: none; }
#preview .pr-tm-in:active { cursor: grabbing; }
#tmPop { width: min(560px, 94vw); gap: 7px; max-height: calc(100vh - 160px); overflow-y: auto; }
#tmPop .btn.sm { padding-top: 5px; padding-bottom: 5px; }
.tm-txt .input { flex: 1 1 0; min-width: 0; }
/* Coluna estreita: 🅰️ 🔆 ⏱ ficam pequenos ao lado do Fundo principal (sem criar outra linha) */
@container (max-width: 600px) {
  body .dock-ctl > #kRow > #kFont, body .dock-ctl > #kRow > #kTv, body .dock-ctl > #kRow > #kTimer { flex: 0 0 auto; padding-inline: 12px; }
}

/* ===== MEIA TELA AJUSTÁVEL (08/11) =====
 * --hw = largura do lado do slide (arrastando a barra do meio; fica guardado em pray.meiaTela).
 * Lado esquerdo: slide em cima + controles AO VIVO e fundos embaixo. Lado direito: o painel inteiro, sem a barra de baixo. */
:root { --hw: 50vw; }
body.half { --htop: calc(38px + var(--hw) * 0.5625); }
body.half .app { margin-left: var(--hw); width: calc(100vw - var(--hw)); grid-template-rows: auto 1fr; }
.proj-overlay.half { width: var(--hw); bottom: auto; height: var(--htop); border-right: 0; }
.proj-overlay.half .proj-overlay-stage { inset: 38px 0 auto 0; top: 38px; transform: none; width: 100%; aspect-ratio: 16 / 9; }
.proj-overlay.half .half-label { top: 10px; }
.proj-overlay.half .proj-overlay-close { top: 4px; right: 8px; padding: 4px 10px; font-size: 13px; }
body.half .dock {
  position: fixed; left: 0; width: var(--hw); top: var(--htop); bottom: 0; box-sizing: border-box;
  display: flex; flex-direction: column; gap: 8px; padding: 8px 12px 10px; border-top: 3px solid var(--live); box-shadow: none; z-index: 5;
}
body.half .dock-ctl { flex: none; }
body.half .dock-ctl .row, body.half .dock-ctl > .row.ix-dock, body.half #qAnnForm { flex-wrap: wrap; }
body.half .dock-bgs { flex: 1 1 auto; min-height: 0; height: auto; }
body.half .dock .quick-bgs { flex: 1 1 auto; min-height: 0; max-height: none; overflow-y: auto; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); }
/* Janelinhas da barra (Contador, Fonte, Imagem...): abrem do lado direito, sem cobrir o slide nem os botões */
body.half .dock .qf-pop, body.half .dock #tmPop {
  left: calc(100% + 26px); right: auto; bottom: auto; top: calc(52px - var(--htop));
  width: min(470px, calc(100vw - var(--hw) - 52px)); max-height: calc(100vh - 66px); overflow-y: auto;
}
/* Avisos: embaixo, no meio do painel (não cobrem o menu) */
body.half .toast { left: calc(var(--hw) + (100vw - var(--hw)) / 2); top: auto; bottom: 18px; transform: translate(-50%, 150%); max-width: calc(100vw - var(--hw) - 40px); }
body.half .toast.on { transform: translate(-50%, 0); }
/* Barra do meio para arrastar */
#halfGrip { display: none; }
body.half #halfGrip { display: block; position: fixed; top: 0; bottom: 0; left: calc(var(--hw) - 6px); width: 12px; z-index: 260; cursor: col-resize; touch-action: none; }
#halfGrip::before { content: ''; position: absolute; top: 0; bottom: 0; left: 5px; width: 2px; background: var(--live); }
#halfGrip::after { content: '⋮'; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 16px; height: 46px; border-radius: 8px; background: var(--live); color: #fff; font: 700 16px/46px sans-serif; text-align: center; box-shadow: 0 2px 8px rgba(0,0,0,.25); }
#halfGrip:hover::after, body.half-drag #halfGrip::after { width: 20px; }
body.half-drag, body.half-drag * { cursor: col-resize !important; user-select: none !important; }
body.half-drag iframe, body.half-drag video { pointer-events: none; }
/* Meia tela estreita: recado rápido em 3 linhas, nada passa da barra do meio nem fica cortado */
@container (max-width: 520px) {
  body.half #qAnnForm { grid-template-columns: 1fr 1fr auto auto; grid-template-areas: "txt txt show hide" "mode color color color" "dur dur bg bg"; }
}
/* Bíblia na meia tela: resultados da busca abrem para a direita, dentro do painel (antes iam para trás do slide) */
body.half .sug.txt { left: 0; right: auto; min-width: 0; width: min(620px, calc(100vw - var(--hw) - 36px)); max-height: calc(100vh - 230px); }

/* Músicas na meia tela (Alex 08/11): Lista do culto em cima e letra inteira embaixo, à esquerda; slides na coluna da direita inteira */
body.half #sec-musicas:not([hidden]) { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); grid-template-rows: auto minmax(0, 1fr); height: 100%; min-height: 0; }
body.half #sec-musicas > .panel { min-height: 0; overflow: auto; }
body.half #sec-musicas > div.panel:nth-of-type(1) { grid-column: 1; grid-row: 1; max-height: 46vh; }
body.half #sec-musicas > div.panel:nth-of-type(2) { grid-column: 1; grid-row: 2; }
body.half #sec-musicas > div.panel:nth-of-type(3) { grid-column: 2; grid-row: 1 / span 2; }
body.half #sec-musicas .slides { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
body.half #sec-musicas > div.panel:nth-of-type(3) { max-height: none; }
body.half #sec-musicas > div.panel:nth-of-type(3) > .panel-h { padding-right: 30px; }

/* Acolhimento › Precisa de um olhar: 💬 Avisar líder (WhatsApp) + ação */
.al-btns { display: flex; gap: 6px; flex: none; align-items: center; flex-wrap: wrap; justify-content: flex-end; }

/* Avisar líder: mensagens em sequência (Alex 08/11) */
#waDlg { max-width: 620px; }
.wa-steps { list-style: none; padding: 0; margin: 10px 0 14px; display: flex; flex-direction: column; gap: 8px; counter-reset: wa; }
.wa-steps li { display: flex; gap: 10px; align-items: center; background: #f4f8fd; border: 1px solid #dbe7f5; border-radius: 10px; padding: 10px 12px; counter-increment: wa; }
.wa-steps li::before { content: counter(wa); flex: none; width: 24px; height: 24px; border-radius: 50%; background: #2f86da; color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: 13px; }
.wa-steps li.done { opacity: .6; }
.wa-steps li.done::before { content: '✓'; background: #25a35a; }
.wa-steps small { display: block; color: #556; margin-top: 3px; line-height: 1.35; }

/* ===== BÍBLIA: listas de Livro / Capítulo / Versículo maiores (Alex 09/11) ===== */
#bsBook, #bsChap, #bsVerse { font-size: 17px; max-height: 70vh; padding: 8px; }
#bsBook { min-width: 380px; }
.ref-f.num #bsChap { min-width: 360px; }
#bsBook .sug-i, #bsChap .sug-i, #bsVerse .sug-i { padding: 11px 14px; }
#bsBook .sug-h, #bsChap .sug-h, #bsVerse .sug-h { font-size: 12px; padding: 8px 12px; }
#bsBook .sug-i small, #bsVerse .sug-i small { font-size: 13px; }
#bsVerse .sug-i span { font-size: 15px; }
#bsChap .sug-i { min-width: 54px; padding: 10px 12px; }

/* ===== Celular: Acolhimento e Centro de Acolhimento (Alex 10/11: líderes, pastores e secretária usam pelo celular) ===== */
@media (max-width: 640px) {
  body.page .topbar :is(#menu, .menu) { flex-wrap: nowrap; gap: 5px; padding: 6px 8px; }
  body.page .topbar :is(#menu, .menu):not(.compact) > :is(.brand, .mbtn, .tbtn, .notif-wrap, .grv-wrap) { height: 54px; }
  body.page .topbar :is(#menu, .menu) .brand { padding: 4px 6px; }
  body.page .topbar :is(#menu, .menu) .brand .brand-word { display: none; }
  body.page .topbar :is(#menu, .menu) :is(.mbtn, .tbtn) { min-width: 0; flex: 0 0 auto; padding: 4px 9px; gap: 2px; }
  body.page .topbar :is(#menu, .menu) :is(.mbtn, .tbtn) .lbl { font-size: 11px; }
  body.page .topbar :is(#menu, .menu) .tbtn .ic { font-size: 20px; }
  body.page .topbar :is(#menu, .menu) .church-chip, body.page .topbar :is(#menu, .menu) .spacer { display: none; }
  body.page .topbar :is(#menu, .menu) .page-tab { flex: 1 1 auto; flex-direction: row; gap: 6px; }
  body.page .topbar :is(#menu, .menu) .page-tab .lbl { font-size: 15px; }
  .page .main.page-main { padding: 10px 8px; }
  .acol-top { gap: 8px; }
  .acol-tabs { flex-wrap: nowrap; overflow-x: auto; width: 100%; scrollbar-width: none; }
  .acol-tabs::-webkit-scrollbar { display: none; }
  .atab { white-space: nowrap; padding: 9px 12px; flex: none; }
  .acol-top > .row { width: 100%; gap: 6px; flex-wrap: wrap; }
  .acol-top > .row .btn { flex: 1 1 auto; padding: 9px 10px; font-size: 14px; }
  .acol-body.panel { padding: 12px 10px; }
  .ct-head { margin-bottom: 4px; }
  .ct-h { margin: 16px 0 2px; font-size: 17px; }
  .acol-body p.small { margin: 2px 0 8px; }
  /* Linhas de pessoa: texto em cima, botões embaixo, ocupando a largura */
  .acol-body .list .item { flex-wrap: wrap; align-items: flex-start; gap: 8px 10px; padding: 12px 10px; }
  .acol-body .list .item > .grow { flex: 1 1 calc(100% - 50px); min-width: 0; }
  .acol-body .list .item small { font-size: 13px; line-height: 1.45; }
  .acol-body .list .item > .grow > b:first-child { font-size: 16px; }
  .ct-head .btn.fluxo { width: 100%; justify-content: center; }
  .ct-acts, .al-btns { width: 100%; justify-content: flex-start; gap: 8px; }
  .ct-acts .btn.xs, .al-btns .btn.xs { flex: 1 1 auto; min-height: 42px; font-size: 14px; padding: 8px 10px; justify-content: center; text-align: center; display: inline-flex; align-items: center; }
  .ct-acts > small { width: 100%; }
  .ct-feel, .ct-note { font-size: 13px; }
  /* Mensagens para o líder: botão Enviar embaixo de cada mensagem, largo para o dedo */
  .wa-steps li { flex-wrap: wrap; align-items: flex-start; }
  .wa-steps li > .grow { flex: 1 1 calc(100% - 40px); min-width: 0; }
  .wa-steps li [data-wamsg] { width: 100%; min-height: 42px; font-size: 15px; justify-content: center; }
  .wa-steps small { font-size: 13px; }
}

/* Centro de Acolhimento: revisão 10/11 (ninguém sem responsável, células sem WhatsApp, lista do dia, "Agora não", encerrar) */
.tag.bad { background: #fde8e8; color: #b42318; border-color: #f3b4b4; }
.ct-dono { display: flex; flex-direction: column; gap: 4px; border-radius: 12px; padding: 12px 14px; margin: 4px 0 14px; border: 1.5px solid; }
.ct-dono.ok { background: #e9f7ef; border-color: #9fd8b5; color: #1f6b42; }
.ct-dono.bad { background: #fde8e8; border-color: #f3b4b4; color: #8f1c13; }
.ct-dono span { font-size: 14px; }
.ct-dono .chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.ct-aviso { display: flex; gap: 8px; align-items: flex-start; background: #fff4e0; border: 1px solid #f1cf8e; color: #7a4d0c; border-radius: 12px; padding: 10px 14px; margin: 0 0 14px; font-size: 14px; }
.ct-rec { background: var(--panel2); border: 1px dashed var(--line); border-radius: 12px; padding: 10px 14px; font-size: 14px; margin: 14px 0 0; }
.close-mots { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.close-mots .btn { justify-content: flex-start; min-height: 44px; }
.close-mots .btn span { display: flex; flex-direction: column; align-items: flex-start; text-align: left; }
.close-mots .btn small { font-weight: 400; color: var(--muted); font-size: 13px; }
.close-mots .btn { white-space: normal; height: auto; }

/* Facilidade nas quatro visões (Alex 10/11) */
.ct-pulo { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 12px; }
.ct-pulo .btn b { background: var(--panel2); border-radius: 999px; padding: 1px 8px; margin-left: 4px; font-size: 12px; }
.pd-wa-top { width: 100%; justify-content: center; min-height: 46px; margin: 4px 0 8px; font-weight: 700; }
@media (max-width: 640px) {
  /* Janelas (ficha, célula, regras): uma coluna só, sem cortar na lateral */
  .dlg, .dlg.wide { width: 96vw; max-width: 96vw; padding: 16px; max-height: 92vh; overflow-y: auto; overflow-x: hidden; }
  .dlg .form.two, .dlg .form { grid-template-columns: 1fr; }
  .dlg .pd-grid, .dlg .ac-cols { grid-template-columns: minmax(0, 1fr); }
  .dlg .pd-col { min-width: 0; }
  .dlg .input, .dlg select, .dlg textarea { max-width: 100%; min-width: 0; }
  .dlg .row { flex-wrap: wrap; }
  .dlg .btn { min-height: 44px; }
  /* Números do Hoje: 2 por linha, para a lista aparecer logo */
  .acol-body .tiles { grid-template-columns: 1fr 1fr; gap: 8px; }
  .acol-body .tiles .tile { padding: 10px 12px; }
  /* Centro: a ação principal ocupa a linha toda; as outras duas dividem a de baixo */
  .ct-acts > .btn.wa, .ct-acts > [data-pick], .ct-acts > [data-close] { flex: 1 1 100%; min-height: 48px; font-size: 15px; font-weight: 700; }
  .ct-pulo .btn { flex: 1 1 45%; min-height: 44px; justify-content: center; }
}

/* ===================== LOGO DA IGREJA NO TOPO (Alex 10/11) ===================== */
.ig-logo { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 50%; background: #fff center/cover no-repeat; border: 2px solid var(--accent); box-shadow: 0 1px 4px rgba(30,60,100,.18); }
.ig-logo.ig-ini { background: var(--accent); color: #fff; font-weight: 800; font-size: 12px; letter-spacing: .02em; }
.topbar :is(#menu, .menu) .ig-chip { cursor: default; max-width: 150px; background: var(--panel); }
.topbar :is(#menu, .menu) button.ig-chip { cursor: pointer; }
.topbar :is(#menu, .menu) .ig-chip .lbl { max-width: 126px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; line-height: 1.35; padding-bottom: 1px; }
.topbar :is(#menu, .menu) .ig-chip .ig-logo { width: 26px; height: 26px; font-size: 11px; }
@media (max-width: 640px) {
  .topbar :is(#menu, .menu) .ig-chip { max-width: 78px; padding-left: 5px; padding-right: 5px; }
  .topbar :is(#menu, .menu) .ig-chip .lbl { max-width: 68px; font-size: 10.5px; }
  body.page:has(#igChip) .topbar :is(#menu, .menu) .page-tab { flex-direction: column; gap: 0; padding-left: 3px; padding-right: 3px; }
  body.page:has(#igChip) .topbar :is(#menu, .menu) .page-tab .ic { font-size: 20px; }
  body.page:has(#igChip) .topbar :is(#menu, .menu) .page-tab .lbl { font-size: 9.5px; letter-spacing: -.01em; }
}
/* Tela inicial: a bolinha já mostra a igreja, então o botão azul com o nome da igreja sai (Alex 10/11: no celular os botões se espremiam) */
body:has(#igChip) #portal .topbar .page-tab { display: none; }
.ig-logo.ig-ini { line-height: 1; overflow: hidden; white-space: nowrap; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (max-width: 640px) {
  body.page .topbar :is(#menu, .menu) { overflow-x: auto; scrollbar-width: none; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
  body.page .topbar :is(#menu, .menu)::-webkit-scrollbar { display: none; }
  .topbar :is(#menu, .menu) .ig-chip .ig-logo.ig-ini { font-size: 10px; letter-spacing: 0; }
  #portal .topbar .menu { justify-content: space-between; }
  #portal .topbar .menu #pMe { flex: 1 1 auto; min-width: 0; }
  #portal .topbar .menu #pUser { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  #portal .topbar .menu :is(#pOut, #pContracts, #pPlatform, .hp-btn, [data-ajuda]) { flex: 0 0 auto; }
}
@media (max-width: 420px) {
  body.page .topbar :is(#menu, .menu) { gap: 4px; padding: 6px 6px; }
  body.page .topbar :is(#menu, .menu) :is(.mbtn, .tbtn) { padding: 4px 6px; }
  body.page .topbar :is(#menu, .menu) .brand { padding: 4px; }
  .topbar :is(#menu, .menu) .ig-chip { max-width: 70px; padding-left: 4px; padding-right: 4px; }
  body.page .topbar :is(#menu, .menu) .ig-chip { gap: 1px; padding-top: 2px; padding-bottom: 2px; }
  body.page .topbar :is(#menu, .menu) .ig-chip .lbl { max-width: 62px; font-size: 9.5px; white-space: normal; line-height: 1.08; padding-bottom: 0; text-align: center; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  body.page .topbar :is(#menu, .menu) .ig-chip .ig-logo { width: 22px; height: 22px; font-size: 9px; }
  body.page:has(#igChip) .topbar :is(#menu, .menu) .page-tab { flex: 1 0 auto; min-width: max-content; padding-left: 6px; padding-right: 6px; }
}
/* Listas com etiquetas (operadores, igrejas): no celular as etiquetas descem para a linha de baixo em vez de passar por cima do nome */
@media (max-width: 640px) {
  .item:has(> .row .tag) { flex-wrap: wrap; }
  .item:has(> .row .tag) > .grow { min-width: 0; flex: 1 1 60%; }
  .item:has(> .row .tag) > .row { flex: 1 1 100%; flex-wrap: wrap; gap: 6px; }
  .item .tag { white-space: normal; }
}
.ig-dlg { width: min(420px, 94vw); }
.ig-prev { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 14px 0; }
.ig-prev .ig-logo { width: 110px; height: 110px; font-size: 38px; border-width: 3px; }
.ig-btns { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 10px; }
.ig-btns .btn { min-height: 44px; }

/* ===================== PARTE DE BAIXO COM ALTURA AJUSTÁVEL (Alex 10/11) =====================
   Linha de arrastar em cima da divisa. O app.js diminui tudo o que está embaixo (zoom) até caber na altura escolhida. */
#dockGrip { position: fixed; left: 0; right: 0; height: 24px; z-index: 60; cursor: row-resize; touch-action: none; display: grid; place-items: center; }
#dockGrip span { width: 72px; height: 7px; border-radius: 99px; background: var(--live, #d64545); box-shadow: 0 1px 4px rgba(0,0,0,.25); border: 1.5px solid #fff; box-sizing: content-box; }
#dockGrip:hover span, body.dock-drag #dockGrip span { width: 110px; }
#dockGrip[hidden] { display: none; }
body.dock-drag { user-select: none; -webkit-user-select: none; cursor: row-resize; }
/* Com a altura ajustada, a arrumação de baixo é fixa por tipo de tela (data-dm), com medidas que não dependem da largura,
   para o encolhimento funcionar por igual. */
body:not(.half) .dock[data-dm] { align-items: stretch; }
body:not(.half) .dock[data-dm] .dock-bgs { grid-column: auto; height: 0; min-height: 100%; }
body:not(.half) .dock[data-dm] .quick-bgs { max-height: none; }
body:not(.half) .dock[data-dm="w"] { grid-template-columns: 400px 1fr minmax(260px, 400px); }
body:not(.half) .dock[data-dm="m"] { grid-template-columns: 260px minmax(0, 1fr) 210px; }
body:not(.half) .dock[data-dm="m"] .quick-bgs { grid-template-columns: repeat(2, 1fr); }
/* Celular: AO VIVO pequeno e fundos em cima, lado a lado; os botões embaixo, na largura toda */
body:not(.half) .dock[data-dm="s"] { grid-template-columns: clamp(170px, 34vw, 250px) minmax(0, 1fr); grid-template-rows: auto auto; gap: 8px; }
body:not(.half) .dock[data-dm="s"] .dock-prev { grid-column: 1; grid-row: 1; }
body:not(.half) .dock[data-dm="s"] .dock-bgs { grid-column: 2; grid-row: 1; }
body:not(.half) .dock[data-dm="s"] .dock-ctl { grid-column: 1 / -1; grid-row: 2; }
body:not(.half) .dock[data-dm="s"] .quick-bgs { grid-template-columns: repeat(3, 1fr); }
/* Data Show em celular e telas médias (Alex 10/11): a página nunca fica mais larga que a tela.
   O menu de cima rola para os lados em vez de empurrar tudo (antes o celular "afastava" a tela inteira e ficava tudo miúdo). */
@media (max-width: 1100px) {
  html:has(body:not(.page) .app) { overflow-x: hidden; }
  body:not(.page) { max-width: 100%; overflow-x: hidden; }
  body:not(.page) .app { width: 100%; max-width: 100%; min-width: 0; grid-template-columns: minmax(0, 1fr); height: 100vh; height: 100dvh; min-height: 0; }
  body:not(.page) .app > * { min-width: 0; max-width: 100%; }
  body:not(.page) .topbar { min-width: 0; max-width: 100%; overflow: hidden; }
  body:not(.page) .topbar #menu { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
  body:not(.page) .topbar #menu::-webkit-scrollbar { display: none; }
  body:not(.page) .topbar #menu > * { flex: 0 0 auto; }
  body:not(.page) .main { min-width: 0; }
}

/* ===================== DATA SHOW NO CELULAR E DOBRÁVEL (Alex 10/11) =====================
   Parte de baixo "mínima" (data-dm="c"): só o AO VIVO pequeno e os botões principais numa faixa. Puxando a linha para cima volta tudo. */
body:not(.half) .dock[data-dm="c"] { grid-template-columns: 104px minmax(0, 1fr); gap: 8px; padding-top: 12px; padding-bottom: 8px; align-items: center; }
body:not(.half) .dock[data-dm="c"] .dock-bgs,
body:not(.half) .dock[data-dm="c"] #qAnnForm,
body:not(.half) .dock[data-dm="c"] .dock-info-row,
body:not(.half) .dock[data-dm="c"] #kFont, body:not(.half) .dock[data-dm="c"] #kTv, body:not(.half) .dock[data-dm="c"] #kTimer,
body:not(.half) .dock[data-dm="c"] #kMainEdit, body:not(.half) .dock[data-dm="c"] kbd { display: none !important; }
body:not(.half) .dock[data-dm="c"] .dock-ctl { gap: 0; min-width: 0; }
body:not(.half) .dock[data-dm="c"] .dock-ctl > .row:not([hidden]) { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
body:not(.half) .dock[data-dm="c"] .dock-ctl > .row .btn { flex: 1 1 30%; min-height: 40px; padding: 6px 8px; font-size: 14px; white-space: nowrap; min-width: 0; }
body:not(.half) .dock[data-dm="c"] .dock-ctl > .row .split-btn { flex: 1 1 100%; display: flex; }
body:not(.half) .dock[data-dm="c"] .dock-ctl > .row .split-btn .btn { flex: 1; border-radius: 10px; }
body:not(.half) .dock[data-dm="c"] .live-badge { font-size: 8px; padding: 1px 4px; }
@media (max-width: 900px) {
  /* Menu de cima mais baixo */
  body:not(.page) .topbar #menu { padding-top: 5px; padding-bottom: 5px; gap: 5px; }
  body:not(.page) .topbar #menu .mbtn, body:not(.page) .topbar #menu .tbtn { min-width: 0; padding: 4px 9px; font-size: 12px; gap: 1px; min-height: 0; }
  body:not(.page) .topbar #menu .mbtn span:first-child, body:not(.page) .topbar #menu .tbtn .ic { font-size: 18px; }
  body:not(.page) .topbar #menu .brand .logo { width: 30px; height: 30px; }
  body:not(.page) .main { padding: 8px; }
  /* Bíblia: busca em 2 linhas e as listas ocupam o resto da tela (cada uma rola por dentro) */
  body:not(.half) #sec-biblia .bible-top { padding: 8px; gap: 6px; margin-bottom: 6px; position: relative; top: 0; align-items: flex-end; }
  body:not(.half) #sec-biblia .ver-wrap { order: 1; flex: 0 0 auto; }
  body:not(.half) #sec-biblia .ver-btn { max-width: 34vw; padding: 6px 8px; font-size: 13px; }
  body:not(.half) #sec-biblia .ref-fields { order: 2; flex: 1 1 0; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 5px; }
  body:not(.half) #sec-biblia .ref-f.book { grid-column: auto; }
  body:not(.half) #sec-biblia .ref-f { font-size: 9px; letter-spacing: 0; gap: 1px; white-space: nowrap; }
  body:not(.half) #sec-biblia .ref-f .input { padding: 6px 8px; min-width: 0; }
  body:not(.half) #sec-biblia .ref-f.txt { order: 3; flex: 1 1 0; min-width: 0; }
  body:not(.half) #sec-biblia #bLookBtn, body:not(.half) #sec-biblia #cultoBtn { order: 4; flex: 0 0 auto; padding: 6px 9px; font-size: 0; }
  body:not(.half) #sec-biblia #bLookBtn::before { content: "✏️"; font-size: 17px; }
  body:not(.half) #sec-biblia #cultoBtn::before { content: "📖"; font-size: 17px; }
  body:not(.half) #sec-biblia #cultoBtn .count { font-size: 11px; margin-left: 3px; }
  body:not(.half) #sec-biblia .cols-bible { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) minmax(0, 1.6fr); height: 0; min-height: 0; flex: 1 1 0; gap: 6px; }
  body:not(.half) #sec-biblia .cols-bible > .panel { overflow: hidden; padding: 6px 8px; min-height: 0; }
  body:not(.half) #sec-biblia .cols-bible > .panel:last-child { grid-column: 1 / -1; }
  body:not(.half) #sec-biblia .cols-bible > .panel:not(:last-child) > h2 { display: none; }
  body:not(.half) #sec-biblia .cols-bible > .panel:last-child > h2 { font-size: 14px; margin: 0 0 4px; }
  body:not(.half) #sec-biblia .books { grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); gap: 3px; }
  body:not(.half) #sec-biblia .ref-fields { grid-template-columns: minmax(0, 2fr) minmax(58px, 1fr) minmax(58px, 1fr); min-width: 215px; }
  body:not(.half) #sec-biblia .ref-f.txt { flex: 1 1 150px; min-width: 150px; }
  body:not(.half) #sec-biblia .bible-top > .info-dot, body:not(.half) .dock[data-dm="c"] .info-dot { display: none; }
  body:not(.half) #sec-biblia .info-dot { display: none !important; }
  body:not(.half) #sec-biblia .ref-fields { order: 1; flex: 1 1 100%; }
  body:not(.half) #sec-biblia .ver-wrap { order: 2; }
  body:not(.half) #sec-biblia .ver-btn { max-width: 58px; white-space: nowrap; padding: 7px 8px; text-overflow: clip; }
  body:not(.half) #sec-biblia .ref-f.txt { flex: 1 1 100px; min-width: 100px; }
  body:not(.half) #sec-biblia .cols-bible { grid-template-rows: minmax(0, 1fr) minmax(0, 2.1fr); }
  body:not(.half) .main:has(> #sec-biblia:not([hidden])) { overflow: hidden; }
}
/* Músicas no celular e dobrável (Alex 10/11): tudo cabe na tela, cada parte rola por dentro; os slides ficam com a maior parte */
@media (max-width: 900px) {
  body:not(.half) .main:has(> #sec-musicas:not([hidden])) { overflow: hidden; }
  body:not(.half) #sec-musicas:not([hidden]) { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); grid-template-rows: auto minmax(0, 1fr); height: 100%; min-height: 0; gap: 6px; }
  body:not(.half) #sec-musicas > .panel { min-height: 0; overflow: auto; padding: 8px; max-height: none; }
  body:not(.half) #sec-musicas > div.panel:nth-of-type(1) { grid-column: 1; grid-row: 1; max-height: 40vh; }
  body:not(.half) #sec-musicas > div.panel:nth-of-type(2) { grid-column: 1; grid-row: 2; }
  body:not(.half) #sec-musicas > div.panel:nth-of-type(3) { grid-column: 2; grid-row: 1 / span 2; display: flex; flex-direction: column; overflow: hidden; }
  body:not(.half) #sec-musicas > div.panel:nth-of-type(3) > .slides { flex: 1; min-height: 0; overflow: auto; }
  body:not(.half) #sec-musicas .slides { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  body:not(.half) #sec-musicas > div.panel:nth-of-type(1) > p.muted { display: none; }
  body:not(.half) #sec-musicas .panel-h { flex-wrap: nowrap; gap: 6px; }
  body:not(.half) #sec-musicas .lib-open { margin-bottom: 6px; padding: 8px; }
  body:not(.half) #sec-musicas h2.ph { font-size: 14px; }
  body:not(.half) #sec-musicas > .info-dot { display: none !important; }
}
/* Celular estreito: a lista do culto em cima (baixa), os slides embaixo; a letra inteira sai (os slides já mostram a letra) */
@media (max-width: 560px) {
  body:not(.half) #sec-musicas:not([hidden]) { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  body:not(.half) #sec-musicas > div.panel:nth-of-type(1) { max-height: 30vh; }
  body:not(.half) #sec-musicas > div.panel:nth-of-type(2) { display: none; }
  body:not(.half) #sec-musicas > div.panel:nth-of-type(3) { grid-column: 1; grid-row: 2; }
  body:not(.half) #sec-musicas .slides { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Menu do Data Show sempre cabe na largura (Alex 10/11: em notebook a página passava da tela e o Projetar sumia).
   O app.js aperta o menu aos poucos: mc1 letra menor, mc2 botões da direita só com ícone, mc3 tudo mais justo. */
body:not(.page):not(.half) .app { grid-template-columns: minmax(0, 1fr); }
body:not(.page) .app > * { min-width: 0; }
body:not(.page) .topbar { min-width: 0; max-width: 100%; overflow: hidden; }
#menu.mc1 { gap: 4px; }
#menu.mc1 .mbtn, #menu.mc1 .tbtn { font-size: 13px; padding-inline: 5px; }
#menu.mc2 > .tbtn:not(.proj):not(.church-chip):not(#igChip) .lbl, #menu.mc2 > span > .tbtn .lbl, #menu.mc2 .brand-word { display: none; }
#menu.mc2 > .tbtn:not(.proj):not(.church-chip):not(#igChip), #menu.mc2 > .notif-wrap { flex: 0 0 auto; padding-inline: 9px; min-width: 44px; }
#menu.mc2 > #brandPortal { flex: 0 0 auto; }
#menu.mc3 .mbtn, #menu.mc3 .tbtn { font-size: 12px; padding-inline: 3px; }
#menu.mc3 .mbtn span, #menu.mc3 .tbtn .ic { font-size: 18px; }
/* A página do Data Show nunca rola (nem para o lado nem para baixo): cada parte rola por dentro */
html:has(body:not(.page) .app), body:not(.page):has(.app) { overflow: hidden; }
body:not(.page) .app { height: 100vh; height: 100dvh; min-height: 0; grid-template-rows: auto minmax(0, 1fr) auto; }
body.half:not(.page) .app { grid-template-rows: auto minmax(0, 1fr); }

/* Ficha: quem cuida da pessoa (Alex 11/11) */
.pd-owner { margin: 4px 0 10px; padding: 8px 12px; border-radius: 12px; background: var(--panel2); border: 1px solid var(--line); font-size: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.umods label.check:has(.op-hint) { flex-wrap: wrap; row-gap: 0; }
.umods .op-hint { display: block; flex: 0 0 100%; padding-left: 26px; margin-bottom: 4px; font-size: 12px; line-height: 1.35; }
#opFuncHint { margin: -4px 0 6px; }

/* 📊 Números do acolhimento: gráficos de barras (Alex 11/11) */
.gbox { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin: 12px 0; }
.gbox h4 { margin: 0 0 10px; font-size: 14px; }
.gb { display: grid; gap: 8px; }
.gb-row { display: grid; grid-template-columns: minmax(110px, 30%) 1fr auto; align-items: center; gap: 10px; font-size: 13px; }
.gb-l small { display: block; color: var(--muted); font-size: 11px; }
.gb-track { position: relative; height: 18px; background: #eef3f8; border-radius: 6px; overflow: hidden; }
.gb-bar { position: absolute; left: 0; top: 0; bottom: 0; background: var(--accent); border-radius: 6px; }
.gb-bar.ok { background: var(--ok); } .gb-bar.bad { background: #d9534f; } .gb-bar.warn { background: #e5a524; }
.gb-n { min-width: 54px; text-align: right; font-size: 14px; }
.gb-n small { margin-left: 6px; color: var(--muted); font-weight: 400; font-size: 12px; }
.gc { display: flex; align-items: flex-end; gap: 10px; height: 170px; padding-top: 6px; }
.gc-col { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; gap: 4px; min-width: 0; }
.gc-track { flex: 1; width: 100%; max-width: 54px; display: flex; align-items: flex-end; }
.gc-bar { width: 100%; background: #9cc6ef; border-radius: 6px 6px 0 0; display: flex; align-items: flex-end; overflow: hidden; min-height: 2px; }
.gc-in { width: 100%; background: var(--accent); }
.gc-n { font-size: 13px; } .gc-l { font-size: 12px; color: var(--muted); }
.gc-leg { font-size: 12px; color: var(--muted); margin: 8px 0 0; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.gc-leg span { width: 12px; height: 12px; border-radius: 3px; display: inline-block; } .gc-leg .k1 { background: #9cc6ef; } .gc-leg .k2 { background: var(--accent); margin-left: 10px; }
.ct-h.ct-nums { margin-top: 34px; padding-top: 16px; border-top: 2px solid var(--line); }
@media (max-width: 560px) { .gb-row { grid-template-columns: 1fr auto; } .gb-track { grid-column: 1 / -1; grid-row: 2; } }
.gb-bar.mute { background: #9aa6b5; }
.gb-soma { margin: 10px 0 0; font-size: 12px; color: var(--muted); }

/* Troca de número sem duplicar (Alex 11/11): 📱 Trocou de número e 🔗 Pode ser a mesma pessoa */
.pd-troca { background: #fff6dd; border-color: #f2d46b; }
.pd-tr-b { display: inline-flex; gap: 6px; margin-left: 6px; flex-wrap: wrap; vertical-align: middle; }
.dup-row { align-items: flex-start; flex-wrap: wrap; gap: 10px; }
.dup-p { padding: 7px 10px; border: 1px solid var(--line, #d9e6f2); border-radius: 10px; margin-bottom: 6px; cursor: pointer; background: #fff; }
.dup-p:hover { border-color: var(--accent, #2f86da); }
.dup-p small { display: block; }
.dup-acts { display: flex; flex-direction: column; gap: 6px; }

/* Igreja de exemplo para apresentação (link de teste) */
.demo-ban { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: #eef6ff; border: 1px dashed #8bbcf0; border-radius: 12px; padding: 10px 14px; margin: 0 0 12px; font-size: 14px; }
.demo-ban span { flex: 1; min-width: 220px; }
.pd-demo { background: #eef6ff; border-color: #b9d7f5; }

/* Painel geral › Editar igreja: valor de cada módulo e total (Alex 11/11) */
#chMods .mod-preco{margin-left:auto;font-variant-numeric:tabular-nums;font-weight:600;white-space:nowrap}
#chMods .mod-preco.off{color:var(--muted);font-weight:400;opacity:.6}
#chMods .mod-preco s{color:var(--muted);font-weight:400;margin-right:4px}
.ch-total{display:flex;flex-wrap:wrap;align-items:baseline;gap:6px;justify-content:flex-end;margin:4px 0 12px;padding-top:8px;border-top:1px solid var(--line);font-size:15px}
.ch-total b{font-size:18px}

/* ===== Ajustes do Data Show (Alex 13/11) ===== */
/* Buscar no texto: janela grande no meio da tela, letra maior */
.sug.txt, body.half .sug.txt { position: fixed; left: 50%; top: 50%; right: auto; transform: translate(-50%, -50%);
  width: min(1000px, calc(100vw - 48px)); min-width: 0; max-height: min(78vh, 900px); z-index: 900; font-size: 19px;
  border-radius: 16px; box-shadow: 0 30px 80px rgba(10, 30, 60, .35), 0 0 0 1px rgba(47, 134, 218, .25); padding: 8px 10px; }
.sug.txt .sug-i.tx { padding: 12px 14px; gap: 6px; }
.sug.txt .sug-i.tx b { font-size: 19px; }
.sug.txt .sug-i.tx span { font-size: 21px; line-height: 1.45; }
.sug.txt .sug-h { font-size: 14px; padding: 10px 12px 6px; }
.sug.verse .sug-i { font-size: 17px; line-height: 1.4; }
.sug.verse .sug-i b { font-size: 18px; }
.lyr-st, .lyr-full { scroll-margin-top: 10px; }
#lyrAdd { flex: none; white-space: nowrap; }
.panel-h:has(#lyrAdd) { flex-wrap: nowrap; align-items: flex-start; gap: 8px; }
.panel-h:has(#lyrAdd) #lyrTitle { min-width: 0; flex: 1 1 auto; }
/* Prévia antes do telão */
.pv-bar { padding-right: 34px !important; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: #fff4e0; border: 2px solid #e8a33a; color: #7a4a05; border-radius: 10px; padding: 6px 10px; margin-bottom: 6px; font-size: 14px; }
.pv-bar > span { flex: 1 1 auto; }
.pv-bar #pvGo { font-weight: 800; }
#kPv.on { background: #fff4e0; border-color: #e8a33a; color: #7a4a05; }
#histList li.small-item, #notesList li.small-item[data-i] { cursor: pointer; }
#histList li.pick, #notesList li.pick { outline: 2px solid var(--accent); outline-offset: -2px; }

/* Livro / capítulo / versículo: janela grande por cima de tudo ao digitar (Alex 13/11) */
.ref-big-h { display: none; }
body.ref-big #sec-biblia .bible-top { z-index: 960; }
html body #sec-biblia .ref-fields.big { position: fixed; left: 50%; top: 8vh; transform: translateX(-50%); z-index: 960;
  width: min(1000px, calc(100vw - 48px)); height: min(84vh, 860px); min-width: 0; margin: 0;
  display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto auto; align-content: start; gap: 14px;
  background: var(--panel); border-radius: 18px; padding: 18px 22px;
  box-shadow: 0 0 0 100vmax rgba(15, 32, 58, .38), 0 30px 80px rgba(10, 30, 60, .35); }
html body #sec-biblia .ref-fields.big .ref-big-h { display: flex; align-items: baseline; gap: 12px; grid-column: 1 / -1; font-size: 22px; font-weight: 700; color: var(--text); }
.ref-big-h small { font-size: 14px; font-weight: 400; color: var(--muted); }
.ref-big-x { margin-left: auto; align-self: center; border: 0; background: var(--chip); border-radius: 50%; width: 36px; height: 36px; font-size: 18px; cursor: pointer; }
html body #sec-biblia .ref-fields.big .ref-f { position: static; font-size: 14px; letter-spacing: .05em; gap: 5px; grid-column: auto; white-space: nowrap; }
html body #sec-biblia .ref-fields.big .ref-f .input { font-size: 28px; padding: 12px 16px; border-radius: 12px; }
html body #sec-biblia .ref-fields.big .sug { position: absolute; top: var(--sugTop, 150px); left: 22px; right: 22px; bottom: 18px; width: auto; min-width: 0; max-height: none;
  font-size: 22px; border-radius: 14px; box-shadow: none; border: 1px solid var(--line); padding: 8px; }
html body #sec-biblia .ref-fields.big .sug-i { padding: 14px 16px; gap: 14px; }
html body #sec-biblia .ref-fields.big .sug-i b { font-size: 24px; }
html body #sec-biblia .ref-fields.big .sug-i small { font-size: 16px; }
html body #sec-biblia .ref-fields.big .sug.verse .sug-i span { font-size: 22px; line-height: 1.45; color: var(--text); white-space: normal; -webkit-line-clamp: unset; display: block; }
html body #sec-biblia .ref-fields.big .sug.chapter { align-content: flex-start; gap: 8px; }
html body #sec-biblia .ref-fields.big .sug.chapter .sug-i { min-width: 74px; padding: 14px 16px; justify-content: center; }
html body #sec-biblia .ref-fields.big .sug-h { font-size: 15px; }

/* Prévia (Alex 13/11, 2ª versão): 1 clique = PRÉVIA laranja no lugar do AO VIVO; 2 cliques = telão */

/* PRÉVIA ao lado do AO VIVO, à esquerda dos botões (Alex 13/11, 4ª versão: não cobre o que está no telão) */
.dock-ctl { display: grid; grid-template-columns: minmax(150px, min(32%, 230px)) minmax(0, 1fr); column-gap: 10px; align-content: center; }
.dock-ctl > * { grid-column: 2; min-width: 0; }
.dock-ctl > #pvMini { grid-column: 1; grid-row: 1 / span 2; align-self: start; }
.dock-ctl > #qAnnForm { grid-column: 1 / -1; }
.dock-ctl > #kRow { flex-wrap: wrap !important; }
.dock-ctl > #kRow > #kPrev, .dock-ctl > #kRow > #kNext, .dock-ctl > #kRow > #kClear { flex: 1 1 30% !important; }
.dock-ctl > #kRow > .split-btn { flex: 1 1 45% !important; }
.dock-ctl > .row.ix-dock { flex-wrap: wrap; }
.dock-ctl > .row.ix-dock > .btn { flex: 1 1 30%; }
.pv-slot { position: relative; width: 100%; aspect-ratio: 16/9; border-radius: 8px; overflow: hidden; background: #f4f6fa; border: 2px dashed #e8a33a; cursor: default; }
.pv-slot .pv-mini-scr { position: absolute; inset: 0; visibility: hidden; }
.pv-slot.on { border: 3px solid #e8a33a; cursor: pointer; background: #000; box-shadow: 0 4px 14px rgba(232,163,58,.35); }
.pv-slot.on .pv-mini-scr { visibility: visible; }
.pv-slot.on .pv-empty { display: none; }
.pv-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; color: #a0712a; font-size: 12px; line-height: 1.3; padding: 18px 8px 4px; }
.pv-mini-b { position: absolute; left: 0; top: 0; z-index: 2; background: #e8a33a; color: #fff; font-size: 10px; font-weight: 800; letter-spacing: .06em; padding: 2px 6px; border-bottom-right-radius: 5px; }
body:not(.half) .dock[data-dm="c"] .dock-ctl { display: flex; flex-direction: column; }
body:not(.half) .dock[data-dm="c"] #pvMini { display: none; }
.slide.pvsel, .verse.pvsel, [data-live].pvsel { background: #fff4e0 !important; box-shadow: inset 0 0 0 3px #e8a33a !important; }
body.pv-held .slide.live, body.pv-held .verse.live { position: relative; }
body.pv-held .slide.live::after, body.pv-held .verse.live::after { content: '📺 no telão'; position: absolute; top: -9px; right: 10px; z-index: 1; background: var(--live); color: #fff;
  font-size: 11px; font-weight: 800; padding: 1px 7px; border-radius: 999px; pointer-events: none; }
body:not(.half) .dock-ctl > .row.ix-dock > .btn { font-size: 13px; padding-inline: 6px; gap: 3px; }

/* Linha do AO VIVO com 3 posições no computador (Alex 13/11): 1 normal · 2 = PRÉVIA maior e AO VIVO menor · 3 = os dois do mesmo tamanho.
   Cada posição deixa a parte de baixo mais baixa; os botões ficam mais juntos, sem encolher a letra demais. */
body[data-pvpos]:not(.half) .dock { align-items: center; }
body[data-pvpos]:not(.half) .dock-ctl > #pvMini { grid-row: 1 / span 6; align-self: center; }
body[data-pvpos]:not(.half) .dock-ctl > #qAnnForm { grid-column: 2; }
body[data-pvpos]:not(.half) .dock-bgs { align-self: stretch; }
body[data-pvpos="2"]:not(.half) .dock { grid-template-columns: clamp(290px, 22vw, 370px) minmax(0, 1fr) minmax(210px, 17vw) !important; }
body[data-pvpos="2"]:not(.half) .dock-ctl { grid-template-columns: clamp(225px, 17.5vw, 290px) minmax(0, 1fr); row-gap: 5px; }
body[data-pvpos="2"]:not(.half) .dock-ctl > .row { gap: 5px; }
body[data-pvpos="2"]:not(.half) .dock-ctl .btn, body[data-pvpos="2"]:not(.half) .dock-ctl .input { padding-block: 5px; font-size: 13.5px; }
body[data-pvpos="3"]:not(.half) .dock { grid-template-columns: clamp(250px, 19vw, 320px) minmax(0, 1fr) minmax(200px, 16vw) !important; padding-block: 6px; }
body[data-pvpos="3"]:not(.half) .dock-ctl { grid-template-columns: clamp(250px, 19vw, 320px) minmax(0, 1fr); row-gap: 3px; }
body[data-pvpos="3"]:not(.half) .dock-ctl > .row { gap: 4px; }
body[data-pvpos="3"]:not(.half) .dock-ctl .btn, body[data-pvpos="3"]:not(.half) .dock-ctl .input { padding-block: 2px; font-size: 13px; min-height: 0; }
body[data-pvpos="3"]:not(.half) .dock-info { font-size: 12px; }
body[data-pvpos]:not(.half) .dock kbd { display: none; }
body[data-pvpos]:not(.half) .dock { grid-template-columns: var(--pvA) minmax(0, 1fr) minmax(250px, 19vw) !important; }
body[data-pvpos="2"]:not(.half) .dock { --pvA: clamp(290px, 22vw, 370px); }
body[data-pvpos="3"]:not(.half) .dock { --pvA: clamp(250px, 19vw, 320px); }
body[data-pvpos]:not(.half) .dock-h { flex-wrap: nowrap; gap: 6px; }
body[data-pvpos]:not(.half) .dock-h > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
body[data-pvpos]:not(.half) .dock-h .btn { white-space: nowrap; flex: none; }
body[data-pvpos]:not(.half) .quick-type .qt { padding-inline: 3px; font-size: 11px; min-width: 0; }
body[data-pvpos]:not(.half) #qAnnForm select.input { padding-block: 4px; font-size: 13px; height: auto; }
body[data-pvpos="3"]:not(.half) #qAnnForm select.input { padding-block: 2px; }
body[data-pvpos]:not(.half) .dock-ctl > #kRow > #kPrev, body[data-pvpos]:not(.half) .dock-ctl > #kRow > #kNext, body[data-pvpos]:not(.half) .dock-ctl > #kRow > #kClear { flex: 1 1 22% !important; }
body[data-pvpos]:not(.half) .dock-ctl > #kRow > #kFont, body[data-pvpos]:not(.half) .dock-ctl > #kRow > #kTv, body[data-pvpos]:not(.half) .dock-ctl > #kRow > #kTimer { flex: 1 1 14% !important; min-width: 44px; }

/* Resumo da palavra: botões em cima, sempre à vista (Alex 13/11) */
.notes-btns { display: grid; gap: 6px; margin: 2px 0 10px; }
.notes-btns .row { display: flex; flex-wrap: nowrap; gap: 6px; margin: 0; }
.notes-btns .row .btn { flex: 1 1 0; justify-content: center; white-space: nowrap; min-width: 0; padding-block: 8px; }
.notes-btns #notesShow { flex: 2.2 1 0; }
.notes-btns #notesHide { flex: 0 0 auto; }

/* Aba Fundos sem o painel Modelo da letra (Alex 13/11): a galeria ocupa a largura toda; os modelos prontos ficam no Fonte e fundo */
#stylePanel { display: none !important; }
.cols-bg { grid-template-columns: minmax(0, 1fr); }
.look-presets { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 4px 0 6px; }
.look-presets .chip { padding: 4px 10px; font-size: 13px; }
.look-presets[hidden] { display: none; }

/* Quiz e Verdadeiro ou Falso: 🔄 Novo jogo fica na linha do título (com Fonte e Imagem) para os botões do jogo caberem em 2 linhas
   e a parte de baixo ter a mesma altura das outras abas (Alex 13/11). Só aparece com os botões do quiz. */
.dock-ctl:has(> #qzCtrl[hidden]) #qzNew { display: none; }
@media (max-width: 1500px) { .dock-ctl:has(> #qzCtrl:not([hidden])) #ixTools [data-ix-font] .kl, .dock-ctl:has(> #qzCtrl:not([hidden])) #ixTools [data-ix-tv] .kl { display: none; } }
body:not(.half) .dock-ctl > .row.ix-dock > .btn { white-space: normal; line-height: 1.1; padding-block: 2px; }

/* Altura única da parte de baixo no computador (Alex 13/11): quem manda é a tela do AO VIVO, igual em TODAS as abas
   (era a altura da aba Fotos e vídeos). Os botões se ajustam dentro dessa altura em vez de empurrar a linha para cima. */
@media (min-width: 1101px) {
  body:not(.half) .dock:not([data-dm]) { align-items: stretch; }
  body:not(.half) .dock:not([data-dm]) .dock-prev { align-self: center; }
  /* sem overflow hidden: as janelinhas de Fonte, Imagem e Contador abrem para fora desta coluna e seriam cortadas (erro de 13/11) */
  body:not(.half) .dock:not([data-dm]) .dock-ctl { height: 0; min-height: 100%; overflow: visible; }
  body:not(.half):not([data-pvpos]) .dock:not([data-dm]) { min-height: 248px; }
}
@media (min-width: 1101px) and (max-width: 1750px) {
  body:not(.half) .dock-ctl > #kRow .kl, body:not(.half) .dock-ctl > #kRow kbd { display: none; }
  body:not(.half) .dock-ctl > #kRow > #kFont, body:not(.half) .dock-ctl > #kRow > #kTv, body:not(.half) .dock-ctl > #kRow > #kTimer { flex: 1 1 12% !important; min-width: 40px; }
}
@media (min-width: 1101px) {
  body:not(.half) .dock-ctl > .row.ix-dock > .btn { min-height: 38px; }
  body[data-pvpos]:not(.half) .dock-ctl > .row.ix-dock > .btn { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 0; }
  body[data-pvpos="2"]:not(.half) .dock:not([data-dm]) { min-height: 204px; }
}
@media (min-width: 1101px) and (max-width: 1400px) { body:not(.half) .dock-ctl > .row.ix-dock > .btn { font-size: 12px; padding-inline: 3px; } }

/* Mesmo desenho dos botões em TODAS as abas (Alex 13/11): 1ª linha = 3 botões grandes; depois 🅰 Fonte e 🔆 Imagem
   no mesmo lugar da Bíblia/Músicas/Recados/Fundos, e então os botões próprios da aba (Fotos e vídeos, Nuvem, Quiz).
   Posição 1 da linha: Fonte e Imagem abrem a 2ª linha. Posições 2 e 3: ficam na 1ª linha, logo depois dos 3 grandes (igual ao #kRow). */
.dock-ctl > .row.ix-dock > .brk { display: none; flex: 0 0 100%; height: 0; margin: 0; padding: 0; }
.dock-ctl > .row.ix-dock > .btn.kico { flex: 1 1 12%; min-width: 40px; }
body.half .dock-ctl > .row.ix-dock > .brk { display: block; }
body:not(.half) .dock[data-dm="c"] .kico { display: none !important; }
@media (min-width: 1101px) and (max-width: 1750px) { body:not(.half) .dock-ctl > .row.ix-dock .kl { display: none; } }
@media (min-width: 1101px) {
  body:not(.half) .dock:not([data-dm]) .dock-ctl > .row.ix-dock { flex-wrap: wrap !important; gap: 8px; }
  body:not(.half) .dock:not([data-dm]) .dock-ctl > .row.ix-dock > .btn { flex: 1 1 30% !important; min-width: 0; }
  body:not(.half) .dock:not([data-dm]) .dock-ctl > .row.ix-dock > .brk ~ .btn { flex: 1 1 18% !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  body:not(.half) .dock:not([data-dm]) .dock-ctl > .row.ix-dock > .btn.kico { flex: 1 1 12% !important; min-width: 40px; overflow: visible; }
  body:not(.half):not([data-pvpos]) .dock:not([data-dm]) .dock-ctl > .row.ix-dock > .brk { display: block; margin-top: -8px; }
  body[data-pvpos]:not(.half) .dock:not([data-dm]) .dock-ctl > .row.ix-dock { gap: 5px; }
  body[data-pvpos]:not(.half) .dock:not([data-dm]) .dock-ctl > .row.ix-dock > .btn { flex: 1 1 22% !important; }
  body[data-pvpos]:not(.half) .dock:not([data-dm]) .dock-ctl > .row.ix-dock > .brk ~ .btn { flex: 1 1 20% !important; }
  body[data-pvpos]:not(.half) .dock:not([data-dm]) .dock-ctl > .row.ix-dock > .btn.kico { flex: 1 1 14% !important; min-width: 44px; }
}
/* Posição 1: Fonte, Imagem (e Contador) com a MESMA largura em todas as abas, para ficarem exatamente no mesmo lugar; botões da mesma altura do padrão */
@media (min-width: 1101px) {
  body:not(.half):not([data-pvpos]) .dock:not([data-dm]) .dock-ctl > #kRow > #kFont, body:not(.half):not([data-pvpos]) .dock:not([data-dm]) .dock-ctl > #kRow > #kTv,
  body:not(.half):not([data-pvpos]) .dock:not([data-dm]) .dock-ctl > #kRow > #kTimer, body:not(.half):not([data-pvpos]) .dock:not([data-dm]) .dock-ctl > .row.ix-dock > .btn.kico { flex: 0 0 16% !important; min-width: 0; padding-inline: 4px; }
  body:not(.half):not([data-pvpos]) .dock:not([data-dm]) .dock-ctl > .row.ix-dock > .btn { min-height: 43px; }
  body:not(.half) .dock:not([data-dm]) .dock-info-row .ix-tools { margin-block: -4px; }
}
@media (min-width: 1101px) {
  /* a quebra de linha sai sozinha pelas larguras (3 × 30% e depois 16%); o separador só é usado na meia tela */
  body:not(.half) .dock:not([data-dm]) .dock-ctl > .row.ix-dock > .brk { display: none !important; }
  body:not(.half):not([data-pvpos]) .dock:not([data-dm]) .dock-ctl > #kRow > .split-btn { flex: 1 1 30% !important; min-width: 0; }
}
@media (min-width: 1101px) and (max-width: 1400px) {
  body:not(.half):not([data-pvpos]) .dock:not([data-dm]) .dock-ctl > .row.ix-dock > .brk ~ .btn:not(.kico) { white-space: normal; font-size: 11px; line-height: 1.1; padding-inline: 2px; }
}
@media (min-width: 1101px) and (max-width: 1600px) {
  body[data-pvpos="2"]:not(.half) .dock:not([data-dm]) .dock-ctl > .row.ix-dock > .btn:not(.kico) { white-space: normal; font-size: 12px; line-height: 1.05; padding-block: 2px; }
}
/* 2ª linha dos botões da aba: largura conforme o nome de cada um (com o 🎁 Sortear ligado são 3 botões além de Fonte e Imagem) */
@media (min-width: 1101px) {
  body:not(.half):not([data-pvpos]) .dock:not([data-dm]) .dock-ctl > .row.ix-dock > .brk ~ .btn:not(.kico) { flex: 1 1 auto !important; padding-inline: 4px; }
}
/* tela estreita: os botões da 2ª linha dividem o espaço que sobra (não quebram para uma 3ª linha) */
@media (min-width: 1101px) and (max-width: 1400px) {
  body:not(.half):not([data-pvpos]) .dock:not([data-dm]) .dock-ctl > .row.ix-dock > .brk ~ .btn:not(.kico) { flex: 1 1 0 !important; min-width: 0; overflow: hidden; }
}
