/* Sala da Equipe — Lady Co. · verde #232E10 e dourado #DAC2A2 · tema claro e escuro */

:root {
  color-scheme: light dark;
  --verde: #232E10;
  /* a "mesa" da conversa tem a cor do fundo da foto da Ária (Hermes, 02/10), igual nos dois temas */
  --mesa: #18281D;
  --mesa-desenho: rgba(218, 194, 162, 0.07);
  --mesa-texto: rgba(243, 235, 221, 0.78);
  --dourado: #DAC2A2;
  --dourado-forte: #A8773A;
  --creme: #F3EBDD;

  --fundo: #EFEAE0;
  --fundo-desenho: rgba(35, 46, 16, 0.045);
  --fundo-fora: #DCD5C6;
  --superficie: #FFFFFF;
  --barra-fundo: #F4F0E8;
  --fundo-campo: #FBF9F5;
  --texto: #1B1F14;
  --texto-2: #5F6455;
  --borda: rgba(35, 46, 16, 0.14);
  --realce: rgba(35, 46, 16, 0.07);
  --sombra: 0 1px 1.5px rgba(27, 31, 20, 0.13);

  --cab-fundo: #232E10;
  --cab-texto: #F3EBDD;

  --balao-meu: #E2E8CC;
  --balao-outro: #FFFFFF;
  --balao-maestro: #FCF7EE;
  --borda-maestro: rgba(168, 119, 58, 0.45);
  --citacao-fundo: rgba(35, 46, 16, 0.06);
  --doc-fundo: rgba(35, 46, 16, 0.06);
  --separador-fundo: #FBF8F2;

  --acento: #232E10;
  --acento-texto: #DAC2A2;
  --acento-vivo: #5B6B2F;
  --link: #22609E;
  --mencao: #8A5E14;
  --mencao-eu-fundo: rgba(218, 194, 162, 0.55);
  --selo-fundo: rgba(218, 194, 162, 0.5);
  --selo-texto: #5A4220;
  --perigo: #B3261E;
  --faixa-fundo: #F5EBDA;
  --alerta-fundo: #FCE5CF;
  --alerta-texto: #6E3700;
  --aviso-fundo: #FFF4D9;
  --aviso-texto: #5C4A1E;
  --foco: #A8773A;
  --toast-fundo: rgba(27, 31, 20, 0.94);
  --toast-texto: #FFFFFF;

  --c0: #B5523B; --c1: #2E7D5B; --c2: #8E4BA8; --c3: #2A6FA8;
  --c4: #9A6210; --c5: #C2416B; --c6: #4F7A1F; --c7: #6B5BD1;

  --fonte: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif,
    "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji";
  --fonte-emoji: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Segoe UI Symbol", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --fundo: #0F130B;
    --fundo-desenho: rgba(218, 194, 162, 0.035);
    --fundo-fora: #080A06;
    --superficie: #1B2113;
    --barra-fundo: #151A0F;
    --fundo-campo: #12160D;
    --texto: #ECE6DA;
    --texto-2: #A9A493;
    --borda: rgba(218, 194, 162, 0.16);
    --realce: rgba(218, 194, 162, 0.09);
    --sombra: 0 1px 1.5px rgba(0, 0, 0, 0.4);

    --cab-fundo: #161D0B;

    --balao-meu: #2E3B16;
    --balao-outro: #1E2517;
    --balao-maestro: #252414;
    --borda-maestro: rgba(218, 194, 162, 0.35);
    --citacao-fundo: rgba(0, 0, 0, 0.22);
    --doc-fundo: rgba(0, 0, 0, 0.22);
    --separador-fundo: #1E2517;

    --acento: #DAC2A2;
    --acento-texto: #232E10;
    --acento-vivo: #DAC2A2;
    --link: #8DBDF2;
    --mencao: #E8CD9C;
    --mencao-eu-fundo: rgba(218, 194, 162, 0.25);
    --selo-fundo: rgba(218, 194, 162, 0.2);
    --selo-texto: #E8D3AE;
    --perigo: #F2867D;
    --faixa-fundo: #262414;
    --alerta-fundo: #3A2A12;
    --alerta-texto: #F3D4A8;
    --aviso-fundo: #2A2717;
    --aviso-texto: #E8D9B4;
    --foco: #DAC2A2;
    --toast-fundo: rgba(236, 230, 218, 0.96);
    --toast-texto: #1B1F14;

    --c0: #F29A84; --c1: #72D3A6; --c2: #CD9BE3; --c3: #84BCEF;
    --c4: #E8B565; --c5: #F28FB2; --c6: #A9D56D; --c7: #ADA1F6;
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--fundo-fora); }
body {
  font-family: var(--fonte);
  font-size: 17px;
  line-height: 1.4;
  color: var(--texto);
  background: var(--fundo-fora);
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
}
button, input, textarea { font-family: inherit; }
button { -webkit-user-select: none; user-select: none; touch-action: manipulation; }
:focus-visible { outline: 3px solid var(--foco); outline-offset: 2px; }
.ic { width: 24px; height: 24px; flex: none; display: block; }
.noscript { padding: 24px; text-align: center; }

/* ---------- Botões ---------- */
.botao {
  min-height: 48px; padding: 0 22px; border-radius: 999px; border: 0; cursor: pointer;
  font-size: 17px; font-weight: 600; line-height: 1.2; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.botao.principal { background: var(--acento); color: var(--acento-texto); }
.botao.perigo { background: var(--perigo); color: #fff; }
.botao.discreto { background: transparent; color: var(--texto-2); text-decoration: underline; text-underline-offset: 3px; font-weight: 500; }
.botao.grande { min-height: 56px; font-size: 18px; width: 100%; max-width: 360px; }
.botao.pequeno { min-height: 36px; padding: 0 14px; font-size: 15px; }
.botao:active { transform: scale(0.98); }
.botao-icone {
  width: 44px; height: 44px; border-radius: 50%; border: 0; background: transparent; color: var(--texto-2);
  display: grid; place-items: center; cursor: pointer; flex: none; padding: 0;
}
.botao-icone:hover { background: var(--realce); }
.botao-icone.pequeno { width: 36px; height: 36px; }
.botao-icone.pequeno .ic { width: 20px; height: 20px; }
.botao-icone.perigo { color: var(--perigo); }
button.link { background: none; border: 0; padding: 0; color: var(--link); text-decoration: underline; font: inherit; cursor: pointer; }

/* ---------- Telas de entrada (convite, instalação, avisos) ---------- */
.tela {
  min-height: 100vh; min-height: 100dvh;
  padding: calc(28px + env(safe-area-inset-top)) 20px calc(28px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center;
  background: #232E10; color: #F3EBDD;
}
.tela > * { max-width: 460px; width: 100%; }
.tela-centro { justify-content: center; }
.tela h1 { font-size: 26px; line-height: 1.2; margin: 4px 0 0; color: #DAC2A2; font-weight: 700; }
.tela p { margin: 0; }
.tela .texto-grande { font-size: 19px; }
.tela .marca { font-size: 14px; letter-spacing: 0.28em; text-transform: uppercase; color: #DAC2A2; font-weight: 600; }
.tela .botao.principal { background: #DAC2A2; color: #232E10; }
.tela .botao.discreto { color: #DAC2A2; }
.tela .seguranca {
  font-size: 14.5px; line-height: 1.45; color: #E9DFCB;
  border: 1px solid rgba(218, 194, 162, 0.35); border-radius: 14px; padding: 10px 14px;
}
.logo-app { width: auto; max-width: none !important; border-radius: 24px; box-shadow: 0 6px 22px rgba(0, 0, 0, 0.35); }
.logo-app.grande { width: 96px; height: 96px; }
.logo-app.medio { width: 72px; height: 72px; border-radius: 18px; }
.passos { list-style: none; margin: 4px 0; padding: 0; display: flex; flex-direction: column; gap: 10px; text-align: left; }
.passos li {
  display: flex; gap: 12px; align-items: flex-start; background: rgba(255, 255, 255, 0.07);
  border-radius: 14px; padding: 12px 14px; font-size: 17px; line-height: 1.45;
}
.passos b { color: #FFFFFF; }
.passo-num {
  flex: none; width: 30px; height: 30px; border-radius: 50%; background: #DAC2A2; color: #232E10;
  font-weight: 700; display: grid; place-items: center; font-size: 16px;
}
.ic-inline { display: inline-block; width: 20px; height: 20px; vertical-align: -4px; color: #8DBDF2; }
.mini-icone { width: 22px; height: 22px; border-radius: 5px; vertical-align: -5px; }

/* Setinha que aponta o botão do Safari */
.seta-instalar {
  position: fixed; z-index: 30; width: 140px; display: flex; flex-direction: column; align-items: center; gap: 2px;
  pointer-events: none; animation: quicar 1.1s ease-in-out infinite;
}
.seta-instalar.embaixo-meio { left: 50%; margin-left: -70px; bottom: calc(6px + env(safe-area-inset-bottom)); }
.seta-instalar.embaixo-direita { right: 4px; bottom: calc(6px + env(safe-area-inset-bottom)); }
.seta-instalar.no-alto { right: 60px; top: calc(4px + env(safe-area-inset-top)); flex-direction: column-reverse; animation-name: quicar-cima; }
.seta-rotulo {
  background: #DAC2A2; color: #232E10; font-weight: 700; font-size: 15px; padding: 6px 14px; border-radius: 999px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}
.seta-ponta { width: 0; height: 0; border-left: 18px solid transparent; border-right: 18px solid transparent; border-top: 24px solid #DAC2A2; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.3)); }
.no-alto .seta-ponta { border-top: 0; border-bottom: 24px solid #DAC2A2; }
.embaixo-direita .seta-ponta { margin-left: 70px; }
@keyframes quicar { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes quicar-cima { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(12px); } }
.tela-instalar { padding-bottom: calc(96px + env(safe-area-inset-bottom)); gap: 10px; padding-top: calc(18px + env(safe-area-inset-top)); }
.tela-instalar h1 { font-size: 24px; }
.tela-instalar .texto-grande { font-size: 18px; }
.tela-instalar .passos li { font-size: 16px; padding: 10px 12px; }

/* ---------- Sala ---------- */
.sala {
  position: fixed; left: 0; right: 0; top: var(--topo, 0px);
  height: var(--altura, 100dvh);
  max-width: 1000px; margin: 0 auto;
  display: flex; flex-direction: column;
  background: var(--mesa);
}
@media (min-width: 1001px) { .sala { box-shadow: 0 0 0 1px var(--borda), 0 0 40px rgba(0, 0, 0, 0.12); } }

.cabecalho {
  display: flex; align-items: center; gap: 10px; flex: none;
  min-height: calc(60px + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) max(6px, env(safe-area-inset-right)) 0 max(12px, env(safe-area-inset-left));
  background: var(--cab-fundo); color: var(--cab-texto);
}
.cab-avatar { width: 40px; height: 40px; border-radius: 50%; flex: none; }
.cab-titulo {
  flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 1px;
  background: none; border: 0; color: inherit; text-align: left; padding: 6px 0; cursor: pointer;
}
.cab-nome { font-size: 18px; font-weight: 700; color: var(--cab-texto); }
.cab-sub { font-size: 13.5px; color: #DAC2A2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.cab-sub.ativo { font-style: italic; }
.cab-menu { color: var(--cab-texto); }
.cab-menu:hover { background: rgba(255, 255, 255, 0.1); }

.faixa { display: flex; align-items: center; gap: 10px; padding: 8px max(10px, env(safe-area-inset-right)) 8px max(12px, env(safe-area-inset-left)); font-size: 15px; flex: none; }
.faixa .ic { width: 22px; height: 22px; }
.faixa-texto { flex: 1; min-width: 0; }
.faixa-dourada { background: var(--faixa-fundo); color: var(--texto); border-bottom: 1px solid var(--borda); }
.faixa-dourada > .ic { color: var(--dourado-forte); }
.faixa-alerta { background: var(--alerta-fundo); color: var(--alerta-texto); font-weight: 600; justify-content: center; }

.lista-area { flex: 1; min-height: 0; position: relative; }
.lista {
  position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 6px max(10px, env(safe-area-inset-right)) 14px max(10px, env(safe-area-inset-left));
  background-color: var(--mesa);
  background-image:
    radial-gradient(var(--mesa-desenho) 1.2px, transparent 1.3px),
    radial-gradient(var(--mesa-desenho) 1.2px, transparent 1.3px);
  background-size: 26px 26px; background-position: 0 0, 13px 13px;
}
.lista-topo { text-align: center; font-size: 14px; color: var(--mesa-texto); padding: 8px 0 2px; min-height: 26px; }
.inicio-conversa {
  display: inline-block; background: var(--aviso-fundo); color: var(--aviso-texto);
  padding: 7px 12px; border-radius: 10px; font-size: 13.5px; max-width: 360px; box-shadow: var(--sombra);
}
.cartao-vazio {
  display: inline-block; margin-top: 30vh; background: var(--superficie); border-radius: 14px; padding: 14px 20px;
  box-shadow: var(--sombra); color: var(--texto); font-size: 16px;
}
.cartao-vazio p { margin: 2px 0; }

.separador { display: flex; justify-content: center; margin: 14px 0 6px; pointer-events: none; }
.separador span {
  background: var(--separador-fundo); color: var(--texto-2); font-size: 13px; font-weight: 600;
  padding: 5px 12px; border-radius: 8px; box-shadow: var(--sombra);
}
.separador span::first-letter { text-transform: uppercase; }

/* Balões */
.msg { display: flex; align-items: flex-start; gap: 6px; margin-top: 8px; }
.msg.continua { margin-top: 2px; }
.msg.minha { justify-content: flex-end; }
.msg .avatar { width: 32px; height: 32px; border-radius: 50%; flex: none; margin-top: 1px; }
.msg.continua .avatar { visibility: hidden; height: 1px; }
.balao {
  position: relative; max-width: min(80%, 560px); min-width: 72px;
  padding: 6px 9px 7px; border-radius: 12px;
  background: var(--balao-outro); box-shadow: var(--sombra);
  overflow-wrap: anywhere; word-break: break-word;
}
.msg:not(.minha) .balao { border-top-left-radius: 4px; }
.msg.minha .balao { background: var(--balao-meu); border-top-right-radius: 4px; }
.msg.continua .balao { border-radius: 12px; }
.msg.maestro .balao { background: var(--balao-maestro); border: 1px solid var(--borda-maestro); }
.autor { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; margin-bottom: 2px; line-height: 1.3; }
.msg.continua .autor { display: none; }
.selo {
  font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; letter-spacing: 0.02em;
  background: var(--selo-fundo); color: var(--selo-texto);
}
.texto { white-space: pre-wrap; font-size: 16.5px; line-height: 1.42; }
.texto.so-emoji { font-size: 40px; line-height: 1.15; font-family: var(--fonte-emoji); }
.texto.apagada { font-style: italic; color: var(--texto-2); }
.texto a { color: var(--link); text-decoration: underline; text-underline-offset: 2px; }
.espaco-hora { display: inline-block; width: 50px; height: 1px; }
.hora { position: absolute; right: 9px; bottom: 4px; font-size: 11.5px; color: var(--texto-2); line-height: 1; display: inline-flex; align-items: center; }
.ic-hora { width: 14px; height: 14px; }
.balao.so-midia { padding-bottom: 20px; }
.mencao { color: var(--mencao); font-weight: 700; }
.mencao-eu { background: var(--mencao-eu-fundo); border-radius: 4px; padding: 0 2px; }
.msg.destaque .balao { animation: destacar 1.6s ease; }
@keyframes destacar { 0%, 40% { box-shadow: 0 0 0 4px var(--dourado); } 100% { box-shadow: var(--sombra); } }

.nome.cor-0, .cor-0 { color: var(--c0); } .nome.cor-1, .cor-1 { color: var(--c1); }
.nome.cor-2, .cor-2 { color: var(--c2); } .nome.cor-3, .cor-3 { color: var(--c3); }
.nome.cor-4, .cor-4 { color: var(--c4); } .nome.cor-5, .cor-5 { color: var(--c5); }
.nome.cor-6, .cor-6 { color: var(--c6); } .nome.cor-7, .cor-7 { color: var(--c7); }

/* Citação (resposta a uma mensagem) */
.citacao {
  display: flex; flex-direction: column; align-items: flex-start; gap: 1px; width: 100%;
  text-align: left; border: 0; border-left: 4px solid var(--dourado-forte); border-radius: 6px;
  background: var(--citacao-fundo); color: inherit; padding: 5px 8px; margin: 2px 0 4px; cursor: pointer; font-size: 14px;
}
.citacao .nome { font-weight: 700; font-size: 13.5px; }
.citacao .trecho {
  color: var(--texto-2); display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  overflow-wrap: anywhere;
}

/* Mídia */
.midia-imagem {
  display: block; padding: 0; border: 0; background: none; margin: 2px -5px 4px; border-radius: 8px; overflow: hidden; cursor: zoom-in;
}
.midia-imagem img {
  display: block; height: 220px; width: auto; min-width: 140px; max-width: min(300px, 66vw);
  object-fit: cover; background: var(--realce);
}
.midia-video { display: block; height: 220px; width: auto; max-width: min(300px, 66vw); border-radius: 8px; background: #000; margin: 2px -5px 4px; }
.midia-audio { display: flex; align-items: center; gap: 8px; width: min(290px, 64vw); padding: 2px 0; }
.audio-icone { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--realce); color: var(--dourado-forte); flex: none; }
.audio-icone .ic { width: 20px; height: 20px; }
.audio-tocar {
  width: 44px; height: 44px; border-radius: 50%; border: 0; display: grid; place-items: center; flex: none; cursor: pointer;
  background: var(--acento); color: var(--acento-texto);
}
.audio-meio { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.audio-barra { width: 100%; accent-color: var(--acento-vivo); margin: 6px 0 0; height: 20px; }
.audio-rodape { display: flex; justify-content: space-between; align-items: center; }
.audio-tempo { font-size: 12.5px; color: var(--texto-2); font-variant-numeric: tabular-nums; }
.audio-vel {
  border: 0; background: var(--realce); color: var(--texto-2); font-size: 12px; font-weight: 700;
  border-radius: 999px; padding: 2px 8px; cursor: pointer; margin-right: 34px;
}
.midia-doc {
  display: flex; align-items: center; gap: 10px; padding: 10px; margin: 2px -3px 4px; border-radius: 10px;
  background: var(--doc-fundo); color: inherit; text-decoration: none; width: min(300px, 64vw);
}
.doc-icone { position: relative; color: var(--dourado-forte); flex: none; width: 40px; height: 44px; display: grid; place-items: center; }
.doc-icone .ic { width: 40px; height: 40px; }
.doc-ext {
  position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); font-size: 9.5px; font-weight: 800;
  background: var(--acento); color: var(--acento-texto); border-radius: 3px; padding: 0 3px; line-height: 1.4; white-space: nowrap;
}
.doc-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.doc-nome { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc-tam { font-size: 12.5px; color: var(--texto-2); }
.doc-baixar { color: var(--texto-2); }

/* Enviando / não enviado */
.msg.pendente .balao { opacity: 0.9; }
.msg.falhou .balao { box-shadow: 0 0 0 1.5px var(--perigo); }
.pendente-status { font-size: 13.5px; color: var(--perigo); margin-top: 4px; padding-right: 30px; }
.midia-local { display: flex; flex-direction: column; gap: 6px; min-width: 200px; padding: 4px 0 6px; }
.midia-local-nome { font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
.progresso { height: 6px; background: var(--borda); border-radius: 3px; overflow: hidden; }
.progresso-barra { display: block; height: 100%; width: 0; background: var(--acento-vivo); transition: width 0.2s; }

/* Maestro digitando */
.pontinhos { display: inline-flex; gap: 4px; padding: 6px 2px 4px; }
.pontinhos i { width: 8px; height: 8px; border-radius: 50%; background: var(--texto-2); animation: pulinho 1.2s infinite ease-in-out; }
.pontinhos i:nth-child(2) { animation-delay: 0.15s; }
.pontinhos i:nth-child(3) { animation-delay: 0.3s; }
@keyframes pulinho { 0%, 60%, 100% { transform: translateY(0); opacity: 0.45; } 30% { transform: translateY(-5px); opacity: 1; } }
.msg.digitando { margin-top: 10px; }
.msg.digitando .balao { min-width: 0; }

.botao-descer {
  position: absolute; right: max(14px, env(safe-area-inset-right)); bottom: 14px; width: 46px; height: 46px; border-radius: 50%;
  border: 0; background: var(--superficie); color: var(--texto-2); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
  display: grid; place-items: center; cursor: pointer; z-index: 3;
}
.botao-descer .contador {
  position: absolute; top: -6px; left: -6px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px;
  background: var(--acento); color: var(--acento-texto); font-size: 12px; font-weight: 700; display: grid; place-items: center;
}

/* ---------- Caixa de escrever ---------- */
.escrever {
  position: relative; flex: none; background: var(--barra-fundo); border-top: 1px solid var(--borda);
  padding: 6px max(8px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
}
html.teclado-aberto .escrever { padding-bottom: 8px; }
.linha-escrever { display: flex; align-items: flex-end; gap: 6px; }
.pilula {
  flex: 1; min-width: 0; display: flex; align-items: flex-end; min-height: 48px; padding: 0 2px;
  background: var(--superficie); border: 1px solid var(--borda); border-radius: 24px; box-shadow: var(--sombra);
}
.pilula .botao-icone { margin-bottom: 1px; }
.pilula textarea {
  flex: 1; min-width: 0; border: 0; outline: none; resize: none; background: transparent; color: var(--texto);
  font-size: 17px; line-height: 22px; padding: 12px 2px; max-height: 160px; overflow-y: hidden;
}
.pilula textarea::placeholder { color: var(--texto-2); opacity: 0.85; }
.botao-acao {
  width: 48px; height: 48px; border-radius: 50%; border: 0; flex: none; cursor: pointer; display: grid; place-items: center;
  background: var(--acento); color: var(--acento-texto); box-shadow: var(--sombra);
}
.botao-acao:disabled { opacity: 0.55; cursor: default; }
.botao-acao:active:not(:disabled) { transform: scale(0.95); }
.contador-texto { font-size: 12.5px; color: var(--texto-2); text-align: right; padding: 0 64px 4px 0; }

.previa-resposta {
  display: flex; align-items: center; gap: 4px; margin-bottom: 6px; padding: 6px; border-radius: 14px;
  background: var(--superficie); border: 1px solid var(--borda);
}
.previa-resposta .citacao { flex: 1; min-width: 0; margin: 0; cursor: default; }

.lista-mencoes {
  position: absolute; left: 8px; right: 8px; bottom: 100%; margin-bottom: 4px; z-index: 6; padding: 4px;
  background: var(--superficie); border: 1px solid var(--borda); border-radius: 14px; box-shadow: 0 6px 22px rgba(0, 0, 0, 0.2);
  max-height: 300px; overflow-y: auto; max-width: 420px;
}
.mencao-item {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 50px; padding: 6px 10px; border: 0; border-radius: 10px;
  background: transparent; color: inherit; font-size: 16.5px; text-align: left; cursor: pointer;
}
.mencao-item.ativo, .mencao-item:hover { background: var(--realce); }
.pessoa-avatar { width: 38px; height: 38px; border-radius: 50%; flex: none; object-fit: cover; }
.pessoa-avatar.inicial { display: grid; place-items: center; font-weight: 700; font-size: 17px; color: #fff !important; }
.inicial.cor-0 { background: var(--c0); } .inicial.cor-1 { background: var(--c1); } .inicial.cor-2 { background: var(--c2); }
.inicial.cor-3 { background: var(--c3); } .inicial.cor-4 { background: var(--c4); } .inicial.cor-5 { background: var(--c5); }
.inicial.cor-6 { background: var(--c6); } .inicial.cor-7 { background: var(--c7); }
@media (prefers-color-scheme: dark) { .pessoa-avatar.inicial { color: #12160D !important; } }
.pessoa-nome { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.gravando { display: flex; align-items: center; gap: 6px; min-height: 48px; }
.gravando-meio {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 16px;
  background: var(--superficie); border: 1px solid var(--borda); border-radius: 24px;
}
.gravando-ponto { width: 12px; height: 12px; border-radius: 50%; background: #E0245E; flex: none; animation: piscar 1s infinite; }
.gravando-tempo { font-weight: 700; font-variant-numeric: tabular-nums; }
.gravando-rotulo { font-size: 14px; color: var(--texto-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@keyframes piscar { 50% { opacity: 0.25; } }

/* Seletor de emoji */
.seletor-emoji {
  display: flex; flex-direction: column; height: 290px; margin-top: 6px; overflow: hidden;
  background: var(--superficie); border: 1px solid var(--borda); border-radius: 14px;
}
@media (min-width: 700px) and (pointer: fine) { .seletor-emoji { height: 340px; } }
.emoji-topo { border-bottom: 1px solid var(--borda); }
.emoji-abas { display: flex; overflow-x: auto; scrollbar-width: none; }
.emoji-aba {
  flex: 1 0 42px; height: 42px; border: 0; background: none; cursor: pointer; font-size: 21px; font-family: var(--fonte-emoji);
  border-radius: 8px;
}
.emoji-aba:hover { background: var(--realce); }
.emoji-grade { flex: 1; overflow-y: auto; padding: 0 6px 6px; position: relative; overscroll-behavior: contain; }
.emoji-secao {
  position: sticky; top: 0; z-index: 1; background: var(--superficie); font-size: 13px; font-weight: 700; color: var(--texto-2);
  padding: 8px 4px 4px;
}
.emoji-lista { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); }
.emoji {
  height: 44px; border: 0; background: none; cursor: pointer; border-radius: 8px; padding: 0;
  font-size: 27px; line-height: 1; font-family: var(--fonte-emoji);
}
.emoji:hover, .emoji:focus-visible { background: var(--realce); }
.emoji-vazio { font-size: 14px; color: var(--texto-2); margin: 4px 4px 8px; }
.emoji-rodape { display: flex; align-items: center; justify-content: space-between; gap: 4px; border-top: 1px solid var(--borda); padding: 2px 6px; }
.emoji-tons { display: flex; gap: 2px; }
.emoji-tom {
  width: 38px; height: 38px; border-radius: 50%; border: 2px solid transparent; background: none; cursor: pointer;
  font-size: 20px; font-family: var(--fonte-emoji); padding: 0;
}
.emoji-tom.ativo { border-color: var(--dourado-forte); }
.emoji-apagar { width: 44px; height: 38px; border: 0; background: none; color: var(--texto-2); display: grid; place-items: center; cursor: pointer; border-radius: 8px; }

/* ---------- Menus, janelas, avisos rápidos ---------- */
.menu-fundo { position: fixed; inset: 0; z-index: 40; }
.menu-flutuante {
  position: fixed; z-index: 41; min-width: 230px; max-width: calc(100vw - 16px); padding: 6px;
  background: var(--superficie); color: var(--texto); border-radius: 14px; box-shadow: 0 10px 32px rgba(0, 0, 0, 0.28);
  border: 1px solid var(--borda); animation: aparecer 0.12s ease-out;
}
.menu-flutuante > button, .menu-flutuante > a {
  display: flex; align-items: center; gap: 14px; width: 100%; min-height: 50px; padding: 8px 14px; border: 0; border-radius: 10px;
  background: none; color: inherit; font-size: 16.5px; text-align: left; text-decoration: none; cursor: pointer;
}
.menu-flutuante > button:hover, .menu-flutuante > a:hover { background: var(--realce); }
.menu-flutuante .ic { color: var(--texto-2); width: 22px; height: 22px; }
.clipe-bola { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.clipe-bola .ic { color: #fff !important; }
.bola-doc { background: #5B6B2F; } .bola-foto { background: #A8773A; } .bola-audio { background: #B5523B; }
.menu-clipe > button { min-height: 58px; }

.modal-fundo {
  position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px;
  background: rgba(10, 14, 6, 0.6); animation: aparecer 0.15s ease-out;
}
.modal-fundo.saindo { opacity: 0; transition: opacity 0.18s; }
.modal {
  width: min(440px, 100%); max-height: calc(100dvh - 32px); overflow-y: auto;
  background: var(--superficie); color: var(--texto); border-radius: 20px; padding: 22px 20px 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}
.modal-titulo { font-size: 21px; margin: 0 0 10px; line-height: 1.25; }
.modal-texto { font-size: 17px; line-height: 1.5; margin: 0 0 10px; }
.modal-aviso { font-size: 14px; color: var(--perigo); margin: 8px 0 0; }
.modal-botoes { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; margin-top: 16px; }
.modal-botoes .botao { min-width: 112px; }
.modal-botoes .botao.discreto { background: var(--realce); color: var(--texto); text-decoration: none; }
.aviso-maestro { display: flex; gap: 14px; align-items: flex-start; }
.aviso-maestro-avatar { width: 60px; height: 60px; border-radius: 50%; flex: none; }
.lista-pessoas { list-style: none; margin: 0; padding: 0; }
.lista-pessoas li { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--borda); }
.lista-pessoas li:last-child { border-bottom: 0; }
.modal-envio { width: min(560px, 100%); }
.previa-arquivos { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; margin-bottom: 12px; }
.previa-item { display: flex; flex-direction: column; gap: 3px; background: var(--realce); border-radius: 12px; padding: 8px; font-size: 13px; overflow: hidden; }
.previa-item img { width: 100%; height: 100px; object-fit: cover; border-radius: 8px; }
.previa-icone { height: 100px; display: grid; place-items: center; color: var(--texto-2); }
.previa-icone .ic { width: 44px; height: 44px; }
.previa-nome { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.previa-tam { color: var(--texto-2); }
.legenda {
  width: 100%; font-size: 17px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--borda);
  background: var(--fundo-campo); color: var(--texto); resize: vertical; min-height: 52px;
}

.toasts {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(96px + env(safe-area-inset-bottom)); z-index: 80;
  display: flex; flex-direction: column; gap: 8px; width: min(420px, calc(100% - 32px)); pointer-events: none;
}
.toast {
  background: var(--toast-fundo); color: var(--toast-texto); padding: 12px 16px; border-radius: 14px; font-size: 15.5px;
  text-align: center; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25); animation: subir 0.2s ease-out;
}
.toast.saindo { opacity: 0; transition: opacity 0.3s; }
@keyframes subir { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes aparecer { from { opacity: 0; } to { opacity: 1; } }

/* Foto em tela cheia */
.foto-cheia {
  position: fixed; inset: 0; z-index: 70; background: rgba(0, 0, 0, 0.94);
  display: flex; align-items: center; justify-content: center;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
.foto-cheia img { max-width: 100%; max-height: 100%; object-fit: contain; }
.foto-barra { position: absolute; top: env(safe-area-inset-top); right: env(safe-area-inset-right); display: flex; gap: 10px; padding: 12px; z-index: 1; }
.botao-redondo {
  width: 48px; height: 48px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer;
  background: rgba(255, 255, 255, 0.16); color: #fff; text-decoration: none;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* ---------- Assinatura "Feito por HARMONY" (mesmo formato do Painel dos donos) ---------- */
.rodape { text-align: center; font-size: 12.5px; letter-spacing: 0.06em; color: var(--texto-2); margin: 0; }
.rodape b { color: var(--dourado-forte); letter-spacing: 0.14em; font-weight: 700; }
@media (prefers-color-scheme: dark) { .rodape b { color: #DAC2A2; } }
.tela .rodape { color: rgba(243, 235, 221, 0.6); margin-top: auto; padding-top: 10px; }
.tela .rodape b { color: #DAC2A2; }
.rodape-modal { margin-top: 14px; }
.rodape-menu { padding: 10px 14px 4px; margin-top: 4px; border-top: 1px solid var(--borda); font-size: 11.5px; }

/* ---------- Vídeo de abertura ---------- */
.apresentacao {
  position: fixed; inset: 0; z-index: 90; background: #232E10;
  display: flex; align-items: center; justify-content: center; animation: aparecer 0.2s ease-out;
}
.apresentacao.saindo { opacity: 0; transition: opacity 0.25s; }
.apresentacao-video { width: 100%; height: 100%; object-fit: contain; background: #232E10; }
.apresentacao-pular {
  position: absolute; top: calc(14px + env(safe-area-inset-top)); right: calc(14px + env(safe-area-inset-right));
  min-height: 48px; padding: 0 20px; border-radius: 999px; border: 1px solid rgba(218, 194, 162, 0.6); cursor: pointer;
  background: rgba(35, 46, 16, 0.75); color: #F3EBDD; font-size: 17px; font-weight: 700;
}
.apresentacao-embaixo {
  position: absolute; left: 0; right: 0; bottom: calc(24px + env(safe-area-inset-bottom));
  display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; padding: 0 16px;
}
.apresentacao-botao {
  min-height: 56px; padding: 0 28px; border-radius: 999px; border: 0; cursor: pointer;
  background: #DAC2A2; color: #232E10; font-size: 18px; font-weight: 700; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}
.apresentacao-botao.secundario { background: rgba(35, 46, 16, 0.8); color: #F3EBDD; border: 1px solid rgba(218, 194, 162, 0.6); }

/* ---------- Responder visível e modo conversa com a Ária ---------- */
.coluna { display: flex; flex-direction: column; align-items: flex-start; max-width: min(80%, 560px); min-width: 0; }
.coluna .balao { max-width: 100%; }
.botao-responder {
  min-height: 40px; padding: 0 12px; margin-top: 2px; border: 0; border-radius: 999px; cursor: pointer;
  background: transparent; color: var(--texto-2); font-size: 14px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 6px;
}
.botao-responder .ic { width: 18px; height: 18px; }
.botao-responder:hover, .botao-responder:focus-visible { background: var(--realce); color: var(--texto); }
.faixa-conversa {
  margin-bottom: 6px; padding: 6px 6px 6px 10px; border-radius: 14px;
  background: var(--balao-maestro); border: 1px solid var(--borda-maestro);
}
.faixa-conversa-topo { display: flex; align-items: center; gap: 8px; }
.faixa-conversa-avatar { width: 26px; height: 26px; border-radius: 50%; flex: none; }
.faixa-conversa-texto { flex: 1; min-width: 0; font-weight: 700; font-size: 15px; }
.botao-voltar-grupo {
  min-height: 40px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--borda); cursor: pointer;
  background: var(--superficie); color: var(--texto); font-size: 14px; font-weight: 600; white-space: nowrap;
}
.citacao.compacta { margin: 4px 0 0; cursor: default; padding: 3px 8px; }
.citacao.compacta .trecho { -webkit-line-clamp: 1; line-clamp: 1; }
/* botões de escolha da Ária (02/10) */
.botoes-aria { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 2px; }
.botao-aria {
  min-height: 40px; padding: 0 14px; border-radius: 999px; cursor: pointer; font-size: 15px; font-weight: 600;
  background: var(--superficie); color: var(--texto); border: 1px solid var(--borda-maestro);
}
.botao-aria:hover, .botao-aria:focus-visible { background: var(--realce); }
.botao-aria:disabled { opacity: .55; cursor: default; }

/* ---------- Botão fixo "Falar com a Ária" e a caixa no modo conversa (02/10) ---------- */
.linha-atalhos { display: flex; margin: 0 0 6px; }
.botao-falar-aria {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px 0 6px; border-radius: 999px; cursor: pointer;
  background: var(--balao-maestro); color: var(--texto); border: 1px solid var(--borda-maestro); box-shadow: var(--sombra);
  font-size: 16px; font-weight: 700;
}
.botao-falar-aria:hover, .botao-falar-aria:focus-visible { background: var(--realce); }
.botao-falar-aria:active { transform: scale(0.98); }
.falar-aria-foto { width: 32px; height: 32px; border-radius: 50%; flex: none; object-fit: cover; }
.escrever-foto-aria {
  width: 44px; height: 44px; border-radius: 50%; flex: none; object-fit: cover; align-self: flex-end; margin-bottom: 2px;
  border: 2px solid var(--dourado); box-shadow: var(--sombra);
}
.escrever.com-aria .pilula { border-color: var(--borda-maestro); box-shadow: 0 0 0 2px rgba(218, 194, 162, 0.35); }
.escrever.com-aria .faixa-conversa-texto { font-size: 16px; }

/* ---------- Quem está na sala: situação de cada pessoa ---------- */
.pessoa-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.pessoa-info .pessoa-nome { flex: none; }
.pessoa-situacao { font-size: 14px; color: var(--texto-2); }
.situ-desconectado, .situ-pendente { font-style: italic; }
.lista-pessoas .botao.pequeno { flex: none; }

/* ---------- Legenda ---------- */
.modal-legenda { width: min(560px, 100%); }
.legenda-lista { margin: 0; }
.legenda-lista dt { font-weight: 700; font-size: 17px; margin-top: 12px; color: var(--texto); }
.legenda-lista dt:first-child { margin-top: 0; }
.legenda-lista dd { margin: 2px 0 0; font-size: 16px; line-height: 1.45; color: var(--texto-2); }

/* ---------- "Você saiu da conversa" ---------- */
.tela .botao.perigo { background: #B3261E; color: #FFFFFF; }
.tela-fora > .botao.discreto { font-size: 15px; margin-top: 22px; opacity: 0.85; min-height: 44px; }
.fora-confirmar {
  margin-top: 18px; padding: 16px; border-radius: 16px; text-align: left;
  border: 1px solid rgba(218, 194, 162, 0.45); background: rgba(255, 255, 255, 0.06);
}
.fora-confirmar-texto { font-size: 17px; line-height: 1.45; }
.fora-confirmar-botoes { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; margin-top: 14px; }
.fora-cancelar { background: rgba(255, 255, 255, 0.12); color: #F3EBDD; }
