/* Rugir · acabamento (padrão visual). Carregado por último: superfícies planas, uma hierarquia de texto,
   um jeito de botão, menos rótulos repetidos e telas vazias que explicam o próximo passo. */

/* Neutros mais sóbrios no escuro (a cor de destaque de cada igreja continua a mesma). */
/* Marca Rugir: grafite neutro quente + âmbar (#F59E0B), usado com parcimônia (ação principal, item atual, progresso).
   A cor que a igreja escolher continua valendo por cima. */
:root:not([data-theme="light"]) {
  --bg: #0c0b0a; --surface: #151412; --surface-2: #1b1a17; --surface-3: #24221e;
  --line: #2d2a26; --line-soft: #201e1b; --text: #f4f1ec; --dim: #a39e96; --faint: #6f6a63; --field: #100f0d;
  --gold: #f59e0b; --gold-rgb: 245, 158, 11; --gold-strong: #fbbf24; --gold-ink: #1a1206; --gold-wash: #2a1e0b;
  --gold-deep: #171007; --gold-line: #7a5412; --gold-text: #fcd38a;
  --amber: #fb7d3c; --amber-wash: #331a0e; --amber-line: #6e3418; --tint-amber: #ffc29e;
}
html body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

/* Superfícies: planas, sem degradê nem brilho. */
html .panel, html .show-card { background-color: var(--surface) !important; background-image: none !important; box-shadow: none !important; border: 1px solid var(--line-soft) !important; border-radius: 18px; }
html .panel .panel { background-color: transparent !important; border: 0 !important; }

/* Títulos: um tamanho por nível; o rótulo dourado em cima do título sai (repetia o título). */
html .page-head h1 { font-size: 28px; font-weight: 700; letter-spacing: -.025em; line-height: 1.15; }
html .page-head .kicker, html .kicker:has(+ h1), html .kicker:has(+ h2) { display: none !important; }
html .panel h2 { font-size: 17px; font-weight: 650; letter-spacing: -.01em; }
html .page-head p.subtle { font-size: 14px; }

/* Botões: um padrão só. Dourado = ação principal; cinza = secundária; texto = terciária. */
html button { border-radius: 12px; font-weight: 600; letter-spacing: 0; box-shadow: none !important; background-image: none; transition: background-color .15s ease, border-color .15s ease, filter .15s ease; }
html button.gold { border-color: transparent; }
html button.gold:hover:not(:disabled) { filter: brightness(1.07); }
html button.quiet { background: transparent; border-color: transparent; color: var(--dim); }
html button.danger, html button.danger.quiet { background: transparent; border-color: transparent; color: var(--red); }
html button:active:not(:disabled) { transform: none; filter: brightness(.94); }

/* Campos. */
html input:not([type=checkbox]):not([type=radio]):not([type=range]), html select, html textarea { background-color: var(--field); border: 1px solid var(--line); border-radius: 12px; }
html :is(input, select, textarea, button):focus-visible { outline: 2px solid rgba(var(--gold-rgb), .55); outline-offset: 2px; }

/* Cabeçalho: sólido e discreto. */
:root:not([data-theme="light"]) .top { background: rgba(12, 11, 10, .9); -webkit-backdrop-filter: saturate(1.4) blur(18px); backdrop-filter: saturate(1.4) blur(18px); border-bottom: 1px solid var(--line-soft); box-shadow: none; }

/* Sem culto aberto: nada de ações de culto nem player vazio. */
body:not(.has-show) :is(#sync-show, #delete-show, #checkup-publish, #checkup-live) { display: none !important; }
body:not(.has-show) #stage .performance > :not(.now-row), body:not(.has-show) #stage .performance .clock, body:not(.has-show) #stage .now-line { display: none !important; }
body:not(.has-show) #stage :is(.sections, .live-chart, .set-order, .sound-console) { display: none !important; }

/* Excluir culto: discreto, no fim da linha (ação perigosa não fica em destaque). */
#delete-show { order: 9; margin-left: auto; font-size: 14px; }

/* ---------- Celular ---------- */
@media (max-width: 620px) {
  /* Cabeçalho: só o logo; nada de status técnico do player. */
  .brand-lockup small, #player-device { display: none !important; }

  html .page-head { gap: 10px; }
  html .page-head h1 { font-size: 26px; }
  /* "Atualizar" some no celular: os dados já atualizam ao abrir a tela. */
  #refresh, #refresh-chart-library { display: none !important; }

  /* Cultos: um botão principal por culto; os outros iguais e discretos. */
  html .show-card { padding: 16px; gap: 8px; min-height: 0; }
  html .show-card .actions { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; }
  html .show-card .actions button { min-height: 42px; }
  html .show-card .actions button.gold { background: var(--surface-2); color: var(--text); border: 1px solid var(--line); }

  /* Cifras: a caixa "escolha uma música" só ocupava espaço antes de escolher. */
  #chart-lib-placeholder { display: none !important; }

  /* Equipe: "convite pendente" escrito, não só uma bolinha; filtros numa linha que rola. */
  .team-dot.is-pending { font-size: 11.5px !important; gap: 6px !important; color: var(--gold); }
  .team-filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -2px; padding: 2px; }
  .team-filters::-webkit-scrollbar { display: none; }
  .team-filter { flex: 0 0 auto; }
}

/* Ao vivo com culto aberto e nenhuma música: só o cabeçalho pedindo a música (sem player vazio). */
body.has-show:not(.has-song) #stage .performance > :not(.now-row), body.has-show:not(.has-song) #stage .performance .clock, body.has-show:not(.has-song) #stage .now-line { display: none !important; }

/* Preparar: "+ Adicionar música" como botão de verdade. */
.add-song-open { width: 100%; min-height: 46px; margin: 4px 0 12px; background: var(--surface-2) !important; border: 1px dashed var(--line) !important; color: var(--text) !important; font-size: 15px; }

/* Início: "Comece por aqui" compacto. */
.setup-progress { display: block; margin-top: 2px; color: var(--dim); font-size: 13px; }
.setup-steps { margin: 10px 0 0; padding: 0; list-style: none; }
.setup-steps li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0 2px; border: 0 !important; background: transparent !important; }

@media (max-width: 620px) {
  /* Repertório do culto: linhas com divisória, não cartões empilhados. */
  #song-editor details.editor { margin: 0 !important; border-top: 1px solid var(--line-soft); }
  #song-editor details.editor:first-of-type { border-top: 0; }
  #song-editor details.editor > summary { background: transparent !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; padding: 13px 2px !important; }
  #song-editor details.editor[open] > summary { color: var(--gold); }
}

/* Links de ação (ex.: "Enviar para mais alguém"): texto discreto, sem sublinhado. */
html button.link-button { text-decoration: none !important; color: var(--dim) !important; font-weight: 600; font-size: 14px; background: transparent; border: 0; }
html button.link-button:hover { color: var(--text) !important; }

/* Marca: logo horizontal do Rugir (símbolo + nome) como foi desenhada. No tema claro, a versão escura. */
.top .brand .brand-wordmark, .welcome .brand-wordmark { border-radius: 0 !important; box-shadow: none !important; width: auto; display: block; }
.top .brand img.brand-wordmark { height: 24px !important; width: auto !important; min-width: 0; max-width: none; flex: 0 0 auto; object-fit: contain; }
.welcome .welcome-logo { margin: 0 0 6px; line-height: 0; }
.welcome .brand-wordmark { height: 44px; }
html[data-theme="light"] .brand-wordmark { content: url("./marcas/stageflow-word-light.png"); }
@media (max-width: 620px) { .top .brand img.brand-wordmark { height: 22px !important; } }
@media (max-width: 620px) { .nav-drawer-status { display: none !important; } }

/* Menu lateral: logo da marca no topo e itens agrupados por assunto. */
.nav-drawer-head .nav-drawer-word { height: 24px; width: auto; border-radius: 0; box-shadow: none; }
html[data-theme="light"] .nav-drawer-head .nav-drawer-word { content: url("./marcas/stageflow-word-light.png"); }
nav.tabs .nav-group { display: block; margin: 16px 12px 4px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
nav.tabs .nav-group[hidden] { display: none; }
nav.tabs:not(.as-drawer) .nav-group { display: none; }

/* ---------- Menu da conta (bolinha) ---------- */
.acct-sheet { width: min(420px, calc(100vw - 24px)); max-height: min(86vh, 760px); overflow: auto; padding: 22px 18px 14px; border: 1px solid var(--line); border-radius: 24px; background: var(--surface); color: var(--text); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .7); }
.acct-sheet::backdrop { background: rgba(5, 5, 9, .62); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.acct-sheet[open] { animation: acct-in .22s cubic-bezier(.2, .8, .2, 1); }
@keyframes acct-in { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }
.acct-grab { display: none; }
.acct-close { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; min-height: 0 !important; padding: 0 !important; display: grid; place-items: center; border-radius: 50% !important; background: var(--surface-2) !important; border: 0 !important; color: var(--dim); }
.acct-head { display: flex; align-items: center; gap: 14px; padding: 4px 40px 18px 2px; }
.acct-avatar { flex: 0 0 auto; width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; overflow: hidden; font-size: 24px; font-weight: 700; color: var(--gold-ink); background: var(--gold); }
.acct-avatar img { width: 100%; height: 100%; object-fit: cover; }
.acct-who { display: grid; gap: 2px; min-width: 0; }
.acct-who strong { font-size: 18px; font-weight: 700; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-who small { color: var(--dim); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-edit { justify-self: start; margin-top: 8px; min-height: 30px !important; padding: 4px 12px !important; font-size: 13px; border-radius: 999px !important; background: var(--surface-2) !important; border: 1px solid var(--line) !important; color: var(--text); }
.acct-group { margin: 0 0 14px; }
.acct-group h3 { margin: 0 0 6px 6px; font-size: 11.5px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--faint); }
.acct-list { border-radius: 16px; background: var(--surface-2); overflow: hidden; }
.acct-row { width: 100%; min-height: 50px !important; display: flex; align-items: center; gap: 12px; padding: 0 14px !important; border: 0 !important; border-radius: 0 !important; background: transparent !important; color: var(--text); font-size: 15.5px; font-weight: 500; text-align: left; }
.acct-row + .acct-row { box-shadow: inset 0 1px 0 var(--line-soft) !important; }
.acct-row:hover, .acct-row:focus-visible { background: rgba(255, 255, 255, .035) !important; }
.acct-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: rgba(var(--gold-rgb), .14); color: var(--gold-text); flex: 0 0 auto; }
.acct-icon svg { width: 18px; height: 18px; }
.acct-label { flex: 1 1 auto; min-width: 0; }
.acct-hint { color: var(--faint); font-size: 13px; }
.acct-chev { color: var(--faint); display: grid; }
.acct-row.is-danger { color: var(--red); }
.acct-row.is-danger .acct-icon { background: rgba(255, 122, 107, .12); color: var(--red); }
.acct-foot { margin: 6px 0 0; text-align: center; font-size: 12px; color: var(--faint); }
html[data-theme="light"] .acct-sheet { box-shadow: 0 30px 80px -20px rgba(20, 20, 40, .3); }
html[data-theme="light"] .acct-row:hover { background: rgba(0, 0, 0, .03) !important; }
@media (max-width: 620px) {
  .acct-sheet { width: 100vw; max-width: none; margin: auto 0 0; max-height: 90vh; border-radius: 24px 24px 0 0; border-bottom: 0; padding: 10px 16px calc(14px + env(safe-area-inset-bottom, 0px)); }
  .acct-sheet[open] { animation: acct-up .26s cubic-bezier(.2, .8, .2, 1); }
  @keyframes acct-up { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }
  .acct-grab { display: block; width: 38px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 12px; }
  .acct-close { top: 18px; }
}

/* Preferências: animações reduzidas e espaçamento compacto. */
html[data-motion="reduced"] *, html[data-motion="reduced"] *::before, html[data-motion="reduced"] *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition: none !important; scroll-behavior: auto !important; }
html[data-density="compact"] main .panel { padding: 11px 12px 6px; }
html[data-density="compact"] main .panel + .panel, html[data-density="compact"] #home .home-grid { gap: 10px; margin-top: 10px; }
html[data-density="compact"] #home .home-item, html[data-density="compact"] .schedule-day { padding-top: 8px !important; padding-bottom: 8px !important; }
html[data-density="compact"] button, html[data-density="compact"] select, html[data-density="compact"] input:not([type=checkbox]):not([type=radio]):not([type=range]) { min-height: 38px; }
html[data-density="compact"] .page-head h1 { font-size: 23px; }
#cloud-space-detail.is-warning { color: var(--amber, #f4a940); font-weight: 600; }

/* Celular: no Ao vivo, o culto (Modo Ministro e as músicas) vem primeiro; o player logo abaixo. */
@media (max-width: 620px) {
  body.has-show .stage-grid { grid-template-areas: "setlist" "performance" "chart" "sections" "pads" "mixer" !important; }
  /* Com a música escolhida, o player sobe para o topo (antes ficava abaixo da lista inteira). */
  body.has-show.has-song .stage-grid { grid-template-areas: "performance" "sections" "chart" "setlist" "pads" "mixer" !important; }
  body.has-show #stage .set-order .minister-open, body.has-show #stage .set-order button[data-minister] { order: -1; }
}
@media (max-width: 620px) { body.has-show #minister-mode-open { min-height: 46px; background: var(--gold) !important; color: var(--gold-ink) !important; border-color: transparent !important; font-weight: 700; } }
/* Modo Estudo: logo horizontal no topo. */
.study-top .brand img.brand-wordmark { height: 24px !important; width: auto !important; border-radius: 0 !important; box-shadow: none !important; }
@media (max-width: 620px) { .study-top .brand img.brand-wordmark { height: 20px !important; } }

/* Abertura do app: símbolo da marca com um respiro suave (sem brilho quadrado) e o nome no estilo da logo. */
body.is-booting .boot-splash { background: radial-gradient(circle at 50% 40%, rgba(var(--gold-rgb), .14), transparent 55%), var(--bg) !important; }
.boot-splash img { width: 76px !important; height: auto !important; border-radius: 0 !important; box-shadow: none !important; animation: sf-breathe 2.4s ease-in-out infinite !important; filter: drop-shadow(0 10px 28px rgba(var(--gold-rgb), .35)); }
@keyframes sf-breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.045); } }
.boot-splash strong { font-size: 1.75rem !important; font-weight: 700 !important; letter-spacing: -.025em !important; padding-left: 0 !important; text-transform: none !important; }
.boot-splash .boot-slogan { letter-spacing: .14em; text-transform: uppercase; font-size: .72rem; color: var(--gold-text, var(--dim)); }

/* Topo: o balão do chat fica na mesma linha dos outros ícones (o desenho tem a "cauda" embaixo). */
.top .chat-toggle { height: 38px; min-height: 38px; width: 40px; min-width: 40px; padding: 0; display: grid; place-items: center; align-self: center; }

/* ---------- Equipe ---------- */
/* Topo: título numa linha, ações na de baixo (nada espremido). */
#team .page-head { flex-wrap: wrap; align-items: center; row-gap: 10px; }
#team .team-head-actions { display: flex; align-items: center; gap: 8px; }
@media (max-width: 620px) { #team .page-head > div:first-child { flex: 1 1 100%; } #team .team-head-actions { flex: 1 1 100%; } #team #team-add-top { flex: 1 1 auto; } #refresh-team { display: none !important; } }
/* Ajustes da equipe: uma linha no padrão de Ajustes (ícone, título, descrição e seta). */
#team .team-settings-box { padding: 0 !important; overflow: hidden; }
#team .team-settings-box > summary { display: flex; align-items: center; gap: 12px; padding: 14px 16px; list-style: none; cursor: pointer; }
#team .team-settings-box > summary::-webkit-details-marker { display: none; }
#team .ts-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: rgba(var(--gold-rgb), .14); color: var(--gold-text); flex: 0 0 auto; }
#team .ts-icon svg { width: 18px; height: 18px; }
#team .ts-text { display: grid; gap: 1px; flex: 1 1 auto; min-width: 0; }
#team .ts-text b { font-size: 15.5px; font-weight: 600; }
#team .ts-text small { font-size: 13px; color: var(--dim); }
#team .ts-chev { color: var(--faint); transition: transform .2s ease; flex: 0 0 auto; }
#team .team-settings-box[open] .ts-chev { transform: rotate(90deg); }
#team .team-settings-box[open] > summary { border-bottom: 1px solid var(--line-soft); }
#team .team-settings-box > :not(summary) { margin-left: 16px; margin-right: 16px; }
#team .team-settings-box[open] { padding-bottom: 14px !important; }
/* Convite: cartão com o código grande e os botões de compartilhar. */
#team .team-code { display: grid; gap: 12px; padding: 16px; margin: 4px 0 14px; border: 1px solid var(--line-soft) !important; border-radius: 16px; background: var(--surface-2) !important; }
#team .team-code-head { display: grid; gap: 2px; }
#team .team-code-head strong { font-size: 15.5px; font-weight: 600; }
#team .team-code-head small { font-size: 13px; color: var(--dim); }
#team .team-code-value { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 28px; font-weight: 700; letter-spacing: .18em; color: var(--text); padding: 4px 0; }
#team .team-code-actions { display: flex; flex-wrap: wrap; gap: 8px; }
#team .team-code-actions button { min-height: 40px; }
#team .team-code-create { justify-self: start; }

/* ---------- Repertório: estado + confirmar ---------- */
.repertoire-panel .rep-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.repertoire-panel .rep-head h2 { margin: 0; }
.rep-badge { padding: 4px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: var(--surface-2); color: var(--dim); }
.rep-badge[data-status="defined"] { background: rgba(var(--gold-rgb), .16); color: var(--gold-text); }
.rep-badge[data-status="released"] { background: rgba(95, 212, 154, .14); color: var(--green, #5fd49a); }
.rep-seg { display: flex; padding: 3px; gap: 2px; border-radius: 12px; background: rgba(0, 0, 0, .25); margin-bottom: 12px; }
.rep-seg button { flex: 1 1 0; min-height: 36px !important; padding: 0 6px !important; border: 0 !important; border-radius: 9px !important; background: transparent !important; color: var(--dim); font-size: 14px; font-weight: 600; white-space: nowrap; }
.rep-seg button[aria-pressed="true"] { background: var(--surface) !important; color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .35) !important; }
html[data-theme="light"] .rep-seg { background: rgba(0, 0, 0, .06); }
.rep-confirm { width: 100%; min-height: 48px !important; font-size: 15.5px; }
.rep-confirm.is-sent { background: var(--surface-2) !important; color: var(--text) !important; border: 1px solid var(--line) !important; }
.rep-more { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 4px; }
.repertoire-panel #repertoire-detail { margin: 10px 0 2px; font-size: 13.5px; }
.repertoire-panel #repertoire-detail { display: block !important; }

/* Campos de texto: o que se digita na cor normal do texto (antes alguns ficavam cinza-apagado), fundo de campo único. */
html input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=file]), html select, html textarea { color: var(--text) !important; background-color: var(--field) !important; border-color: var(--line) !important; }
html input::placeholder, html textarea::placeholder { color: var(--faint); opacity: 1; }
html input:disabled, html select:disabled, html textarea:disabled { color: var(--dim) !important; }

/* Trocar de área (Rugir → Backstage / RS Central) no tema claro: folha clara, não preta. */
html[data-theme="light"] .area-sheet-body { background: rgba(255, 255, 255, .94); border-top-color: rgba(0, 0, 0, .08); color: var(--text); }
html[data-theme="light"] .area-sheet::backdrop { background: rgba(20, 20, 30, .28); }
html[data-theme="light"] .area-choice { background: rgba(0, 0, 0, .03); border-color: rgba(0, 0, 0, .08); }
html[data-theme="light"] .area-choice.is-current { background: linear-gradient(135deg, rgba(var(--o), .14), rgba(var(--o), .04)); box-shadow: none; }
html[data-theme="light"] .area-grab { background: rgba(0, 0, 0, .18); }

/* Relatórios do louvor */
.reports-body { display: grid; gap: 12px; max-width: 760px; }
.rpt-period { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.rpt-period button { flex: 0 0 auto; min-height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--dim); font-size: 13px; }
.rpt-period button[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); }
.rpt-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.rpt-tiles > div { display: grid; gap: 2px; padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line-soft); min-width: 0; }
.rpt-tiles span { font-size: 12px; color: var(--dim); }
.rpt-tiles strong { font-size: 24px; font-weight: 650; font-variant-numeric: tabular-nums; }
.rpt-range { margin: -4px 2px 0; font-size: 12px; }
.rpt-card { display: grid; gap: 8px; }
.rpt-card h2 { margin: 0; font-size: 15px; }
.rpt-list { list-style: none; margin: 0; padding: 0; display: grid; }
.rpt-list li { display: grid; grid-template-columns: minmax(0, 1fr) 72px 40px; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line-soft); }
.rpt-list li:first-child { border-top: 0; }
.rpt-list li:not(:has(.rpt-bar)) { grid-template-columns: minmax(0, 1fr) 40px; }
.rpt-main { display: grid; min-width: 0; }
.rpt-main b { font-weight: 550; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rpt-main small { font-size: 12px; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rpt-bar { height: 6px; border-radius: 3px; background: var(--line-soft); overflow: hidden; }
.rpt-bar i { display: block; height: 100%; border-radius: 3px; background: var(--gold); }
.rpt-n { text-align: right; font-size: 13px; color: var(--dim); font-variant-numeric: tabular-nums; }
.rpt-more { justify-self: start; }
.rpt-csv { justify-self: start; }
@media (max-width: 520px) { .rpt-list li { grid-template-columns: minmax(0, 1fr) 48px 34px; gap: 8px; } .rpt-tiles strong { font-size: 20px; } }
.rpt-empty { margin: 0; font-size: 13px; color: var(--dim); }
/* Opções do player (Biblioteca, armazenamento e player): não passam da largura em telas de 320 px. */
@media (max-width: 520px) { .mode-options { grid-template-columns: minmax(0, 1fr) !important; } }
.mode-option, .mode-option * { min-width: 0; overflow-wrap: anywhere; }
/* Caixa de marcar no padrão da marca (a nativa ficava cinza no tema escuro). */
html input[type="checkbox"] { -webkit-appearance: none; appearance: none; flex: none; width: 20px; height: 20px; min-height: 20px; margin: 0; padding: 0; border: 1.5px solid var(--line); border-radius: 6px; background: transparent center / 14px 14px no-repeat; cursor: pointer; transition: background-color .15s, border-color .15s; vertical-align: middle; }
html input[type="checkbox"]:hover { border-color: var(--dim); }
html input[type="checkbox"]:checked { background-color: var(--gold); border-color: var(--gold); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E"); }
html input[type="checkbox"]:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
html input[type="checkbox"]:disabled { opacity: .45; cursor: default; }
/* Metrônomo: a saída de áudio ocupa a linha toda (o nome não fica cortado). */
.metro-options label:last-child { grid-column: 1 / -1; }
/* Repertório: o selo repete o botão marcado; só aparece quando já foi enviado ("Final · enviado"). */
.rep-badge:not([data-status="released"]) { display: none; }
/* Ao vivo sem música escolhida: aviso discreto em vez de título enorme. */
body:not(.has-song) #song-name { font-size: 20px; letter-spacing: -.01em; }

/* Medidor de cada faixa no mixer (verde → amarelo → vermelho). */
.channel-volume { position: relative; }
.channel-meter { position: absolute; left: 0; right: 56px; bottom: -5px; height: 4px; border-radius: 3px; background: var(--line-soft); overflow: hidden; pointer-events: none; }
.channel-meter i { display: block; height: 100%; background: linear-gradient(90deg, #22c55e 0%, #22c55e 62%, #eab308 80%, #ef4444 92%); clip-path: inset(0 100% 0 0); transition: clip-path .05s linear; }
.channel-meter.is-clip { box-shadow: 0 0 0 1px #ef4444; }

/* Master do Ao vivo (VS + pads). */
.master-volume { display: grid; grid-template-columns: minmax(0, 1fr) 48px; align-items: center; gap: 10px; min-height: 44px; padding-bottom: 6px; }
.master-volume input { width: 100%; min-width: 0; }
.master-volume .channel-value { text-align: right; font-variant-numeric: tabular-nums; }
.master-volume .channel-meter { right: 58px; bottom: 2px; }

/* Biblioteca de músicas na nuvem: nome em cima, etiquetas embaixo, lixeira discreta. */
.cloud-song { display: grid !important; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.cloud-song-copy { display: grid; gap: 6px; min-width: 0; }
.cloud-song-head { display: grid; min-width: 0; }
.cloud-song-head strong { font-size: 15px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cloud-song-artist { font-size: 13px; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cloud-song-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.cloud-chip { padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700; background: var(--soft, rgba(127,127,140,.14)); color: var(--dim); }
.cloud-chip.is-vs { background: rgba(var(--gold-rgb), .16); color: var(--gold-text); }
.cloud-song-extra { font-size: 12px; color: var(--faint); }
.cloud-song-delete { width: 40px; min-height: 40px !important; padding: 0 !important; display: grid; place-items: center; color: var(--dim); }
.cloud-song-delete:hover { color: var(--red, #ef4444); }
/* Preparar: "Excluir culto" no fim da tela, longe dos botões do dia a dia. */
.danger-zone { display: flex; justify-content: center; padding: 18px 0 8px; }
/* "Quem estudou?" fechado: setinha mostra que abre. */
details.study-progress-panel > summary h2::after { content: ' ›'; display: inline-block; margin-left: 4px; color: var(--muted, #9a98a8); transition: transform .2s ease; }
details.study-progress-panel[open] > summary h2::after { transform: rotate(90deg); }
/* Sem música escolhida, o Mixer não tem o que mostrar: a aba e o painel somem (Pads, Clique e Guia continuam). */
body:not(.has-song) #stage .console-tabs [data-pane="mixer"], body:not(.has-song) #stage .console-pane[data-pane="mixer"] { display: none !important; }
/* Celular: botões do Ao vivo numa linha só ("Fade out" não quebra) e o PAN mostra "Centro" inteiro. */
#repeat, #fade-up, #fade-down { white-space: nowrap; }
@media (max-width: 620px) {
  #fade-up, #fade-down, #repeat { padding-left: 8px; padding-right: 8px; gap: 6px; }
  #channel-list .channel > .channel-pan { min-width: 0; }
  #channel-list .channel-pan > span { min-width: 4.4em; text-align: right; white-space: nowrap; }
}
/* Computador: o Master ocupa a linha inteira (o slider ficava curto); "Baixar offline" numa linha. */
.transpose-panel.master-panel { grid-column: 1 / -1; }
.setlist-tool { white-space: nowrap; }
/* Topo igual nos três apps: chat, sino, engrenagem e a foto, nessa ordem (como no Backstage e na RS Central). */
.top > .prefs-gear { order: 1; }
.top > #identity { order: 2; }
.top > #account-toggle { order: 3; }
/* "Quem mais serviu": setinha que gira ao abrir (no lugar de ▸/▾). */
#schedule-history-toggle .collapse-icon { display: inline-block; font-size: 1.2em; line-height: 1; transition: transform .2s ease; }
#schedule-history-toggle[aria-expanded="true"] .collapse-icon { transform: rotate(90deg); }
/* Cifra no Ao vivo: chave (liga/desliga) no lugar da caixinha. */
#live-chart-toggle { appearance: none; -webkit-appearance: none; flex: none; width: 36px; height: 22px; margin: 0; border-radius: 999px; background: rgba(127, 127, 140, .35); position: relative; cursor: pointer; transition: background .2s ease; }
#live-chart-toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s ease; }
#live-chart-toggle:checked { background: var(--gold, #f59e0b); }
#live-chart-toggle:checked::after { transform: translateX(14px); }
/* "Pronto para o culto?" fica só no Ao vivo, no aparelho que vai tocar (no Preparar repetia o mesmo botão). */
#checkup-publish { display: none !important; }
/* Equipe: nome comprido usa duas linhas em vez de cortar ("Laís (louvor e…"). */
.team-row-copy strong { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.25; }
/* App de verdade (Android/iPhone): já está instalado. */
html[data-native] .install-help { display: none !important; }
/* Login: "Ver uma demonstração" (quem está conhecendo o Rugir, e a revisão da Apple/Google). */
#see-demo { display: inline-block; margin-left: 14px; text-decoration: none; }
/* Preparação das músicas: barra no cartão da música escolhida e barrinha/✓ em cada música da lista. */
.prepare-progress { display: grid; gap: 6px; margin-top: 10px; max-width: 520px; }
.prepare-progress[hidden] { display: none; }
.prepare-progress b { display: block; height: 8px; border-radius: 999px; background: rgba(127, 127, 140, .22); overflow: hidden; }
.prepare-progress i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--gold, #f59e0b); transition: width .3s ease; }
.prepare-progress small { font-size: 13px; color: var(--muted, #9a98a8); font-variant-numeric: tabular-nums; }
#set-order .song-button { position: relative; overflow: hidden; }
#set-order .song-button.is-preparing::after { content: ""; position: absolute; left: 0; bottom: 0; height: 3px; width: var(--prep, 0%); background: var(--gold, #f59e0b); transition: width .3s ease; }
#set-order .song-button.is-ready:not(.is-current) .song-state:empty::before { content: "✓ pronta"; font-size: 10px; letter-spacing: .06em; color: var(--ok, #6fd39b); }
/* Menu do perfil: abas Conta | Preferências (as preferências saíram da engrenagem do topo). */
.acct-tabs { display: flex; gap: 2px; padding: 3px; margin: 4px 0 14px; border-radius: 12px; background: rgba(0, 0, 0, .25); }
.acct-tabs button { flex: 1 1 0; min-height: 36px !important; padding: 0 8px !important; border: 0 !important; border-radius: 9px !important; background: transparent !important; color: var(--muted, #9a98a8); font: inherit; font-size: 14px; font-weight: 600; }
.acct-tabs button[aria-selected="true"] { background: var(--surface, #15151c) !important; color: var(--text, #fff); box-shadow: 0 1px 3px rgba(0, 0, 0, .35) !important; }
html[data-theme="light"] .acct-tabs { background: rgba(0, 0, 0, .06); }
.acct-pane[hidden] { display: none; }
.acct-pane .pf-sub { margin: 0 4px 14px; }
/* A engrenagem saiu do topo: as preferências ficam na aba "Preferências" do menu do perfil (o botão continua escondido para o menu lateral). */
.top > .prefs-gear { display: none !important; }
/* Boas-vindas da igreja nova: 3 passos (nome, primeiro culto, convite). */
.welcome-dialog { width: min(440px, calc(100vw - 24px)); }
.welcome-dots { display: flex; justify-content: center; gap: 6px; margin: 2px 0 14px; }
.welcome-dots i { width: 8px; height: 8px; border-radius: 50%; background: rgba(127, 127, 140, .35); }
.welcome-dots i.is-on { width: 22px; border-radius: 999px; background: var(--gold, #f59e0b); }
.welcome-dots i.is-done { background: var(--gold, #f59e0b); opacity: .5; }
.welcome-body { display: grid; gap: 12px; }
.welcome-body h2 { margin: 0; }
.welcome-body label { display: grid; gap: 6px; }
.welcome-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.welcome-invite { display: grid; gap: 10px; justify-items: center; padding: 14px; border-radius: 16px; background: rgba(127, 127, 140, .1); }
.welcome-wa { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 48px; border-radius: 14px; background: #25d366; color: #04210f; font-weight: 700; text-decoration: none; }
.welcome-dialog .dialog-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
/* Aba Crossfade (☰, computador): um cartão por passagem; escolhas por toque, salvas na hora. */
.mixes-body { display: grid; gap: 10px; padding: 10px; }
.mix-row { display: grid; gap: 10px; padding: 14px; border-radius: 16px; background: rgba(127, 127, 140, .07); }
.mix-row.is-mixed { box-shadow: inset 3px 0 0 var(--gold, #f59e0b); }
.mix-head { display: flex; align-items: center; gap: 12px; }
.mix-head strong { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 16px; }
.mix-number { font-variant-numeric: tabular-nums; color: var(--muted, #9a98a8); font-weight: 700; }
.mix-line { display: grid; grid-template-columns: 130px minmax(0, 1fr); align-items: center; gap: 10px; }
.mix-label { font-size: 13px; color: var(--muted, #9a98a8); }
.mix-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.mix-chips button, .mix-pick { min-height: 34px !important; padding: 0 12px !important; border-radius: 999px !important; font-size: 13px; font-weight: 600; }
.mix-chips button.is-on, .mix-pick.is-on { background: var(--gold, #f59e0b) !important; color: var(--gold-ink, #fff) !important; border-color: transparent !important; }
.mix-pick { width: auto !important; }
@media (max-width: 760px) { .mix-line { grid-template-columns: 1fr; gap: 6px; } }
.tabs button[data-view="mixes"] { --tab-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 7h6c3 0 4 10 7 10h5'/%3E%3Cpath d='M3 17h6c3 0 4-10 7-10h5'/%3E%3Cpath d='m18 4 3 3-3 3'/%3E%3Cpath d='m18 14 3 3-3 3'/%3E%3C/svg%3E"); }
.mix-culto-line { padding: 4px 4px 8px; }
.mix-culto-pick { max-width: 420px; min-height: 42px; }
@media (max-width: 620px) { html .top .brand img.logo-word { height: 32px !important; } }
