html, body {
    margin: 0;
    padding: 0;
    background: #0f0f0f;
    color: #fff;
    font-family: Arial, sans-serif;
    -webkit-text-size-adjust: 100%;
}

html {
    scroll-snap-type: y proximity;
}

* {
    box-sizing: border-box;
}

/* ===============================
   FEED — MOBILE FIRST (edge-to-edge, Instagram-like)
================================ */
/* 92px = as duas linhas do #topbar (50px identidade + 42px ações) — ver
   #topbar mais abaixo. Se a altura de qualquer uma das linhas mudar,
   atualizar aqui também (são os dois únicos lugares fora do próprio
   #topbar que hardcodam essa altura). */
.feed {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    padding-top: calc(92px + env(safe-area-inset-top));
    padding-bottom: env(safe-area-inset-bottom);
}

.card {
    background: #1a1a1a;
    margin-bottom: 12px;
    border-radius: 0;
    overflow: hidden;
    position: relative;
    scroll-snap-align: start;
    scroll-margin-top: calc(92px + env(safe-area-inset-top));
}

.card.no-snap {
    scroll-snap-align: none;
}

/* On wider screens the feed becomes a centered card column */
@media (min-width: 560px) {
    .card {
        margin-bottom: 20px;
        border-radius: 10px;
    }
}

.media {
    position: relative;
}

.media img, .media video {
    width: 100%;
    display: block;
}

.blur {
    filter: blur(12px);
    transition: filter 0.3s ease;
}

/* ===============================
   CARROSSEL DE IMAGENS (estilo Instagram) — só pra posts com mais de
   uma imagem (ver "extra_images" no admin). Rolagem horizontal própria,
   independente do scroll-snap vertical do feed inteiro.
================================ */
.carousel-wrapper {
    position: relative;
}

.image-carousel {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-arrow-prev { left: 8px; }
.carousel-arrow-next { right: 8px; }

.image-carousel::-webkit-scrollbar {
    display: none;
}

.carousel-slide {
    flex: 0 0 100%;
    width: 100%;
    scroll-snap-align: start;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    padding: 8px 0;
}

.carousel-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    transition: background 0.2s ease;
}

.carousel-dot.active {
    background: #ff2f7a;
}

/* ===============================
   VITRINE DE DESTAQUES (featured strip) — prateleira horizontal fixa no
   topo do feed com os posts marcados como destaque no admin. Reaproveita
   a técnica de esconder scrollbar do carrossel de imagens (acima) pro
   scroll HORIZONTAL interno da prateleira — aqui são várias miniaturas
   pequenas lado a lado ("prateleira"), sem scroll-snap nesse eixo (não é
   um slide único de largura cheia por item, como o carrossel de imagem).

   MAS precisa de scroll-snap-align no eixo VERTICAL da página (`html`
   tem `scroll-snap-type: y proximity`, cada `.card` é um ponto de
   parada) — sem isso, a prateleira vira o primeiro filho de `.feed` que
   NÃO é ponto de parada válido, e o navegador, ao decidir onde
   "descansar" a rolagem no carregamento (proximity snapping), pula
   direto pro primeiro `.card` (o próximo ponto válido) — escondendo a
   prateleira inteira atrás do topbar fixo mesmo sem o usuário ter
   rolado nada. Bug real, visto em produção: a vitrine renderizava
   perfeita no DOM, só ficava atrás do topbar no load. Corrigido dando à
   prateleira o mesmo tratamento de `.card` (scroll-snap-align + o mesmo
   scroll-margin-top de 92px) — ela também vira ponto de parada válido,
   tornando a posição 0 (topo real da página) válida de novo.
================================ */
#featured-strip {
    width: 100%;
    padding: 10px 10px 4px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    scroll-snap-align: start;
    scroll-margin-top: calc(92px + env(safe-area-inset-top));
}

#featured-strip::-webkit-scrollbar {
    display: none;
}

#featured-strip-track {
    display: flex;
    gap: 8px;
}

.featured-item {
    position: relative;
    flex: 0 0 auto;
    width: 100px;
    height: 100px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(255, 47, 122, 0.35);
    display: block;
}

.featured-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.featured-badge {
    position: absolute;
    bottom: 4px;
    right: 4px;
    font-size: 11px;
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 5px;
}

.featured-badge-price {
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
}

.featured-badge-free {
    /* mesmas cores do .card-free-badge, consistência visual */
    background: #3ec763;
    color: #06280f;
}

.media-wrapper {
    position: relative;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.overlay button {
    padding: 10px 20px;
    background: #ff2f7a;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
}

/* Link externo — só aparece depois do unlock, sobre a imagem já revelada.
   Não abre sozinho (sem popup/aba automática) — quem decide clicar é o
   visitante, evitando aquela surpresa ruim de aba nova no celular. */
.unlock-external-link {
    position: absolute;
    left: 50%;
    bottom: 16px;
    transform: translateX(-50%);
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
    white-space: nowrap;
    z-index: 5;
    animation: link-glow 1.8s ease-in-out infinite;
}

@keyframes link-glow {
    0% {
        text-shadow: 0 0 4px #ff2f7a;
    }

    50% {
        text-shadow: 0 0 14px #ff2f7a, 0 0 22px #ff2f7a;
    }

    100% {
        text-shadow: 0 0 4px #ff2f7a;
    }
}

/* ===============================
   CONTEÚDO PAGO
================================ */
.paid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: rgba(0, 0, 0, 0.25);
}

.card-free-badge {
    position: absolute;
    top: 10px;
    /* right, não left — o avatar do post-header também mora no canto
       superior esquerdo (position:absolute, z-index maior), e como é
       redondo sobra área transparente nos cantos do próprio quadrado
       dele; um pedaço deste selo verde aparecia ali por baixo. Canto
       direito do cabeçalho normalmente fica vazio (só ocupado pelo ícone
       de link 🔗 quando o post tem um, raro num card). */
    right: 10px;
    z-index: 2;
    background: #3ec763;
    color: #06280f;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 0.5px;
    padding: 3px 9px;
    border-radius: 5px;
}

.paid-price {
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 20px;
    font-weight: bold;
    padding: 6px 16px;
    border-radius: 20px;
}

.paid-buy-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #ff2f7a, #b4005a);
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    font-size: 16px;
    padding: 12px 24px;
    border-radius: 30px;
    box-shadow: 0 4px 20px rgba(255, 47, 122, 0.5);
}

.paid-unlocked {
    display: flex;
    flex-direction: column;
}

/* ===============================
   SÉRIES (episódios estilo ReelShort) — card de chamada no feed
================================ */
.series-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 16px calc(20px + env(safe-area-inset-bottom));
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 30%, transparent);
    text-align: center;
}

.series-title {
    color: #fff;
    font-size: 18px;
    font-weight: bold;
}

.series-episode-count {
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    margin-top: -4px;
}

/* Selo do card de história interativa: o card reaproveita o layout do de
   série (mesma vitrine, capa + botão), então precisa de UM sinal claro de
   que ali a experiência é outra — quem clica sabendo que vai escolher não
   se assusta com o primeiro botão que aparece no meio do vídeo. */
.interactive-badge {
    align-self: center;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 20px;
    backdrop-filter: blur(4px);
}

.series-watch-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #ff2f7a, #b4005a);
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    font-size: 16px;
    padding: 12px 24px;
    border-radius: 30px;
    box-shadow: 0 4px 20px rgba(255, 47, 122, 0.5);
    margin-top: 4px;
}

.paid-unlocked video {
    width: 100%;
    display: block;
    background: #000;
}

.paid-pdf-frame {
    width: 100%;
    height: 70vh;
    border: none;
    display: block;
    background: #fff;
}

.paid-download-btn {
    display: block;
    text-align: center;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    padding: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.blur-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(8px);
    color: #fff;
    font-weight: bold;
    font-size: 18px;
    cursor: pointer;
    border-radius: 10px;
    transition: transform 0.2s ease, box-shadow 0.3s ease;
    animation: pulse 1.5s infinite;
}

    .blur-layer:hover {
        transform: scale(1.05);
        box-shadow: 0 0 20px #ff2f7a;
    }

@keyframes pulse {
    0% {
        box-shadow: 0 0 5px #ff2f7a;
    }

    50% {
        box-shadow: 0 0 25px #ff2f7a;
    }

    100% {
        box-shadow: 0 0 5px #ff2f7a;
    }
}

/* ===============================
   SIDE ACTIONS — like/share sobre a mídia (estilo TikTok)
================================ */
.side-actions {
    position: absolute;
    right: 10px;
    bottom: calc(96px + env(safe-area-inset-bottom));
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    z-index: 5;
}

.side-action {
    background: none;
    border: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}

.side-icon {
    font-size: 28px;
    line-height: 1;
    filter: drop-shadow(0 1px 3px rgba(0,0,0,0.6));
    transition: transform 0.15s ease;
}

.side-action:active .side-icon {
    transform: scale(1.25);
}

.side-icon.liked {
    animation: like-pop 0.3s ease;
}

@keyframes like-pop {
    0% { transform: scale(1); }
    50% { transform: scale(1.4); }
    100% { transform: scale(1); }
}

.side-count {
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

/* ===============================
   LIVE AVATAR (badge no side-actions)
================================ */
.live-avatar-wrap {
    position: relative;
    width: 34px;
    height: 34px;
    display: block;
}

.live-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    border: 2px solid rgba(255, 255, 255, 0.35);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.live-dot {
    display: none;
    position: absolute;
    top: -2px;
    right: -2px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #ff1744;
    border: 2px solid #0f0f0f;
}

.live-label {
    display: none;
    color: #ff1744;
    letter-spacing: 0.5px;
}

.live-avatar-btn.is-live .live-avatar {
    border-color: #ff1744;
    box-shadow: 0 0 10px rgba(255, 23, 68, 0.8);
    animation: live-pulse 1.4s infinite;
}

.live-avatar-btn.is-live .live-dot {
    display: block;
    animation: live-blink 1.1s infinite;
}

.live-avatar-btn.is-live .live-label {
    display: block;
}

@keyframes live-pulse {
    0% { box-shadow: 0 0 6px rgba(255, 23, 68, 0.6); }
    50% { box-shadow: 0 0 16px rgba(255, 23, 68, 1); }
    100% { box-shadow: 0 0 6px rgba(255, 23, 68, 0.6); }
}

@keyframes live-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.25; }
}

/* ===============================
   LIVE OVERLAY — TRUE FULLSCREEN (mobile + desktop)
================================ */
#live-overlay {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: #000;
    z-index: 2100;
    transform: translateY(100%);
    transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1),
                visibility 0s linear 0.32s;
    will-change: transform;
    visibility: hidden;
}

#live-overlay.active {
    transform: translateY(0);
    visibility: visible;
    transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1),
                visibility 0s linear 0s;
}

#live-video {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

/* Barra superior sobreposta ao vídeo (igual às lives de verdade), não empurra o vídeo */
#live-topbar {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 44px;
    padding-top: calc(12px + env(safe-area-inset-top));
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0));
    z-index: 1;
}

#live-indicator {
    color: #ff1744;
    font-weight: bold;
    font-size: 13px;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
    animation: live-blink 1.4s infinite;
    flex-shrink: 0;
}

#live-cam-label {
    font-size: 14px;
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

#live-close-button {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    background: none;
    border: none;
    color: #fff;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    padding: 0 12px;
    padding-top: env(safe-area-inset-top);
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

/* Descrição sobreposta na parte de baixo do vídeo, mesmo esquema */
#live-description {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    padding: 20px 16px 14px;
    padding-bottom: calc(14px + env(safe-area-inset-bottom));
    background: linear-gradient(to top, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0));
    font-size: 13px;
    color: #eee;
    text-align: center;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
    z-index: 1;
}

#live-description:empty {
    display: none;
}

html.live-open,
body.live-open {
    overflow: hidden;
}

.chat {
    padding: 12px 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    word-wrap: break-word;
    text-align: center;
}

/* Legenda comprida vira card gigante sem isso — trava em 3 linhas e só
   mostra "more" quando o texto realmente ultrapassa (checado em main.js,
   setupCaptionTruncation()). */
.post-caption {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
}

.post-caption.expanded {
    display: block;
    -webkit-line-clamp: unset;
    overflow: visible;
}

.caption-more-btn {
    display: none;
    margin-top: 4px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
}

/* ===============================
   POST HEADER — título simulando usuário + selo AI/OC + link
================================ */
.post-header {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0));
    z-index: 4;
}

.post-header-title,
.post-header-link {
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

/* Especificidade extra (.post-header + .post-header-avatar) de propósito:
   precisa vencer a regra genérica ".media img { width: 100% }", já que o
   avatar agora mora dentro de .media (flutuando sobre a imagem). Sem isso
   ele herda 100% de largura e vira um círculo gigante e distorcido. */
.post-header .post-header-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.post-header-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.post-header-title {
    font-weight: bold;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.post-badge {
    flex-shrink: 0;
    font-size: 10px;
    font-weight: bold;
    letter-spacing: 0.5px;
    padding: 2px 7px;
    border-radius: 4px;
}

.post-badge-oc {
    background: rgba(0, 200, 120, 0.18);
    border: 1px solid rgba(0, 200, 120, 0.5);
    color: #4fe3a8;
}

.post-badge-ai {
    background: rgba(120, 100, 255, 0.18);
    border: 1px solid rgba(120, 100, 255, 0.5);
    color: #b3a4ff;
}

.post-header-link {
    flex-shrink: 0;
    font-size: 16px;
    text-decoration: none;
    line-height: 1;
}

/* ===============================
   HASHTAGS
================================ */
.post-hashtags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin-top: 8px;
}

.hashtag {
    font-size: 12px;
    color: #ff2f7a;
    text-decoration: none;
}

#tag-filter-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 16px;
    color: #fff;
    font-size: 13px;
    font-weight: bold;
    background: rgba(255, 47, 122, 0.12);
    border-bottom: 1px solid rgba(255, 47, 122, 0.35);
}

#tag-filter-banner a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 16px;
    line-height: 1;
}

#tag-filter-empty {
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    padding: 60px 20px;
    font-size: 14px;
}

/* confetes */
.confetti {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

    .confetti.active::before,
    .confetti.active::after {
        content: "🎉🎊✨";
        position: absolute;
        top: 50%;
        left: 50%;
        font-size: 24px;
        animation: confetti-fall 2s ease forwards;
    }

@keyframes confetti-fall {
    0% {
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, 200px) scale(0.5) rotate(360deg);
        opacity: 0;
    }
}

/* ===============================
   TOP BAR — FIXED, SAFE-AREA AWARE
================================ */
#topbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    padding-top: env(safe-area-inset-top);
    background: rgba(15, 15, 15, 0.95);
    border-bottom: 1px solid rgba(255, 47, 122, 0.35);
    backdrop-filter: blur(6px);
    z-index: 1000;
}

#topbar-row-identity {
    height: 50px;
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: space-between;
    padding-left: 16px;
    padding-right: 16px;
}

/* Linha de baixo, só com os botões de ação (Shorts/Cards/Chat). Largura
   natural + gap (não space-between) de propósito — é o que deixa essa
   linha crescer bem quando mais um botão entrar, e é a base pronta pra
   virar uma fileira arrastável (estilo ReelShort) no futuro sem precisar
   redesenhar o layout de novo. */
/* 4 botões (Shorts/Cards/Store/Chat) já não cabem numa tela de 375px de
   largura (confirmado: 393px de conteúdo num espaço de 375px, ao
   adicionar Store) — a fileira "arrastável" cogitada desde que a linha
   virou duas (ver comentário no index.php) deixou de ser hipotética.
   overflow-x:auto + scrollbar escondida (mesma técnica do carrossel de
   imagem) resolve sem precisar de JS: desliza com o dedo, sem cortar
   nenhum botão. */
#topbar-row-actions {
    height: 42px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-left: 16px;
    padding-right: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

#topbar-row-actions::-webkit-scrollbar {
    display: none;
}

#topbar-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

#topbar-title {
    flex: 1;
    font-weight: bold;
    letter-spacing: 0.5px;
    font-size: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===============================
   AVISO DE IDADE — cartão pequeno, não tela cheia
================================ */
#age-gate-overlay {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.75);
    padding: 20px;
}

#age-gate-overlay.visible {
    display: flex;
}

#age-gate-card {
    background: #17171a;
    border-radius: 14px;
    padding: 22px 20px;
    max-width: 300px;
    width: 100%;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

#age-gate-card p {
    margin: 0 0 16px;
    font-size: 13px;
    line-height: 1.5;
    color: rgba(255,255,255,0.9);
}

#age-gate-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#age-gate-enter {
    background: linear-gradient(135deg, #ff2f7a, #b4005a);
    color: #fff;
    border: none;
    font-weight: bold;
    font-size: 14px;
    padding: 12px;
    border-radius: 24px;
    cursor: pointer;
}

#age-gate-leave {
    color: rgba(255,255,255,0.4);
    font-size: 12px;
    text-decoration: none;
    padding: 4px;
}

#site-footer {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px 14px;
    padding: 20px 16px calc(20px + env(safe-area-inset-bottom));
}

#site-footer a {
    color: rgba(255,255,255,0.4);
    font-size: 12px;
    text-decoration: none;
}

#topbar-link,
#favorites-link {
    flex-shrink: 0;
    font-size: 18px;
    text-decoration: none;
    line-height: 1;
}

#shorts-link {
    flex-shrink: 0;
    background: rgba(168, 85, 247, 0.18);
    border: 1px solid rgba(168, 85, 247, 0.5);
    color: #a855f7;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
}

/* Cor própria (dourado, mesmo tom do selo/moldura do card colecionável
   em admin/card_template.html) — distingue de Shorts (roxo) e Chat
   (rosa) numa fileira que só tende a crescer. */
#cards-link {
    flex-shrink: 0;
    background: rgba(255, 176, 32, 0.18);
    border: 1px solid rgba(255, 176, 32, 0.5);
    color: #ffb020;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
}

/* Cor própria (ciano) — distingue de Shorts (roxo), Cards (dourado) e Chat
   (rosa). Verde já significa "grátis" em vários lugares do site (badge de
   card grátis, etc.), então evitei pra não confundir com "Store = tudo
   grátis". */
#store-link {
    flex-shrink: 0;
    background: rgba(34, 211, 238, 0.18);
    border: 1px solid rgba(34, 211, 238, 0.5);
    color: #22d3ee;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
}

#open-chat-button {
    flex-shrink: 0;
    background: rgba(255, 47, 122, 0.18);
    border: 1px solid rgba(255, 47, 122, 0.5);
    color: #ff2f7a;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    white-space: nowrap;
}

#open-chat-button:hover,
#open-chat-button:active {
    background: rgba(255, 47, 122, 0.35);
}

/* ===============================
   CHAT OVERLAY — TRUE FULLSCREEN (mobile + desktop)
================================ */
#chat-overlay {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: #000;
    z-index: 2000;
    transform: translateY(100%);
    transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1),
                visibility 0s linear 0.32s;
    will-change: transform;
    visibility: hidden;
}

#chat-overlay.active {
    transform: translateY(0);
    visibility: visible;
    transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1),
                visibility 0s linear 0s;
}

#chat-frame {
    width: 100%;
    height: 100%;
    height: 100dvh;
    border: none;
    display: block;
}

/* ===============================
   NATIVE-APP FEEL — trava o scroll de fundo
================================ */
html.chat-open,
body.chat-open {
    overflow: hidden;
}
