:root {
  --roxo: #7c5cff; --roxo-escuro: #4b2fb8; --rosa: #ff6fb5; --amarelo: #ffd23f;
  --verde: #2fbf71; --vermelho: #ef4d5f; --fundo: #fff6fc; --cartao: #ffffff;
  --texto: #2d2150; --suave: #8b80a8; --raio: 22px;
  --sombra: 0 6px 20px rgba(76, 47, 184, .12);
  font-family: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, sans-serif;
  color: var(--texto);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--fundo); min-height: 100vh; -webkit-tap-highlight-color: transparent; }
main { padding: 16px max(16px, env(safe-area-inset-left)) 32px; max-width: 1200px; margin: 0 auto; }
h1 { font-size: 2rem; margin: .2em 0; } h2 { margin: .3em 0; }
button { font: inherit; cursor: pointer; border: none; border-radius: 999px; color: #fff; background: var(--roxo);
         padding: 12px 22px; font-weight: 700; touch-action: manipulation; }
button:disabled { opacity: .45; cursor: default; }
.btn-grande { font-size: 1.3rem; padding: 18px 34px; box-shadow: var(--sombra); }
.btn-secundario { background: #fff; color: var(--roxo); border: 2px solid var(--roxo); }
.btn-mini { padding: 8px 14px; font-size: .95rem; }
.btn-redondo { width: 64px; height: 64px; padding: 0; font-size: 1.8rem; background: #fff; border: 2px solid #e4dcff; }
input, textarea { font: inherit; border: 2px solid #e4dcff; border-radius: 14px; padding: 12px 14px; width: 100%; background: #fff; }
label { display: block; margin: 12px 0; font-weight: 700; }

.abas { display: flex; gap: 6px; justify-content: center; padding: 10px; background: #fff; box-shadow: var(--sombra);
        position: sticky; top: 0; z-index: 5; }
.abas a { text-decoration: none; color: var(--suave); font-weight: 800; font-size: 1.1rem; padding: 10px 18px; border-radius: 999px; }
.abas a.ativa { background: var(--roxo); color: #fff; }
.cabecalho { text-align: center; margin: 12px 0 20px; } .cabecalho p { color: var(--suave); font-size: 1.15rem; }

.grade-temas { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.cartao-tema { background: var(--cartao); color: var(--texto); border-radius: var(--raio); padding: 0; overflow: hidden;
               box-shadow: var(--sombra); text-align: left; position: relative; transition: transform .15s; }
.envoltorio-tema { position: relative; }
.envoltorio-tema .cartao-tema { width: 100%; }
.btn-mais { position: absolute; top: 8px; left: 8px; width: 40px; height: 40px; padding: 0; border-radius: 50%;
            background: rgba(255,255,255,.9); color: var(--texto); font-size: 1.4rem; line-height: 1; box-shadow: var(--sombra); }
.cartao-tema:active { transform: scale(.97); }
.cartao-tema img, .capa-vazia { width: 100%; height: 140px; object-fit: cover; display: block; }
.capa-vazia { display: grid; place-items: center; font-size: 4rem; background: linear-gradient(135deg, #ffe3f3, #e7e0ff); }
.titulo-tema { padding: 12px 14px; font-weight: 800; font-size: 1.05rem; }
.selo { position: absolute; top: 10px; right: 10px; background: var(--amarelo); color: var(--texto); font-size: .8rem;
        padding: 4px 10px; border-radius: 999px; font-weight: 700; }
dialog { border: none; border-radius: var(--raio); padding: 24px; width: min(520px, 92vw); box-shadow: var(--sombra); }
dialog::backdrop { background: rgba(45, 33, 80, .4); }
.linha-botoes { display: flex; justify-content: flex-end; gap: 10px; } .aviso { color: var(--suave); }

.pagina-conversa main { max-width: none; padding-bottom: 0; }
.conversa { display: grid; grid-template-columns: 1fr; gap: 16px; height: calc(100vh - 90px); }
@media (min-width: 900px) { .conversa { grid-template-columns: 5fr 6fr; } }
.painel-visual { background: #fff; border-radius: var(--raio); box-shadow: var(--sombra); padding: 14px; display: flex;
                 flex-direction: column; min-height: 0; }
#imagem-principal { width: 100%; flex: 1; min-height: 200px; object-fit: contain; border-radius: 16px; background: #f4efff; }
.miniaturas { display: flex; gap: 8px; overflow-x: auto; padding-top: 10px; }
.miniaturas img { width: 72px; height: 72px; object-fit: cover; border-radius: 12px; flex: none; }
.painel-conversa { display: flex; flex-direction: column; min-height: 0; background: #fff; border-radius: var(--raio);
                   box-shadow: var(--sombra); padding: 14px; }
.topo-conversa { display: flex; align-items: center; gap: 10px; } .topo-conversa button { margin-left: auto; }
.avatar { width: 48px; height: 48px; border-radius: 50%; background: linear-gradient(135deg, var(--rosa), var(--roxo));
          display: grid; place-items: center; font-size: 1.7rem; transition: transform .2s; }
.avatar.grande { width: 110px; height: 110px; font-size: 4rem; margin: 0 auto 12px; }
.avatar.falando { animation: pulsar 1s infinite; }
@keyframes pulsar { 50% { transform: scale(1.12); box-shadow: 0 0 0 10px rgba(255, 111, 181, .2); } }
.transcricao { flex: 1; overflow-y: auto; padding: 10px 4px; display: flex; flex-direction: column; gap: 10px; }
.balao { max-width: 85%; padding: 12px 16px; border-radius: 20px; font-size: 1.2rem; line-height: 1.45; white-space: pre-wrap; }
.balao.ligia { background: #f1ecff; align-self: flex-start; border-bottom-left-radius: 6px; }
.balao.usuaria { background: var(--roxo); color: #fff; align-self: flex-end; border-bottom-right-radius: 6px; }
.balao.erro { background: #ffe8ea; color: #8a1c2b; align-self: center; text-align: center; }
.balao .btn-ouvir { margin-left: 8px; padding: 2px 10px; vertical-align: middle; }
.balao .pt { color: #0a7d4f; font-style: italic; }
.dica { align-self: flex-end; background: #fff8d6; border: 2px dashed var(--amarelo); border-radius: 14px; padding: 8px 12px; max-width: 85%; }
.palavras { display: flex; flex-wrap: wrap; gap: 6px; align-self: flex-start; }
.chip { background: #e6fff2; color: #11643f; border-radius: 999px; padding: 6px 12px; font-size: .95rem; font-weight: 700; }
.status { min-height: 1.4em; color: var(--suave); text-align: center; margin: 6px 0; }
.form-texto { display: none; gap: 8px; margin-bottom: 8px; } .form-texto.aberto { display: flex; }
.controles { display: flex; align-items: center; justify-content: center; gap: 18px; padding: 6px 0 calc(8px + env(safe-area-inset-bottom)); }
.btn-mic { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 150px; height: 150px; border-radius: 50%;
           font-size: 1rem; background: linear-gradient(135deg, var(--rosa), var(--roxo)); box-shadow: var(--sombra); }
.btn-mic .icone { font-size: 3rem; }
.btn-mic.gravando { background: var(--vermelho); animation: pulsar 1.2s infinite; }
.sobreposicao { position: fixed; inset: 0; background: rgba(45, 33, 80, .55); display: grid; place-items: center; z-index: 20; }
.cartao-inicio, .cartao-login { background: #fff; border-radius: var(--raio); padding: 32px; text-align: center; width: min(440px, 92vw); }
.pagina-login { display: grid; place-items: center; min-height: 100vh; }
.cartao-login input { margin: 12px 0; font-size: 1.3rem; text-align: center; } .erro { color: var(--vermelho); }

.campo-busca { max-width: 420px; }
.lista-glossario { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.item-glossario { background: #fff; border-radius: 18px; padding: 14px 16px; box-shadow: var(--sombra); }
.item-glossario .en { font-size: 1.35rem; font-weight: 800; } .item-glossario .pt { color: var(--roxo-escuro); font-size: 1.1rem; }
.item-glossario .exemplo { color: var(--suave); font-style: italic; margin: 6px 0; }
.item-glossario .rodape { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: .85rem; color: var(--suave); }
.estrelas { letter-spacing: 2px; color: var(--amarelo); }
.vazio { text-align: center; color: var(--suave); font-size: 1.2rem; padding: 40px 0; }

.cartao-treino { background: #fff; border-radius: var(--raio); box-shadow: var(--sombra); padding: 28px; max-width: 640px;
                 margin: 0 auto; text-align: center; display: flex; flex-direction: column; gap: 16px; align-items: center; }
.cartao-treino .grande { font-size: 2.2rem; font-weight: 800; }
.opcoes { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.opcoes button { background: #fff; color: var(--roxo); border: 2px solid var(--roxo); font-size: 1.2rem; }
.resultado.certo { color: var(--verde); font-size: 1.6rem; font-weight: 800; }
.resultado.errado { color: var(--vermelho); font-size: 1.4rem; font-weight: 800; }

.paginas-album { display: flex; flex-direction: column; gap: 24px; }
.pagina-album { background: #fff; border-radius: var(--raio); padding: 18px; box-shadow: var(--sombra); }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
.slot { aspect-ratio: 556 / 626; border-radius: 16px; background: #f4efff; display: grid; place-items: center;
        font-size: 2.4rem; color: #cfc4f5; border: 3px dashed #e1d8ff; }
.slot img { width: 100%; height: 100%; object-fit: contain; }
.slot.cheio { border: none; background: none; }
.slot.rara img { filter: drop-shadow(0 0 10px rgba(255, 210, 63, .9)); animation: brilho 2.5s infinite; }
@keyframes brilho { 50% { filter: drop-shadow(0 0 18px rgba(255, 210, 63, 1)); } }
.pacotinho { font-size: 6rem; animation: tremer .6s infinite; background: none; }
@keyframes tremer { 25% { transform: rotate(-8deg); } 75% { transform: rotate(8deg); } }
.revelacao { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.revelacao img { width: 180px; animation: surgir .6s ease-out both; }
@keyframes surgir { from { transform: scale(.2) rotate(-20deg); opacity: 0; } }
