/* ---------- Redes sociais (src/Redes.php + assets/js/redes.js): WhatsApp (com QR) e Instagram ----------
   Tela de entrar: botões com nome embaixo do título. Jogo no computador: dois ícones redondos no canto esquerdo do
   topo (lado vazio — o logo fica no centro e os botões à direita). Jogo no celular: itens no menu ☰ (celular.css). */
.rede { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; text-decoration: none; color: #fff;
    border-radius: 99px; transition: filter .15s, transform .15s; }
.rede svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.rede:hover { filter: brightness(1.12); transform: translateY(-1px); }
.rede:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 2px; }
.rede-whatsapp { background: linear-gradient(160deg, #2bd46b, #1a9e4f); }
.rede-instagram { background: linear-gradient(45deg, #f6a03a 0%, #e1306c 50%, #8a3ab9 100%); }

/* tela de entrar */
.ap-redes { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .55rem; margin-top: 1rem; }
.ap-redes > small { flex-basis: 100%; font-size: .7rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); text-shadow: 0 1px 3px #000; }
.ap-redes .rede { padding: .5rem 1rem .5rem .8rem; font: 700 .85rem var(--font-body); box-shadow: 0 4px 14px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .25); }

/* jogo (computador): canto esquerdo do topo */
.redes-topo { display: flex; align-items: center; gap: .45rem; }
.redes-topo .rede { width: 32px; height: 32px; box-shadow: 0 2px 8px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .25); opacity: .85; }
.redes-topo .rede:hover { opacity: 1; }
.redes-topo .rede svg { width: 18px; height: 18px; }

/* janela do QR */
.rede-janela { margin: auto; padding: 0; border: 0; background: none; max-width: calc(100vw - 24px); max-height: calc(100dvh - 24px); overflow: visible; }
.rede-janela::backdrop { background: rgba(5, 4, 3, .78); }
.rede-caixa { position: relative; width: 340px; max-width: 100%; max-height: calc(100dvh - 24px); overflow-y: auto; padding: 1.2rem 1.2rem 1rem; text-align: center; color: var(--text);
    background: linear-gradient(170deg, #2a2014 0%, #17120c 60%, #120e0a 100%); border: 1px solid var(--line-strong); border-radius: 14px;
    box-shadow: 0 0 0 4px rgba(212, 169, 55, .12), 0 18px 50px rgba(0, 0, 0, .7); font-family: var(--font-body); }
.rede-caixa h2 { display: flex; align-items: center; justify-content: center; gap: .5rem; margin: 0 1.6rem .4rem; font: 700 1.1rem var(--font-title); color: var(--gold-hi); }
.rede-caixa h2 svg { width: 24px; height: 24px; fill: none; stroke: #2bd46b; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; color: #2bd46b; }
.rede-caixa p { font-size: .88rem; line-height: 1.5; color: var(--muted); margin: 0 0 .8rem; }
.rede-entrar { display: block; padding: .7rem 1rem; border-radius: 10px; font: 700 .95rem var(--font-body); color: #fff; text-decoration: none;
    background: linear-gradient(160deg, #2bd46b, #1a9e4f); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25); }
.rede-entrar:hover { filter: brightness(1.1); }
.rede-qr { margin: .9rem 0 0; }
.rede-qr img { display: block; width: 100%; max-width: 250px; height: auto; margin: 0 auto; border-radius: 10px; background: #fff; }
.rede-qr figcaption { margin-top: .45rem; font-size: .75rem; color: var(--muted); }
.rede-fechar { position: absolute; top: .4rem; right: .55rem; width: 32px; height: 32px; border: 0; border-radius: 50%; background: none; color: var(--muted); font-size: 1.6rem; line-height: 1; cursor: pointer; }
.rede-fechar:hover { color: var(--text); background: rgba(255, 255, 255, .06); }
/* no celular o QR quase não serve (é a própria tela): fica menor, o botão "Entrar no grupo" é o principal */
@media (pointer: coarse) and (max-width: 900px) { .rede-qr img { max-width: 170px; } }

/* menu ☰ do celular: os itens herdam a pele dos botões da gaveta (celular.css) */
.mob-gaveta-rede { text-decoration: none; }
.mob-gaveta-rede.rede-whatsapp .mob-gaveta-ico, .mob-gaveta-rede.rede-instagram .mob-gaveta-ico { color: #fff; }
.mob-gaveta-rede.rede-whatsapp, .mob-gaveta-rede.rede-instagram { background: none; }
.mob-gaveta-rede.rede-whatsapp .mob-gaveta-ico { background: linear-gradient(160deg, #2bd46b, #1a9e4f); }
.mob-gaveta-rede.rede-instagram .mob-gaveta-ico { background: linear-gradient(45deg, #f6a03a 0%, #e1306c 50%, #8a3ab9 100%); }
.mob-gaveta-rede .mob-gaveta-ico svg { fill: none; stroke: currentColor; }
