*,
*::before,
*::after {
    box-sizing: border-box;
}

/* ============================================================
   1. FILTROS
   ============================================================ */
.filtros-container {
    border: none;
    justify-content: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
    margin: 20px auto;
    padding: 20px 10px 30px 10px;
    font-size: 0.85rem;
    font-size: clamp(0.9rem, 1.5cqw, 1.2rem);
}

.filtro-btn {
    text-decoration: none;
    font-size: 13px;
    font-size: clamp(14px, 1.5cqw, 18px);
    font-weight: 800;
    padding: 5px 10px;
    padding: clamp(6px, 8px, 12px) 12px;
    max-width: fit-content;
    border-radius: 20px;
    color: #fff;                                                  /* fallback */
    color: var(--texto-primario, #fff);                           /* 🐚 FAROL – Fase 2 */
    background: rgba(255, 255, 255, 0.05);                        /* fallback */
    background: var(--bg-input, rgba(255, 255, 255, 0.05));       /* 🐚 FAROL – Fase 2 */
    border: 1px solid rgba(255, 255, 255, 0.1);                   /* fallback */
    border: 1px solid var(--borda-media, rgba(255, 255, 255, 0.1)); /* 🐚 FAROL – Fase 2 */
    transition: 0.3s;
    text-transform: uppercase;
}

.filtro-btn.ativo,
.filtro-btn:hover {
    background: var(--dourado);
    background: var(--texto-dourado, var(--dourado, #ffbc00));     /* 🐚 FAROL – Fase 2 */
    color: #000;                                                   /* fica local – texto em fundo claro */
    border-color: var(--dourado);
    border-color: var(--texto-dourado, var(--dourado, #ffbc00));   /* 🐚 FAROL – Fase 2 */
    transform: translateY(-5px);
    box-shadow: 0 4px 10px rgba(255, 188, 0, 0.2);
}

.filtros-perdidos {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 20px 0;
}

/* ============================================================
   2. CONTAINER DO FEED
   ============================================================ */
.container-feed>div {
    width: 100%;
    box-sizing: border-box;
    height: auto;
}

.main-fenda-total {
    max-width: 100%;
    padding: 0;
    margin: 10px auto;
}

.main-fenda-total article {
    width: 100%;
    margin: 0;
    box-sizing: border-box;
}

.container-feed {
    align-items: flex-start;
    padding: 15px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: 20px;
    max-width: 1600px;
    margin: 20px auto;
    width: 100%;
    box-sizing: border-box;
}

.container-feed article {
    display: flex;
    flex-direction: column;
    width: 100%;
    position: relative;
    margin: 20px auto;
    top: auto;
    left: auto;
}

/* ============================================================
   3. POST CONTENT (expansão "ler mais")
   ============================================================ */
.post-content {
    position: relative;
    word-break: break-word;
    overflow-wrap: anywhere;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
    hyphens: auto;
    font-kerning: normal;
    font-variant-ligatures: common-ligatures;
    text-rendering: auto; /* Garante performance máxima no scroll */
    flex-grow: 1;
    white-space: pre-wrap;
    color: #f2f2f2;                                                /* fica local – tom levemente mais claro que --texto-secundario */
    max-height: 6rem;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
    box-orient: vertical;
    transition: max-height 0.4s ease-in-out;
    overflow: hidden;
}

body:not(.modo-swipe-ativo) .post-content {
    display: -webkit-box;
    margin: 5px 0;
    font-size: 0.88rem;
    font-size: clamp(0.85rem, 1.041vw, 1.05rem);
    overflow: hidden;
    -moz-user-select: text;
    -ms-user-select: text;
    -webkit-user-select: text;
    user-select: text;
}

.post-content.expandido {
    max-height: 2000px;
    overflow: visible;
}

.post-content.tem-mais:not(.expandido)::after {
    content: '... ler mais';
    position: absolute;
    bottom: 0;
    right: 0;
    background: linear-gradient(to left, rgba(10, 10, 10, 1) 70%, transparent);
    padding-left: 30px;
    color: var(--dourado);
    color: var(--texto-dourado, var(--dourado, #ffbc00));           /* 🐚 FAROL – Fase 2 */
    font-weight: bold;
    font-size: 0.75rem;
    font-size: clamp(0.7rem, 0.8cqi, 0.9rem);
}

/* ============================================================
   4. SPOTTED-CARD (base)
   ============================================================ */
.spotted-card {
    background: rgba(17, 17, 17, 0.32);                            /* fallback */
    background: var(--bg-card, rgba(17, 17, 17, 0.32));           /* 🐚 FAROL – Fase 2 */
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 25px;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 380px;
    -webkit-user-drag: none;
    -webkit-font-smoothing: antialiased;
    height: auto;
    scrollbar-width: none;
    container-type: inline-size;
    container-name: container-card;
}

.spotted-card::-webkit-scrollbar {
    display: none;
}

body.modo-swipe-ativo .spotted-card * {
    pointer-events: none;
}

body:not(.modo-swipe-ativo) .spotted-card:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    background: rgba(0, 0, 0, 0.397);                              /* fallback */
    background: var(--bg-card-hover, rgba(0, 0, 0, 0.397));        /* 🐚 FAROL – Fase 2 */
    border-color: rgba(255, 255, 255, 0.144);                     /* fallback */
    border-color: var(--borda-card, rgba(255, 255, 255, 0.144));   /* 🐚 FAROL – Fase 2 */
    transition: 0.3s ease;
}

@supports (backdrop-filter: blur(2px)) {
     body:not(.modo-swipe-ativo) .spotted-card:hover {
        background: rgba(0, 0, 0, 0.6);                            /* fica local – alpha distinto do hover comum */
        -webkit-backdrop-filter: blur(2px);
        backdrop-filter: blur(2px);
        border-color: rgba(255, 255, 255, 0.14);                   /* fallback */
        border-color: var(--borda-card, rgba(255, 255, 255, 0.14)); /* 🐚 FAROL – Fase 2 */
        transform: translateY(-6px);
        transition: 0.3s ease;
    }
}

/* ============================================================
   5. CARREGAR MAIS / FIM / BOTÕES GENÉRICOS
   ============================================================ */
.container-load-more {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 20px 0;
    margin-bottom: 20px;
}

#btn-load-more {
    transition: transform 0.2s ease, background 0.3s ease;
    font-size: 0.8rem;
    font-size: clamp(0.75rem, 1.85vw, 1rem);
    -webkit-user-select: none;
    user-select: none;
}

#btn-load-more:hover {
    transform: translateY(-6px);
    filter: brightness(1.03);
}

#btn-load-more:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.fim-dos-cards-vibe {
    display: block;
    text-align: center;
    justify-content: center;
    padding: 40px 20px;
    margin: 20px auto;
    top: calc(20% - 50px);
    color: #ccc;                                                   /* fallback */
    color: var(--texto-secundario, #ccc);                          /* 🐚 FAROL – Fase 2 */
    position: relative;
}

.fim-dos-cards-vibe .fa-ghost:before {
    font-size: clamp(3.5rem, 10vh, 7rem);
    color: #ff8c00;                                                /* fallback */
    color: var(--cor-principal-laranja, #ff8c00);                  /* 🐚 FAROL – Fase 2 */
    margin-bottom: 15px;
    display: block;
}

.fim-dos-cards-vibe strong {
    font-size: 0.9rem;
    font-size: clamp(0.95rem, 1.5vw, 1.6rem);
    display: block;
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.89);                              /* fallback */
    color: var(--texto-primario, rgba(255, 255, 255, 0.89));       /* 🐚 FAROL – Fase 2 */
}

.fim-dos-cards-vibe p {
    font-size: 0.85rem;
    font-size: clamp(0.9rem, 1.3vw, 1.4rem);
    color: #888;                                                   /* fallback */
    color: var(--texto-muted, #888);                               /* 🐚 FAROL – Fase 2 */
    margin-bottom: 20px;
}

.btn-fenda-padrao {
    padding: 10px 24px;
    background: var(--dourado);
    background: var(--texto-dourado, var(--dourado, #ffbc00));     /* 🐚 FAROL – Fase 2 */
    color: #000;                                                   /* fica local – texto em fundo claro */
    border: none;
    border-radius: 25px;
    font-weight: bold;
    cursor: pointer;
    font-size: clamp(0.85rem, 1.3vw, 1.2rem);
    transition: 0.3s;
}

/* ============================================================
   6. CORES DAS CATEGORIAS
   ============================================================ */
.spotted-card.tenho-ranco {
    background: linear-gradient(145deg, rgba(207, 60, 60, 0.85), rgba(126, 47, 47, 0.233));
}

.spotted-card.comunidade {
    background: linear-gradient(145deg, rgba(179, 179, 179, 0.35), rgba(137, 137, 137, 0.14));
}

.spotted-card.acaba-pelo-amor-de-deus {
    background: linear-gradient(145deg, rgba(201, 120, 14, 0.7), rgba(145, 68, 37, 0.42));
}

.spotted-card.perdidos {
    background: linear-gradient(275deg, rgba(221, 203, 38, 0.68), rgb(255, 235, 59, 0.12));
}

.spotted-card.elogio {
    background: linear-gradient(145deg, rgba(210, 90, 130, 0.75), rgba(80, 20, 40, 0.15));
}

.spotted-card.esportes {
    background: linear-gradient(145deg, rgba(19, 252, 97, 0.288), rgba(53, 85, 45, 0.315));
}

.spotted-card.games {
    background: linear-gradient(145deg, rgb(27, 155, 165, 0.85), rgba(8, 45, 57, 0.22));
}

.spotted-card.caronas {
    background: linear-gradient(145deg, rgba(214, 214, 214, 0.63), rgba(10, 10, 10, 0.62));
}

.spotted-card.academico {
    background: linear-gradient(145deg, rgba(135, 26, 179, 0.22), rgba(61, 6, 78, 0.12));
}

.spotted-card.desapego {
    background: linear-gradient(145deg, rgba(0, 191, 255, 0.22), rgba(10, 40, 60, 0.12));
}

/* ============================================================
   7. ÍCONES DE CATEGORIA (::after do user-info-post)
   ============================================================ */
.spotted-card .user-info-post::after {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    margin-left: auto;
    font-size: 1rem;
    font-size: var(--category-icon-font-size, clamp(1rem, 3.5cqi, 1.4rem));
    opacity: 0.7;
    align-self: center;
    position: relative;
    display: flex;
}

.spotted-card.comunidade .user-info-post::after { content: '\f0c0'; color: #ffffffb6; }
.spotted-card.tenho-ranco .user-info-post::after { content: "\f071"; color: #ff6417; }
.spotted-card.elogio .user-info-post::after { content: "\f004"; color: #ff4fd0; }
.spotted-card.games .user-info-post::after { content: "\f11b"; color: #08ccef; }
.spotted-card.academico .user-info-post::after { content: "\f518"; color: #b822f3b7; }
.spotted-card.caronas .user-info-post::after { content: "\f1b9"; color: #000000cc; }
.spotted-card.perdidos .user-info-post::after { content: "\f002"; color: #504f05ee; }
.spotted-card.esportes .user-info-post::after { content: "\f45f"; color: #0db344; }
.spotted-card.acaba-pelo-amor-de-deus .user-info-post::after { content: "\f253"; color: #f78605; }
.spotted-card.desapego .user-info-post::after { content: "\f02b"; color: #00bfff; }

/* ============================================================
   8. HEADER, BODY E ESTRUTURA DO CARD
   ============================================================ */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 8px;
    flex-wrap: wrap;
    padding: 4px 0;
    margin-block-end: 5px;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.card-body {
    
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: anywhere;
    white-space: normal;
    letter-spacing: 0.5px;
    margin-bottom: auto;
    pointer-events: auto;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.spotted-card .card-body {
    overflow: visible;
}

.spotted-card .feed-anexos-grid,
.spotted-card .container-img-post {
    position: relative;
    z-index: 1;
}

.spotted-card .feed-anexo-item img,
.spotted-card .container-img-post img {
    display: block;
    position: relative;
    z-index: 1;
}

/* ============================================================
   9. BOTÃO FILTRO PERDIDOS E BADGES
   ============================================================ */
.btn-filtro {
    padding: 5px 14px;
    background: rgba(255, 255, 255, 0.05);                        /* fallback */
    background: var(--bg-input, rgba(255, 255, 255, 0.05));       /* 🐚 FAROL – Fase 2 */
    border: 1px solid rgba(255, 255, 255, 0.1);                   /* fallback */
    border: 1px solid var(--borda-media, rgba(255, 255, 255, 0.1)); /* 🐚 FAROL – Fase 2 */
    border-radius: 24px;
    color: #fff;                                                   /* fallback */
    color: var(--texto-primario, #fff);                            /* 🐚 FAROL – Fase 2 */
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    height: auto;
    max-width: min-content;
    margin-top: 20px;
    align-content: center;
}

.btn-filtro:hover {
    background: rgba(255, 255, 255, 0.15);                         /* fica local – alpha mais claro que --bg-input-hover (0.1) */
}

.btn-filtro.ativo {
    background: var(--dourado);
    background: var(--texto-dourado, var(--dourado, #ffbc00));      /* 🐚 FAROL – Fase 2 */
    color: #000;                                                    /* fica local – texto em fundo claro */
    border-color: var(--dourado);
    border-color: var(--texto-dourado, var(--dourado, #ffbc00));    /* 🐚 FAROL – Fase 2 */
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
    justify-content: center;
    font-size: 0.95rem;
    font-size: clamp(0.92rem, 0.2vw + 0.5rem, 1.3rem);
    padding: 4px 12px;
    padding: clamp(4px, 0.5vw + 2px, 10px) 14px;
    align-content: center;
}

.badge-perdido {
    background-color: #ff4b2b !important;
    color: white;
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 14px;
    margin-right: 10px;
    font-weight: bold;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    box-shadow: 0 4px 15px rgba(255, 75, 43, 0.2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.badge-achado {
    background-color: #10e268a8 !important;
    color: white;
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    box-shadow: 0 4px 15px rgba(255, 75, 43, 0.2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    gap: 4px;
}

.badge-perdido,
.badge-achado {
    background: rgba(255, 255, 255, 0.192);
    border-left-style: solid ;
    max-width: 150px;
    max-width: clamp(15cqi, 25vw, 50cqi);
}

.perdidos-item .link-fofoca {
    width: 100%;
    display: block;
    text-align: center;
    background: var(--dourado);
    background: var(--texto-dourado, var(--dourado, #ffbc00));      /* 🐚 FAROL – Fase 2 */
    color: #000;                                                    /* fica local – texto em fundo claro */
    padding: 8px;
    border-radius: 10px;
    text-decoration: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
    -webkit-user-drag: none;
    -webkit-touch-callout: none;
    font-size: 0.78rem;
    font-size: clamp(0.72rem, 3cqi, 1rem);
    font-weight: 800;
    text-transform: uppercase;
    transition: 0.3s ease-in-out;
    bottom: auto;
    margin-top: auto;
}

.card-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 10px;
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.1);                /* fallback */
    border-top: 1px solid var(--borda-media, rgba(255, 255, 255, 0.1)); /* 🐚 FAROL – Fase 2 */
}

.link-fofoca:hover {
    color: #fff;                                                   /* fallback */
    color: var(--texto-primario, #fff);                            /* 🐚 FAROL – Fase 2 */
    transform: translateX(2px);
}

span.data-post {
    display: flex;
    margin-left: auto;
    font-size: 0.8rem;
    font-size: clamp(0.75rem, 3.5cqi, 0.95rem);
    color: #fffff4;                                                /* fica local – branco levemente amarelado, específico de timestamp */
    font-weight: bold;
    opacity: 0.75;
}

/* ============================================================
   10. TAGS, TIMESTAMP E STATUS
   ============================================================ */
.category-tag {
    color: #ffc801ec;                                              /* fica local – dourado específico de categoria (#ffbc00 tem tom ligeiramente diferente) */
    font-weight: bold;
    flex: 0 1 auto; /* pode encolher se precisar, mas não cresce */
    min-width: 0;
    gap: 5px;
    margin-right: auto;
    align-content: center;
    align-items: center;
    display: inline-flex;
    border: none;
    padding: 2px ;
    font-size: 0.86rem;
    font-size: clamp(0.82rem, 3cqi, 1.3rem);
    font-kerning: normal;
    font-variant-ligatures: common-ligatures;
    text-rendering: auto; /* Garante performance máxima no scroll */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    hyphens: auto;
    vertical-align: middle;
}

.post-time {
    position: relative;
    color: #ffff;                                                  /* fallback */
    color: var(--texto-primario, #ffff);                           /* 🐚 FAROL – Fase 2 */
    margin-left: auto;
    font-size: 0.84rem;
    font-size: clamp(0.8rem, 2.3cqi, 1.1rem);
    word-break: break-word;
    overflow-wrap: anywhere;
    font-kerning: normal;
    font-variant-ligatures: common-ligatures;
    text-rendering: auto; /* Garante performance máxima no scroll */
    white-space: nowrap;
    flex-shrink: 0;
    opacity: 0.75;
    padding: 4px;
    font-weight: bold;
}

/* ============================================================
   11. REAÇÕES — POPUP, PÍLULAS E ANIMAÇÃO
   ============================================================ */
.container-pilulas-reacoes {
    display: flex;
    gap: 10px;
    gap: clamp(8px, 2cqi, 16px);
    padding: 15px 0;
}

.reacoes-popup {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    left: 55%;
    bottom: 100%;
    background: #252542;                                          /* fica local – roxo específico do popup */
    padding: 6px 10px;
    padding: clamp(4px, 0.8cqi, 10px) clamp(10px, 1.5cqi, 16px);
    border-radius: 20px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    z-index: 9999 !important;
    border: 1px solid rgba(255, 255, 255, 0.08);                  /* fallback */
    border: 1px solid var(--borda-media, rgba(255, 255, 255, 0.08)); /* 🐚 FAROL – Fase 2 */
    white-space: nowrap;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
    transition: all 0.3s cubic-bezier(0.2, 0, 0, 1), opacity 0.2s ease, visibility 0.2s;
    will-change: transform, opacity;
}

/* Grid das reações: até quatro colunas, sem altura reservada quando vazio */
.reacoes-gravadas {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: minmax(28px, auto);
    gap: 4px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 0;
    margin: 6px 0;
    align-content: start;
    box-sizing: border-box;
}

/* Cada pílula fica no próprio espaço; contagens longas são truncadas */
.reacoes-gravadas .reacao-item {
    display: block;
    justify-self: start;
    width: max-content;
    max-width: 100%;
    min-width: 0;
    margin: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* Fallback para navegadores sem :has(): oculta container realmente vazio */
.reacoes-gravadas:empty {
    display: none;
}

/* Navegadores com :has(): oculta também se não houver pílulas */
@supports selector(:has(*)) {
    .reacoes-gravadas:not(:has(.reacao-item)) {
        display: none;
    }
}

.reacao-wrapper {
    position: relative;
    display: inline-block;
}

.reacao-wrapper.popup-ativo .reacoes-popup {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateX(-30%) translateY(0px);
    margin-left: max(8px + env(safe-area-inset-left, 0px));
    margin-right: max(8px + env(safe-area-inset-right, 0px));
}

.reacoes-popup::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 40px;
    bottom: -30px;
    left: 0;
}

.reacoes-popup span {
    cursor: pointer;
    font-size: 0.8rem;
    font-size: clamp(0.75rem, 6cqw, 1.3rem);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1/1;
    border-radius: 8px;
    padding: 4px;
    transition:
        background 0.2s ease,
        font-size 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
        padding 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    will-change: font-size, padding;
}

.reacoes-popup span:hover {
    font-size: calc(clamp(0.9rem, 6cqw, 1.4rem) * 1.3);
    background: rgba(169, 197, 218, 0.15);                        /* fica local – azul-acinzentado específico */
    padding: 6px;
    transition: background 0.2s ease, font-size 0.2s cubic-bezier(0.34, 1.56, 0.5, 1), padding 0.2s ease;
}

.reacao-item {
    display: inline-flex;
    opacity: 1 !important;
    visibility: visible !important;
    position: relative;
    align-items: center;
    align-content: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);                        /* fallback */
    background: var(--bg-input-hover, rgba(255, 255, 255, 0.08)); /* 🐚 FAROL – Fase 2 */
    /* Padding enxuto para contagens grandes */
    padding: 3px 6px;
    padding: 0.3em 0.55em;
    font-size: 0.8rem;
    font-size: clamp(0.82rem, calc(0.76rem + 0.25cqi), 1rem);
    font-size: clamp(0.8em, 3.5cqi, 1.2em);
    border-radius: 8px;
    border: 1px solid rgba(255, 188, 0, 0.2);                     /* fallback */
    border: 1px solid var(--borda-dourada, rgba(255, 188, 0, 0.2)); /* 🐚 FAROL – Fase 2 */
    color: #eee;                                                  /* fallback */
    color: var(--texto-secundario, #eee);                         /* 🐚 FAROL – Fase 2 */
    cursor: pointer;
    margin: 0 3px;
    transition: transform 0.2s ease, background 0.2s ease;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
    pointer-events: auto;
}

.reacao-item.voted {
    background: rgba(255, 188, 0, 0.25);                          /* fica local – alpha específico do "voted" */
    border: 1px solid #ffbb00d5;                                  /* fica local – dourado com alpha específico */
    font-weight: bold;
    animation: cliqueChique 0.45s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

.container-pilulas-reacoes:has(.reacao-item.voted) .reacao-item:not(.voted) {
    opacity: 0.35;
    filter: blur(1px);
    transform: scale(0.92) translateY(2px);
    pointer-events: none;
    transition:
        opacity 0.4s ease,
        filter 0.4s ease,
        transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

@keyframes cliqueChique {
    0% { transform: scale(1); box-shadow: 0 0 0 rgba(255, 188, 0, 0); }
    30% { transform: scale(1.08); box-shadow: 0 0 20px rgba(255, 188, 0, 0.45), inset 0 0 8px rgba(255, 255, 255, 0.2); }
    100% { transform: scale(1); box-shadow: 0 4px 12px rgba(255, 188, 0, 0.2), inset 0 0 4px rgba(255, 255, 255, 0.1); }
}

@media (hover: none) {
    .reacoes-popup span:active {
        transform: translate3d(0, 0, 0) scale(1.2);
    }
}

.spotted-card-anonimo .reacoes-popup span {
    font-size: 1.2rem;
}

.footer-links {
    text-transform: uppercase;
    padding: 4px 6px;
    padding: clamp(3px, 3cqi, 10px) clamp(6px, 3cqi, 12px);
    display: inline-flex;
    -ms-touch-action: none;
    touch-action: none;
    -webkit-touch-callout: none;
    user-select: none;
    flex-wrap: wrap;
    flex-shrink: 0;
    justify-content: center;
    align-items: center;
    white-space: nowrap;
    bottom: 0;
    border-top: 2px solid rgba(255, 255, 255, 0.199);
    gap: 10px;
}

.btn-reagir,
.btn-fofocar,
.reacao-wrapper {
    pointer-events: auto !important;
}


/* ============================================================
   12. AVATAR E MENÇÕES
   ============================================================ */
.avatar-p {
    border: 1px solid #ff9f0f;                                    /* fallback */
    border: 1px solid var(--aura-borda-avatar, #ff9f0f);          /* 🐚 FAROL – Fase 2 */
    width: 40px;
    height: 40px;
    width: clamp(38px, 15cqi, 60px);
    height: clamp(38px, 15cqi, 60px);
    border-radius: 50%;
    -moz-background-clip: padding-box;
    -webkit-background-clip: padding-box;
    background-clip: padding-box;
    object-fit: cover;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.user-info-post {
    display: flex;
    gap: 8px;
    font-size: 0.85rem;
    font-size: var(--user-info-font-size, clamp(0.8rem, 3.5cqi, 1.2rem));
    margin-bottom: auto;
    font-weight: bold;
    align-items: center;
    justify-content: left;
}

.user-anonimo {
    color: #cccccc;                                               /* fallback */
    color: var(--texto-secundario, #cccccc);                      /* 🐚 FAROL – Fase 2 */
    text-decoration: none;
    font-weight: bold;
    align-self: center;
    margin-left: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.8rem;
    font-size: var(--user-info-font-size, clamp(0.75rem, 1.3vw, 1rem));
    width: fit-content;
}

.user-mention {
    color: #ff9d0b;                                               /* fallback */
    color: var(--texto-dourado, #ff9d0b);                         /* 🐚 FAROL – Fase 2 */
    text-decoration: none;
    font-weight: bold;
    align-self: center;
    width: auto;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.8rem;
    font-size: var(--user-info-font-size, clamp(0.8rem, 1.5cqi + 0.3em, 1.05rem));
    pointer-events: auto;
}

/* ============================================================
   13. BOTÕES DE AÇÃO DO CARD
   ============================================================ */
.btn-reagir,
.btn-fofocar,
.btn-ver-mais {
    color: #ccc;                                                  /* fallback */
    color: var(--texto-secundario, #ccc);                         /* 🐚 FAROL – Fase 2 */
    text-decoration: none;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    gap: 8px;
    display: inline-flex;
    align-items: center;
    font-size: 0.78rem;
    font-size: clamp(0.7em, 4.2cqi, 1em);
    font-weight: 600;
    text-transform: uppercase;
    background: transparent;
    border: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.btn-reagir:hover,
.btn-fofocar:hover,
.btn-ver-mais:hover {
    filter: brightness(1.1);
    transform: scale(1.02);
    background: rgba(255, 188, 0, 0.1);                           /* fica local – alpha específico do hover */
    border-color: rgba(255, 188, 0, 0.3);                         /* fica local – alpha específico do hover */
    color: #cc900e;                                               /* fica local – dourado escuro do hover */
}

.bio-box {
    width: 100% !important;
    max-width: auto;
    margin: 20px 0;
    text-align: center;
    word-wrap: break-word;
    overflow-wrap: anywhere;
    display: block;
    line-height: 1.5;
    font-style: italic;
}

/* ============================================================
   14. GRID DE ANEXOS — BASE E GALERIA INTELIGENTE
   ============================================================ */

/* --- 14.1. Grid base (fallback / navegadores sem :has()) --- */
.feed-anexos-grid {
    display: grid;
    justify-content: center;
    grid-template-columns: repeat(2, minmax(70px, 100px));
    grid-template-columns: repeat(2, minmax(15cqi, 25cqi));
    gap: 15px;
    margin-top: 5px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.02);
    border: 2px solid rgba(255, 255, 255, 0.06);
    padding: 4px 2px;
}

.main-perdidos .feed-anexos-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(80px, 120px));
    grid-template-columns: repeat(2, minmax(15cqi, 30cqi));
    gap: 8px;
    margin-top: 5px;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.096);
    padding: 8px 0;
}

.main-perdidos .feed-anexo-item {
    aspect-ratio: auto;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.12);
}

.main-perdidos .feed-anexos-grid:has(.feed-anexo-item:only-child) {
    max-height: 380px;
    max-width: 100%;
    height: 100%;
    width: 100%;
    background: transparent;
    object-fit: cover;
    border-radius: 4px;
}

/* --- 14.2. Item base (agora ÚNICA definição — sem duplicação) --- */
.feed-anexo-item {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.28);                              /* fica local – alpha específico do item */
    border-radius: 8px;
    position: relative;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.15s ease;
}

.feed-anexo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.25s ease;
}

/* --- 14.3. 1 imagem: full bleed, sem cortes absurdos --- */
.feed-anexos-grid:has(.feed-anexo-item:only-child) {
    display: block;
    padding: 0;
    border: none;
    background: transparent;
    max-height: 400px;
}

.feed-anexos-grid:has(.feed-anexo-item:only-child) .feed-anexo-item {
    width: 100%;
    height: auto;
    aspect-ratio: auto;
    align-items: center;
    align-content: center;
    border-radius: 8px;
    background: #0a0a0a;                                          /* fallback */
    background: var(--bg-page-dark, #0a0a0a);                     /* 🐚 FAROL – Fase 2 */
    box-shadow: none;
}

.feed-anexos-grid:has(.feed-anexo-item:only-child) img {
    width: 100%;
    height: auto;
    object-fit: contain;
    background: #0a0a0a;                                          /* fallback */
    background: var(--bg-page-dark, #0a0a0a);                     /* 🐚 FAROL – Fase 2 */
}

/* --- 14.4. 2 imagens: lado a lado --- */
.feed-anexos-grid:has(.feed-anexo-item:nth-child(2):last-child) {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr;
    gap: 6px;
    aspect-ratio: 2 / 1;
    border: none;
    background: transparent;
    padding: 0;
}

/* --- 14.5. 3 imagens: 1 grande + 2 empilhadas (Google Drive) --- */
.feed-anexos-grid:has(.feed-anexo-item:nth-child(3):last-child) {
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 6px;
    aspect-ratio: 3 / 2;
    border: none;
    background: transparent;
    padding: 0;
}

.feed-anexos-grid:has(.feed-anexo-item:nth-child(3):last-child) .feed-anexo-item:first-child {
    grid-row: 1 / span 2;
    grid-column: 1;
    aspect-ratio: auto;
}

/* --- 14.6. 4 imagens: mural 2x2 --- */
.feed-anexos-grid:has(.feed-anexo-item:nth-child(4):last-child) {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 5px;
    aspect-ratio: 1 / 1;
    border: none;
    background: transparent;
    padding: 0;
}

/* --- 14.7. 5+ imagens: hero 2x2 + resto --- */
.feed-anexos-grid:has(.feed-anexo-item:nth-child(5)) {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 5px;
    aspect-ratio: 2 / 1;
    border: none;
    background: transparent;
    padding: 0;
}

.feed-anexos-grid:has(.feed-anexo-item:nth-child(5)) .feed-anexo-item:first-child {
    grid-row: 1 / span 2;
    grid-column: 1 / span 2;
    aspect-ratio: auto;
}

.feed-anexos-grid:has(.feed-anexo-item:nth-child(6)) .feed-anexo-item:nth-child(6) {
    grid-column: span 2;
}

/* --- 14.8. PC: modo revista --- */
@media (min-width: 1024px) {
    .feed-anexos-grid:has(.feed-anexo-item:only-child) img {
        max-height: 400px;
        object-fit: contain;
        background: #050505;                                       /* fica local – preto ainda mais escuro, específico de PC */
    }
}

/* --- 14.9. Fallback: navegadores sem :has() --- */
@supports not selector(:has(*)) {
    .feed-anexos-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(80px, 1fr));
        gap: 6px;
    }
    .feed-anexo-item {
        aspect-ratio: 1 / 1;
    }
    .feed-anexo-item img {
        object-fit: cover;
    }
}

/* ============================================================
   15. IMAGEM ÚNICA (container-img-post — posts sem grid)
   ============================================================ */
.spotted-card .container-img-post img {
    display: block;
    width: 100%;
    border-radius: 8px;
    margin: 6px 0;
    object-fit: contain;
    align-items: center;
    justify-content: center;
    max-height: 250px;
    max-height: calc(var(--card-max-height, 550px) * 0.6);
    height: var(--img-max-height, auto);
    object-fit: var(--img-fit, contain);
    background: #0a0a0a;                                          /* fallback */
    background: var(--bg-page-dark, #0a0a0a);                     /* 🐚 FAROL – Fase 2 */
    image-rendering: auto;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    will-change: transform;
}

.spotted-card .container-img-post {
    position: relative;
    max-height: 100dvh;
    width: 100%;
    border-radius: 4px;
    object-fit: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
}

/* Mantém a proporção da mídia sem depender da altura dinâmica da viewport. */
@media (max-width: 1024px) {
    body:not(.modo-swipe-ativo) .main-fenda-total .container-feed
    .spotted-card .container-img-post,
    body:not(.modo-swipe-ativo) .feed-usuario-fenda .container-feed
    .spotted-card .container-img-post {
        width: min(100%, 300px);
        max-height: none;
        overflow: visible;
        margin-inline: auto;
    }

    body:not(.modo-swipe-ativo) .main-fenda-total .container-feed
    .spotted-card .container-img-post img,
    body:not(.modo-swipe-ativo) .feed-usuario-fenda .container-feed
    .spotted-card .container-img-post img {
        width: auto;
        max-width: 100%;
        height: auto;
        max-height: 250px;
        margin-inline: auto;
        object-fit: contain;
    }

    @supports selector(:has(*)) {
        body:not(.modo-swipe-ativo) .main-fenda-total .container-feed
        .feed-anexos-grid:has(.feed-anexo-item:only-child),
        body:not(.modo-swipe-ativo) .feed-usuario-fenda .container-feed
        .feed-anexos-grid:has(.feed-anexo-item:only-child) {
            width: min(100%, 300px);
            height: auto;
            max-height: none;
            overflow: visible;
            margin-inline: auto;
        }

        body:not(.modo-swipe-ativo) .main-fenda-total .container-feed
        .feed-anexos-grid:has(.feed-anexo-item:only-child) img,
        body:not(.modo-swipe-ativo) .feed-usuario-fenda .container-feed
        .feed-anexos-grid:has(.feed-anexo-item:only-child) img {
            width: auto;
            max-width: 100%;
            height: auto;
            max-height: 250px;
            margin-block: 0;
            margin-inline: auto;
            object-fit: contain;
        }

        body:not(.modo-swipe-ativo) .main-fenda-total .container-feed
        .feed-anexos-grid:not(:has(.feed-anexo-item:only-child)),
        body:not(.modo-swipe-ativo) .feed-usuario-fenda .container-feed
        .feed-anexos-grid:not(:has(.feed-anexo-item:only-child)) {
            width: min(100%, 260px);
            max-height: none;
            margin-inline: auto;
        }
    }
}

@media (max-width: 1024px) and (orientation: landscape) {
    body:not(.modo-swipe-ativo) .main-fenda-total .container-feed
    .spotted-card .container-img-post,
    body:not(.modo-swipe-ativo) .feed-usuario-fenda .container-feed
    .spotted-card .container-img-post {
        width: min(100%, 400px);
    }

    body:not(.modo-swipe-ativo) .main-fenda-total .container-feed
    .spotted-card .container-img-post img,
    body:not(.modo-swipe-ativo) .main-fenda-total .container-feed
    .feed-anexos-grid:has(.feed-anexo-item:only-child) img,
    body:not(.modo-swipe-ativo) .feed-usuario-fenda .container-feed
    .spotted-card .container-img-post img,
    body:not(.modo-swipe-ativo) .feed-usuario-fenda .container-feed
    .feed-anexos-grid:has(.feed-anexo-item:only-child) img {
        max-height: 220px;
    }

    @supports selector(:has(*)) {
        body:not(.modo-swipe-ativo) .main-fenda-total .container-feed
        .feed-anexos-grid:has(.feed-anexo-item:only-child),
        body:not(.modo-swipe-ativo) .feed-usuario-fenda .container-feed
        .feed-anexos-grid:has(.feed-anexo-item:only-child) {
            width: min(100%, 400px);
        }

        body:not(.modo-swipe-ativo) .main-fenda-total .container-feed
        .feed-anexos-grid:not(:has(.feed-anexo-item:only-child)),
        body:not(.modo-swipe-ativo) .feed-usuario-fenda .container-feed
        .feed-anexos-grid:not(:has(.feed-anexo-item:only-child)) {
            width: min(100%, 250px);
        }
    }
}
