/* ==========================================================================
   Bloonge — app.css  (VERSÃO 2026-09)
   --------------------------------------------------------------------------
   ARQUIVO NOVO: public_html/assets/app.css
   É o CSS que antes ficava inline em sys/includes/header.php (≈58 KB por
   página, baixado de novo a cada clique). Agora é um arquivo estático:
   cache de 1 ano no navegador e no Cloudflare (?v= muda a cada deploy).
   Seção 1 = o CSS original, intacto.  Seção 2 = correções e mobile (2026-09).
   ========================================================================== */

/* ============================ SEÇÃO 1 — ORIGINAL ============================ */
  :root {
    --brand-orange: #FF6B35;
    --brand-amber:  #FFB627;
    --brand-green:  #3DCB6C;
    --brand-blue:   #2196F3;
    --brand-gradient: linear-gradient(135deg, #FF6B35 0%, #FFB627 30%, #3DCB6C 65%, #2196F3 100%);
    --bg: #FAF7F0;
    --bg-soft: #F3EFE5;
    --surface: #FFFFFF;
    --ink: #14141B;
    --ink-2: #3A3A4A;
    --ink-3: #6B6B7B;
    --line: #E8E3D5;
    --line-strong: #D9D3C2;
    --hover: #F0EBDB;
    --green: #21B07A; --green-bg: #E5F6EE;
    --red: #E61E4D;   --red-bg: #FCE5EB;
    --amber: #D98E0B; --amber-bg: #FBF1DD;
    --shadow-sm: 0 1px 2px rgba(20,20,27,.04), 0 2px 8px rgba(20,20,27,.04);
    --shadow-md: 0 4px 16px rgba(20,20,27,.06), 0 12px 32px rgba(20,20,27,.06);
    --shadow-lg: 0 20px 60px rgba(20,20,27,.14);
    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 22px;
  }
  * , *::before, *::after { box-sizing: border-box; }
  html, body {
    margin: 0; padding: 0; background: var(--bg); color: var(--ink);
    font-family: 'Manrope', system-ui, -apple-system, sans-serif;
    font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased;
    overflow-x: clip; max-width: 100%;
  }
  /* Nada pode ultrapassar a largura da tela (evita barra horizontal no celular). */
  img, video, svg, iframe { max-width: 100%; }
  a { color: inherit; text-decoration: none; }
  h1, h2, h3 { font-family: 'Bricolage Grotesque', sans-serif; margin: 0; color: var(--ink); }

  /* Topbar */
  .topbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    background: rgba(250, 247, 240, 0.92);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--line);
  }
  .topbar-inner {
    max-width: 700px; margin: 0 auto; padding: 12px 20px;
    display: flex; align-items: center; gap: 16px;
  }
  .wordmark { display: flex; align-items: center; height: 34px; flex-shrink: 0; }
  .wordmark img { height: 100%; width: auto; display: block; object-fit: contain; }
  .topbar-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
  .tn-item {
    width: 42px; height: 42px; display: flex; align-items: center; justify-content: center;
    border-radius: 12px; color: var(--ink-2); transition: all .15s; position: relative;
  }
  .tn-item:hover { background: var(--hover); color: var(--ink); }
  .tn-item.active { color: var(--ink); }
  .tn-item.active::after {
    content: ""; position: absolute; bottom: -13px; left: 50%; transform: translateX(-50%);
    width: 24px; height: 3px; border-radius: 3px 3px 0 0; background: var(--brand-gradient);
  }
  .tn-item svg { width: 21px; height: 21px; }
  .avatar-btn {
    width: 36px; height: 36px; border-radius: 50%; padding: 2px;
    background: var(--brand-gradient); margin-left: 4px; flex-shrink: 0;
  }
  .avatar-btn img {
    width: 100%; height: 100%; border-radius: 50%; border: 2px solid var(--bg);
    object-fit: cover; display: block;
  }
  .avatar-fallback {
    width: 100%; height: 100%; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: var(--ink); color: var(--bg);
    font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; font-size: 13px; line-height: 1;
  }
  .topbar-guest { gap: 8px; margin-left: auto; }
  .guest-link { font-size: 14px; font-weight: 700; color: var(--ink-2); padding: 8px 14px; border-radius: 999px; text-decoration: none; }
  .guest-link:hover { background: var(--hover); color: var(--ink); }
  .guest-link.primary { background: var(--brand-gradient); color: #fff; }
  .guest-link.primary:hover { filter: saturate(1.1); background: var(--brand-gradient); }
  .signout-link { display: flex; align-items: center; justify-content: center; color: var(--ink-3); margin-left: 4px; flex-shrink: 0; width: 38px; height: 38px; border-radius: 50%; }
  .signout-link svg { width: 20px; height: 20px; }
  .signout-link:hover { color: var(--ink); background: var(--hover); }

  /* Layout */
  /* A topbar é fixa (altura ~59px). O padding-top do .page compensa
     para o conteúdo não ficar escondido atrás dela. */
  .page { max-width: 700px; margin: 0 auto; padding: 83px 20px 80px; }

  /* No celular, o conteúdo ocupa no máximo 90% da largura da tela,
     deixando uma margem confortável dos dois lados. */
  @media (max-width: 640px) {
    .page { width: 90%; max-width: 90%; padding-left: 0; padding-right: 0; margin: 0 auto; }
    .topbar-inner { width: 90%; max-width: 90%; padding-left: 0; padding-right: 0; margin: 0 auto; }

    /* No celular: título "Mensagens" em cima e os botões (COM texto)
       numa linha abaixo, dividindo a largura igualmente. Robusto para
       qualquer largura de tela (iPhone e Android). */
    .msg-header {
      flex-direction: column;
      align-items: stretch;
      gap: 14px;
      margin: 4px 2px 20px;
    }
    .msg-header h1 { font-size: 24px; font-weight: 800; }

    /* Os dois botões dividem a largura em partes iguais. O min-width:0
       é essencial para o flex encolher os botões de verdade (sem ele,
       o texto "empurra" e quebra a proporção no Android). */
    .msg-header-actions { display: flex; gap: 10px; width: 100%; }
    .msg-action-btn {
      flex: 1 1 0;             /* base 0 = divide 50/50 de verdade */
      min-width: 0;           /* deixa o botão encolher */
      justify-content: center;
      gap: 7px;
      padding: 13px 10px;
      font-size: 14px;
      font-weight: 700;
      border-radius: 14px;
      transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
    }
    /* O texto encolhe com reticências se faltar espaço, em vez de vazar. */
    .msg-action-label {
      display: inline-block;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      min-width: 0;
    }
    .msg-action-btn svg { width: 18px; height: 18px; flex-shrink: 0; }
    .msg-action-btn:active { transform: scale(0.97); }

    /* Botão "Para seguidores" — DESTAQUE VERMELHO (cor do sistema).
       É uma ação importante: envia mensagem a todos os seguidores. */
    .msg-action-btn.btn-link {
      background: var(--red); color: #fff;
      border: none;
      box-shadow: 0 6px 16px rgba(230,30,77,.28);
    }
    .msg-action-btn.btn-link:hover { filter: brightness(1.05); color: #fff; }

    /* Botão "Nova conversa" — gradiente da marca, sombra. */
    .msg-action-btn.btn-primary {
      box-shadow: 0 6px 16px rgba(255,107,53,.28), 0 2px 5px rgba(33,150,243,.16);
    }

    /* Lista de conversas: ajusta espaçamentos para aproveitar a largura. */
    .convo-row { gap: 12px; padding: 12px 4px; }
    .convo-name { font-size: 14.5px; }
    .convo-snippet { font-size: 13px; }
  }

  /* Telas muito estreitas (celulares pequenos, ~360px) — reduz um
     pouco fonte e espaçamento para os textos caberem folgados. */
  @media (max-width: 380px) {
    .msg-header h1 { font-size: 22px; }
    .msg-action-btn { font-size: 13px; padding: 12px 6px; gap: 5px; }
    .msg-action-btn svg { width: 16px; height: 16px; }
    .msg-header-actions { gap: 8px; }
  }
  .flash { border-radius: var(--radius-sm); padding: 13px 15px; margin-bottom: 20px; font-size: 13.5px; }

  /* Botões */
  .btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    border: none; border-radius: 999px; font-family: inherit; font-weight: 700; font-size: 15px;
    padding: 13px 28px; cursor: pointer; transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
  }
  .btn:disabled { opacity: .65; cursor: default; }
  .btn-primary {
    background: var(--brand-gradient); background-size: 160% 160%; color: #fff;
    box-shadow: 0 8px 22px rgba(255,107,53,.32), 0 2px 6px rgba(33,150,243,.18);
    animation: brand-gradient-shift 6s ease infinite;
  }
  .btn-primary:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(255,107,53,.4), 0 3px 8px rgba(33,150,243,.22); filter: saturate(1.08); }
  .btn-primary:active:not(:disabled) { transform: translateY(0); }
  @keyframes brand-gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
  }
  .btn-link { background: none; color: var(--ink-3); font-weight: 700; font-size: 14px; padding: 13px 14px; }
  .btn-link:hover { color: var(--ink); }

  /* Formulários */
  .muted { color: var(--ink-3); font-size: 13.5px; }
  .field { margin-bottom: 18px; }
  .field > label {
    display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; color: var(--ink-2);
    margin-bottom: 7px;
  }
  .field > label svg { width: 15px; height: 15px; color: var(--ink-3); }
  .input {
    width: 100%; padding: 12px 14px; border-radius: var(--radius-sm); border: 1.5px solid var(--line-strong);
    background: var(--bg-soft); font-family: inherit; font-size: 14.5px; color: var(--ink); transition: border-color .13s, box-shadow .13s, background .13s;
  }
  .input:focus { outline: none; border-color: var(--brand-orange); background: #fff; box-shadow: 0 0 0 3px rgba(255,107,53,.12); }
  .input::placeholder { color: var(--ink-3); }
  .hint { font-size: 12px; color: var(--ink-3); margin-top: 6px; }
  .row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

  /* Editar perfil */
  .edit-profile-card { padding: 26px 22px; }
  .edit-profile-header { margin-bottom: 22px; }
  .edit-profile-header h1 { margin-bottom: 3px; }
  .avatar-edit-row { display: flex; align-items: center; gap: 16px; margin-bottom: 26px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
  .edit-profile-actions { display: flex; align-items: center; gap: 6px; margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); }
  .btn-save { background: var(--brand-gradient); color: #fff; border: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-family: inherit; font-weight: 700; padding: 14px 40px; font-size: 16px; border-radius: 999px; letter-spacing: .01em; box-shadow: 0 10px 26px rgba(255,107,53,.36), 0 3px 10px rgba(33,150,243,.2); }
  .btn-save svg { width: 20px; height: 20px; }
  .btn-save:hover:not(:disabled) { box-shadow: 0 14px 32px rgba(255,107,53,.46), 0 4px 12px rgba(33,150,243,.26); }
  .flash-error { background: var(--red-bg); color: #9c1538; border: 1px solid rgba(230,30,77,.25); }
  .flash-success { background: var(--green-bg); color: #146641; border: 1px solid rgba(33,176,122,.25); }
  .flash-info { background: var(--amber-bg); color: #7a5106; border: 1px solid rgba(217,142,11,.25); }

  /* Post card */
  .post { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); margin-bottom: 20px; overflow: hidden; box-shadow: var(--shadow-sm); }
  .repost-banner { display: flex; align-items: center; gap: 7px; padding: 10px 16px 0; font-size: 12.5px; color: var(--ink-3); font-weight: 600; }
  .nav-dot { position: absolute; top: 4px; right: 4px; width: 9px; height: 9px; border-radius: 50%; background: var(--red); border: 2px solid var(--surface); }

  /* Notificações */
  .notif-list { display: flex; flex-direction: column; }
  .notif-row { display: flex; align-items: center; gap: 12px; padding: 12px 8px; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
  a.notif-row:hover { background: var(--hover); }
  /* Notificação NOVA (chegou desde a última visita): fundo suave + pontinho.
     As já vistas continuam na lista por 7 dias, sem destaque. */
  .notif-row.notif-new { background: linear-gradient(90deg, rgba(255,107,53,.07), rgba(255,182,39,.05)); border-radius: 10px; }
  .notif-row.notif-new .notif-body > span:first-child::after {
    content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%;
    background: var(--brand-orange); margin-left: 7px; vertical-align: 1px;
  }
  .notif-avatar { width: 46px; height: 46px; flex-shrink: 0; }
  .notif-avatar .post-avatar { width: 46px !important; height: 46px !important; border-radius: 50%; overflow: hidden; display: block; padding: 0 !important; background: none !important; }
  .notif-avatar .post-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 50%; }
  .notif-avatar .avatar-fallback { width: 100%; height: 100%; border-radius: 50%; font-size: 18px; }
  .notif-sys { width: 46px; height: 46px; border-radius: 50%; background: var(--bg-soft); display: flex; align-items: center; justify-content: center; font-size: 20px; }
  .notif-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 14px; color: var(--ink); line-height: 1.35; }
  .notif-body strong { font-weight: 700; }
  .notif-time { font-size: 11.5px; color: var(--ink-3); }
  .notif-thumb { width: 44px; height: 44px; flex-shrink: 0; border-radius: 8px; overflow: hidden; }
  .notif-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

  /* Lista de conversas (messages.php) */
  /* Cabeçalho da página de mensagens */
  .msg-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 4px 4px 18px; }
  .msg-header h1 { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .msg-header-actions { display: flex; gap: 8px; flex-shrink: 0; }
  .msg-action-btn { display: inline-flex; align-items: center; gap: 6px; padding: 10px 16px; font-size: 14px; white-space: nowrap; }
  .msg-action-btn svg { width: 17px; height: 17px; flex-shrink: 0; }

  .convo-list { display: flex; flex-direction: column; }
  .convo-row { display: flex; align-items: center; gap: 13px; padding: 12px 8px; border-bottom: 1px solid var(--line); }
  .convo-row:hover { background: var(--hover); }
  .convo-main { flex: 1; min-width: 0; }
  .convo-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
  .convo-name { font-weight: 700; font-size: 14.5px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .convo-time { font-size: 11.5px; color: var(--ink-3); flex-shrink: 0; }
  .convo-snippet { font-size: 13px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
  .convo-row.unread .convo-snippet { color: var(--ink); font-weight: 600; }
  .convo-you { color: var(--ink-3); font-weight: 400; }
  .convo-badge { flex-shrink: 0; min-width: 20px; height: 20px; border-radius: 999px; background: var(--brand-orange); color: #fff; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; padding: 0 6px; }

  /* Chat (conversation.php) */
  .chat-header { display: flex; align-items: center; gap: 10px; padding: 8px 4px 14px; border-bottom: 1px solid var(--line); margin-bottom: 12px; position: sticky; top: 60px; background: var(--bg); z-index: 5; }
  .chat-back { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--ink-2); flex-shrink: 0; }
  .chat-back:hover { background: var(--hover); }
  .chat-back svg { width: 20px; height: 20px; }
  .chat-peer { display: flex; align-items: center; gap: 10px; min-width: 0; }
  .chat-peer-name { font-weight: 700; font-size: 15px; color: var(--ink); }
  .chat-thread { display: flex; flex-direction: column; gap: 6px; min-height: 300px; max-height: calc(100vh - 260px); overflow-y: auto; padding: 4px 2px; -webkit-overflow-scrolling: touch; }
  .chat-empty { text-align: center; margin: auto; padding: 30px 20px; }
  .chat-msg { display: flex; }
  .chat-msg.mine { justify-content: flex-end; }
  .chat-bubble { max-width: 76%; padding: 8px 13px 6px; border-radius: 18px; font-size: 15px; line-height: 1.4; background: var(--surface); border: 1px solid var(--line); color: var(--ink); word-wrap: break-word; }
  .chat-msg.mine .chat-bubble { background: var(--brand-gradient); color: #fff; border: none; }
  .chat-text { display: inline; }
  .chat-time { display: block; text-align: right; font-size: 10.5px; margin-top: 3px; color: var(--ink-3); opacity: .75; }
  .chat-msg.mine .chat-time { color: #fff; opacity: .8; }
  /* Separador de dia (Hoje / Ontem / data) */
  .chat-day { text-align: center; margin: 14px 0 8px; }
  .chat-day span { font-size: 11px; font-weight: 700; color: var(--ink-3); background: var(--bg-soft); padding: 3px 12px; border-radius: 999px; }
  /* Hora + confirmação de leitura */
  .chat-meta { display: flex; align-items: center; justify-content: flex-end; gap: 3px; margin-top: 3px; }
  .chat-meta .chat-time { margin-top: 0; }
  .chat-check { display: inline-flex; width: 15px; height: 12px; color: #fff; opacity: .7; }
  .chat-check svg { width: 15px; height: 12px; }
  .chat-check.read { opacity: 1; color: #8FE3FF; }
  .chat-compose { display: flex; align-items: flex-end; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
  .chat-compose textarea {
    flex: 1; resize: none; border: 1.5px solid var(--line-strong); background: var(--bg-soft);
    border-radius: 20px; padding: 10px 15px; font-family: inherit; font-size: 15px;
    line-height: 1.4; color: var(--ink); max-height: 120px;
    -webkit-text-size-adjust: 100%; text-size-adjust: 100%;
  }
  .chat-compose textarea:focus { outline: none; border-color: var(--brand-orange); background: #fff; }
  .chat-compose textarea::placeholder { color: var(--ink-3); }
  .chat-send { flex-shrink: 0; width: 44px; height: 44px; border-radius: 50%; border: none; background: var(--brand-gradient); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; }
  .chat-send svg { width: 20px; height: 20px; }
  .chat-send:hover { filter: saturate(1.1); }

  /* ----------------------------------------------------------------
     No CELULAR, o chat vira uma tela dedicada de altura dinâmica.
     Fallback robusto: primeiro 100vh (funciona em qualquer telefone),
     depois 100dvh (navegadores modernos: encolhe quando o teclado
     abre, mantendo o campo de escrita visível acima do teclado).
     Assim o campo NUNCA some, mesmo em telefones/navegadores antigos.
     ---------------------------------------------------------------- */
  @media (max-width: 720px) {
    body.chat-page { overflow: hidden; }
    body.chat-page .app-main,
    body.chat-page main { padding: 0; }
    .chat-screen {
      position: fixed;
      left: 0; right: 0;
      top: 52px;                          /* altura da barra fixa no celular */
      height: calc(100vh - 52px);         /* fallback universal */
      height: calc(100dvh - 52px);        /* moderno: encolhe com o teclado */
      display: flex;
      flex-direction: column;
      background: var(--bg);
      max-width: 640px;
      margin: 0 auto;
      overflow: hidden;                   /* garante que só o thread rola */
    }
    .chat-screen .chat-header {
      position: static; top: auto; margin: 0;
      padding: 10px 14px; flex-shrink: 0;
    }
    .chat-screen .chat-thread {
      flex: 1 1 auto; min-height: 0; max-height: none;
      overflow-y: auto;
      padding: 10px 14px;
    }
    .chat-screen .chat-compose {
      flex-shrink: 0; margin: 0;
      padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
      background: var(--surface);
      border-top: 1px solid var(--line);
    }
  }
  .repost-banner svg { width: 14px; height: 14px; color: var(--green); flex-shrink: 0; }
  .repost-banner a { color: var(--ink-2); font-weight: 700; }
  .repost-banner a:hover { color: var(--ink); }
  .post-header { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
  .post-avatar { width: 42px; height: 42px; border-radius: 50%; padding: 2px; background: var(--brand-gradient); flex-shrink: 0; }
  .post-avatar img { width: 100%; height: 100%; border-radius: 50%; border: 2px solid var(--surface); object-fit: cover; display: block; }
  .post-meta { flex: 1; min-width: 0; overflow: hidden; }
  .post-name { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-weight: 700; color: var(--ink); font-size: 14px; min-width: 0; }
  /* Nome longo NUNCA passa por cima do botão Seguir/Seguindo: o link do
     nome encolhe com reticências dentro do espaço disponível. */
  .post-name > a { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
  .verified { color: var(--brand-blue); display: inline-flex; flex-shrink: 0; }
  .gender-pill { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; font-weight: 600; background: var(--bg-soft); color: var(--ink-2); padding: 2px 8px 2px 6px; border-radius: 999px; }
  .gender-pill .gender-ico { display: block; flex-shrink: 0; border-radius: 50%; box-shadow: 0 0 0 1.5px rgba(255,255,255,.7); }

  /* Seletor de gênero por chips coloridos (edit-profile) */
  .gender-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
  .gender-chip {
    display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px; border-radius: 999px;
    border: 1.5px solid var(--line-strong); background: var(--bg-soft); color: var(--ink-2);
    font-family: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; transition: all .13s;
  }
  .gender-chip:hover { border-color: var(--ink-3); background: var(--hover); }
  .gender-chip.active { border-color: var(--brand-orange); background: #fff; color: var(--ink); box-shadow: 0 0 0 3px rgba(255,107,53,.14); }
  .gender-chip .gender-ico { flex-shrink: 0; border-radius: 50%; box-shadow: 0 0 0 1.5px rgba(255,255,255,.7); }
  .gender-chip .chip-none { width: 16px; height: 16px; border-radius: 50%; border: 1.5px dashed var(--ink-3); flex-shrink: 0; }
  .gender-chip .chip-edit { width: 16px; height: 16px; display: flex; align-items: center; justify-content: center; font-size: 12px; color: var(--brand-orange); flex-shrink: 0; }
  .post-sub { font-size: 12px; color: var(--ink-3); display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 1px; min-width: 0; }
  .post-sub > * { white-space: nowrap; }
  .post-sub .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--ink-3); opacity: .5; flex-shrink: 0; }
  .post-media { width: 100%; background: var(--bg-soft); position: relative; overflow: hidden; }
  .carousel-track { display: flex; align-items: flex-start; transition: transform .25s ease; }
  .carousel-track img { width: 100%; flex-shrink: 0; display: block; height: auto; }
  .carousel-arrow {
    position: absolute; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border-radius: 50%;
    background: rgba(20,20,27,.55); color: #fff; border: none; display: flex; align-items: center; justify-content: center; cursor: pointer;
  }
  .carousel-arrow svg { width: 18px; height: 18px; }
  .carousel-arrow.prev { left: 10px; }
  .carousel-arrow.next { right: 10px; }
  .carousel-dots { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); display: flex; gap: 5px; }
  .carousel-dots .dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.55); }
  .carousel-dots .dot.active { background: #fff; }
  /* Contador de fotos no canto superior (ex.: 1/30) */
  .carousel-counter { position: absolute; top: 12px; right: 12px; z-index: 3; background: rgba(20,20,27,.72); color: #fff; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; letter-spacing: .3px; backdrop-filter: blur(3px); pointer-events: none; }
  .post-actions { display: flex; align-items: center; padding: 10px 14px 4px; gap: 2px; }
  .action-stat { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 10px; color: var(--ink-2); font-size: 13px; font-weight: 600; }
  .action-stat svg { width: 21px; height: 21px; }
  button.action-stat { border: none; background: none; cursor: pointer; font-family: inherit; transition: all .12s; }
  button.action-stat:hover { background: var(--hover); }
  button.action-stat.liked { color: var(--red); }
  button.action-stat.liked svg { fill: var(--red); }
  .follow-btn-sm {
    margin-left: auto; background: var(--ink); color: var(--bg); border: none; cursor: pointer;
    font-weight: 700; font-size: 12.5px; padding: 7px 14px; border-radius: 999px; font-family: inherit;
    flex-shrink: 0; white-space: nowrap; /* o botão nunca é esmagado nem invadido pelo nome */
  }
  .follow-btn-sm.following { background: var(--bg-soft); color: var(--ink-2); border: 1px solid var(--line-strong); }
  .post-menu { position: relative; margin-left: 8px; }
  .post-menu-btn { width: 34px; height: 34px; border: none; background: none; border-radius: 50%; color: var(--ink-3); cursor: pointer; display: flex; align-items: center; justify-content: center; }
  .post-menu-btn:hover { background: var(--hover); color: var(--ink); }
  .post-menu-btn svg { width: 20px; height: 20px; }
  .post-menu-drop {
    position: absolute; top: 40px; right: 0; z-index: 30; min-width: 190px;
    background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
    box-shadow: var(--shadow-md); padding: 6px; display: none;
  }
  .post-menu-drop.open { display: block; }
  .post-menu-item {
    display: flex; align-items: center; gap: 10px; width: 100%; border: none; background: none;
    padding: 10px 12px; border-radius: 8px; font-family: inherit; font-size: 14px; font-weight: 600;
    color: var(--ink-2); cursor: pointer; text-align: left;
  }
  .post-menu-item:hover { background: var(--hover); }
  .post-menu-item svg { width: 18px; height: 18px; flex-shrink: 0; }
  .post-menu-item.danger { color: var(--red); }
  .post-menu-item.danger:hover { background: var(--red-bg); }
  .post-body { padding: 6px 16px 16px; }
  .caption { font-size: 14px; color: var(--ink); line-height: 1.55; }
  .caption .uname { font-weight: 700; }
  .caption .tag { color: var(--brand-blue); font-weight: 500; }
  .post-time { font-size: 11px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; margin-top: 9px; font-weight: 600; }

  /* Empty state */
  .empty-state { text-align: center; padding: 70px 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
  .empty-state .ico { font-size: 38px; margin-bottom: 14px; }
  .empty-state h2 { font-size: 19px; margin-bottom: 8px; }
  .empty-state p { color: var(--ink-3); font-size: 14px; max-width: 380px; margin: 0 auto; }

  .load-more { display: block; text-align: center; padding: 13px; margin-top: 4px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); font-weight: 700; font-size: 13.5px; color: var(--ink-2); }
  .load-more:hover { background: var(--hover); }

  /* Feed infinito: sentinela + indicador de carregamento */
  .feed-sentinel { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 22px 0 10px; color: var(--ink-3); font-size: 13px; font-weight: 600; }
  .feed-sentinel .feed-spin {
    width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0;
    border: 2.5px solid var(--line-strong); border-top-color: var(--brand-orange);
    animation: brand-spin .7s linear infinite;
  }
  .feed-end { text-align: center; padding: 26px 0 8px; color: var(--ink-3); font-size: 13px; font-weight: 600; }

  /* Comentários (post.php) */
  .comments-list { border-top: 1px solid var(--line); margin-top: 4px; }
  .comment-row { display: flex; gap: 10px; padding: 12px 16px; align-items: flex-start; }
  /* Páginas dedicadas de confirmação (excluir) e denúncia */
  .confirm-card { max-width: 460px; margin: 0 auto; padding: 28px 24px; text-align: center; }
  .confirm-card h1 { font-size: 20px; margin: 0 0 8px; }
  .confirm-card .muted { font-size: 14px; line-height: 1.6; }
  .confirm-icon { width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 14px; }
  .confirm-icon svg { width: 28px; height: 28px; }
  .confirm-icon.danger { background: var(--red-bg); color: var(--red); }
  .confirm-icon.ok { background: #E5F6EE; color: var(--green); }
  .confirm-icon.share { background: #E7F1FB; color: var(--brand-blue); }
  .loc-ico-badge { width: 40px; height: 40px; border-radius: 50%; background: var(--bg-soft); color: var(--brand-orange); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
  .loc-ico-badge svg { width: 20px; height: 20px; }
  .chat-trash-btn { margin-left: auto; display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; color: var(--ink-3); flex-shrink: 0; }
  .chat-trash-btn:hover { background: #FDECEF; color: var(--red); }
  .chat-trash-btn svg { width: 19px; height: 19px; }
  .chat-msg.mine .chat-bubble { cursor: pointer; }
  .chat-msg.mine .chat-bubble:hover { filter: brightness(.96); }
  .upl-list { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
  .upl-row { display: flex; align-items: center; gap: 9px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; font-size: 13px; cursor: pointer; }
  .upl-row.is-cover { border-color: var(--brand-orange); }
  .upl-num { color: var(--ink-3); min-width: 22px; flex-shrink: 0; }
  .upl-thumb { width: 36px; height: 36px; border-radius: 8px; object-fit: cover; flex-shrink: 0; background: var(--hover); display: block; }
  .upl-size { color: var(--ink-3); font-size: 11.5px; flex-shrink: 0; }
  .upl-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .upl-status { flex-shrink: 0; font-weight: 700; font-size: 12px; }
  .upl-status.ok { color: var(--brand-green); }
  .upl-status.err { color: var(--red); }
  .upl-status.wait { color: var(--ink-3); font-weight: 500; }
  .upl-cover-tag { background: var(--brand-orange); color: #fff; font-size: 10px; font-weight: 800; padding: 2px 8px; border-radius: 999px; flex-shrink: 0; }
  .upl-rm { background: none; border: none; color: var(--ink-3); cursor: pointer; font-size: 17px; line-height: 1; padding: 2px 4px; flex-shrink: 0; }
  .upl-rm:hover { color: var(--red); }
  .upl-last { margin-top: 12px; display: flex; align-items: center; gap: 10px; }
  .upl-last img { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; border: 1px solid var(--line); }
  .upl-last span { font-size: 12.5px; color: var(--brand-green); font-weight: 600; }
  /* Barra de convite para visitantes (não logados) */
  .guest-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center; gap: 14px; padding: 13px 18px; flex-wrap: wrap; box-shadow: 0 -4px 20px rgba(20,20,27,.18); }
  .guest-bar span { font-size: 13.5px; font-weight: 600; }
  .guest-bar-btn { background: var(--brand-gradient); color: #fff; font-weight: 700; font-size: 13.5px; padding: 8px 18px; border-radius: 999px; text-decoration: none; white-space: nowrap; }
  .confirm-thumb { width: 120px; height: 120px; border-radius: 12px; overflow: hidden; margin: 16px auto; background: var(--bg-soft); }
  .confirm-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .confirm-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 22px; align-items: stretch; }
  .btn-danger { background: var(--red); color: #fff; border: none; padding: 13px 20px; border-radius: var(--radius); font-family: inherit; font-weight: 700; font-size: 15px; cursor: pointer; text-align: center; }
  .btn-danger:hover { filter: brightness(0.95); }
  .report-reasons { display: flex; flex-direction: column; gap: 8px; text-align: left; margin-top: 8px; }
  .report-option { display: flex; align-items: center; gap: 11px; padding: 13px 15px; border: 1.5px solid var(--line-strong); border-radius: var(--radius); cursor: pointer; font-size: 14px; transition: all .12s; }
  .report-option:hover { background: var(--hover); }
  .report-option input { accent-color: var(--brand-orange); width: 17px; height: 17px; flex-shrink: 0; }
  .report-option input:checked ~ span { font-weight: 700; }
  .report-option:has(input:checked) { border-color: var(--brand-orange); background: #fff; box-shadow: 0 0 0 3px rgba(255,107,53,.12); }
  .edit-photos-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .edit-photo { position: relative; width: 100%; padding-bottom: 100%; border-radius: 10px; overflow: hidden; background: var(--bg-soft); }
  .edit-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
  .edit-photo-del { position: absolute; top: 6px; right: 6px; z-index: 2; width: 28px; height: 28px; border-radius: 50%; border: none; background: rgba(20,20,27,.55); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; backdrop-filter: blur(2px); transition: background .12s; }
  .edit-photo-del:hover { background: var(--red); }
  .edit-photo-del svg { width: 14px; height: 14px; }
  .comment-del { margin-left: auto; flex-shrink: 0; background: none; border: none; color: var(--ink-3); cursor: pointer; padding: 4px; border-radius: 6px; opacity: .6; transition: all .12s; }
  .comment-del:hover { color: var(--red); background: var(--red-bg); opacity: 1; }
  .comment-del svg { width: 15px; height: 15px; display: block; }
  .action-stat.reposted { color: var(--green); }
  .action-stat.reposted svg { stroke: var(--green); }
  .action-report:hover { color: var(--red); }
  .comment-row .post-avatar { width: 30px; height: 30px; }
  .comment-row .body { flex: 1; min-width: 0; font-size: 13.5px; line-height: 1.45; }
  .comment-row .uname { font-weight: 700; margin-right: 5px; }
  .comment-row .time { display: block; font-size: 11px; color: var(--ink-3); margin-top: 3px; }
  .comment-form { display: flex; gap: 10px; padding: 14px 16px; border-top: 1px solid var(--line); }
  .comment-form input[type=text] {
    flex: 1; border: none; outline: none; background: none; font: inherit; font-size: 14px; color: var(--ink);
  }
  .comment-form button { border: none; background: none; color: var(--brand-blue); font-weight: 700; font-size: 13.5px; cursor: pointer; font-family: inherit; }
  .comment-form button:disabled { color: var(--ink-3); cursor: default; }
  .sensitive-cover {
    position: absolute; inset: 0; background: rgba(20,20,27,.85); backdrop-filter: blur(20px);
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: #fff; text-align: center; padding: 20px;
  }
  .sensitive-cover button { background: #fff; color: var(--ink); border: none; border-radius: 999px; padding: 9px 18px; font-weight: 700; font-size: 13px; cursor: pointer; font-family: inherit; }

  /* Perfil (profile.php) */
  /* Capa do perfil: banner com o degradê da marca; o avatar "flutua"
     sobre a capa com anel branco — visual moderno, mesma identidade. */
  .profile-cover {
    height: 118px; margin: -20px -4px 0; border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    background: var(--brand-gradient); background-size: 180% 180%;
    position: relative; overflow: hidden;
  }
  .profile-cover::after {
    content: ""; position: absolute; inset: 0;
    background:
      radial-gradient(circle at 82% 18%, rgba(255,255,255,.28) 0, transparent 34%),
      radial-gradient(circle at 12% 85%, rgba(255,255,255,.16) 0, transparent 30%),
      linear-gradient(180deg, rgba(20,20,27,0) 55%, rgba(20,20,27,.16) 100%);
  }
  .profile-head { display: flex; gap: 18px; padding: 0 12px 26px; align-items: flex-start; flex-wrap: wrap; position: relative; }
  .profile-head .post-avatar {
    width: 92px; height: 92px; flex-shrink: 0; margin-top: -40px;
    background: var(--surface); box-shadow: 0 4px 14px rgba(20,20,27,.14);
  }
  .profile-head .post-avatar img { border-width: 3px; }
  .profile-head .post-avatar .avatar-fallback { font-size: 30px; border: 3px solid var(--surface); }
  .profile-info { padding-top: 10px; }
  @media (max-width: 480px) {
    .profile-cover { height: 96px; }
    .profile-head { gap: 14px; row-gap: 8px; }
    .profile-head .post-avatar { width: 80px; height: 80px; margin-top: -34px; }
    /* CORREÇÃO (celular): o bloco de informações ocupa a LARGURA TODA do
       cartão, abaixo do avatar. Antes ele ficava espremido ao lado do
       avatar e as palavras "publicações / seguidores / seguindo" (com
       white-space:nowrap) transbordavam umas sobre as outras.
       Usamos ".profile-head .profile-info" (2 classes) porque as regras
       base ".profile-info { flex:1 }" e ".profile-stats { max-width }"
       aparecem DEPOIS neste arquivo — a especificidade maior garante que
       a versão de celular vença, independentemente da ordem. */
    .profile-head .profile-info { flex: 1 1 100%; min-width: 0; padding-top: 2px; }
    .profile-head .profile-stats { max-width: none; width: 100%; gap: 6px; margin: 12px 0; }
    .profile-head .profile-stats .stat b { font-size: 16px; }
    .profile-head .profile-stats .stat span { font-size: 11px; letter-spacing: -0.1px; }
  }
  /* Telas minúsculas (~320px): reduz mais um pouco para nunca encostar. */
  @media (max-width: 340px) {
    .profile-head .profile-stats .stat span { font-size: 10px; }
    .profile-head .profile-stats .stat b { font-size: 15px; }
  }
  .profile-info { flex: 1; min-width: 0; }
  .profile-handle { color: var(--ink-3); font-size: 13.5px; margin-top: 2px; word-break: break-word; }
  .profile-stats { display: flex; gap: 8px; margin: 14px 0; max-width: 380px; }
  .profile-stats .stat { flex: 1; min-width: 0; text-align: center; }
  .profile-stats .stat b { display: block; font-size: 17px; color: var(--ink); font-family: 'Bricolage Grotesque', sans-serif; line-height: 1.1; white-space: nowrap; }
  .profile-stats .stat span { font-size: 11.5px; color: var(--ink-3); white-space: nowrap; }
  .profile-stats .stat-link { text-decoration: none; border-radius: 10px; transition: background .12s; }
  .profile-stats .stat-link:hover { background: var(--hover); }

  /* Lista de pessoas (follows.php) */
  .follows-head { display: flex; align-items: center; gap: 10px; padding: 4px 4px 14px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
  .follows-tabs { display: flex; gap: 16px; margin-top: 4px; }
  .follows-tabs a { font-size: 13.5px; font-weight: 700; color: var(--ink-3); padding-bottom: 2px; }
  .follows-tabs a.active { color: var(--ink); border-bottom: 2px solid var(--brand-orange); }
  .people-list { display: flex; flex-direction: column; }
  .person-row { display: flex; align-items: center; gap: 10px; padding: 10px 6px; border-bottom: 1px solid var(--line); }
  .person-link { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
  .person-info { min-width: 0; }
  .person-name { font-weight: 700; font-size: 14.5px; color: var(--ink); display: flex; align-items: center; gap: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .person-handle { font-size: 12.5px; color: var(--ink-3); }

  /* Nova conversa (messages.php) */
  .new-convo-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 16px; }
  .new-convo-results { margin-top: 10px; display: flex; flex-direction: column; gap: 2px; }
  .new-convo-empty { padding: 12px; text-align: center; color: var(--ink-3); font-size: 13.5px; }
  .nc-row { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 10px; }
  .nc-row:hover { background: var(--hover); }
  .nc-av { width: 40px; height: 40px; border-radius: 50%; overflow: hidden; flex-shrink: 0; }
  .nc-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .nc-av .nc-fb { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: var(--brand-gradient); color: #fff; font-weight: 700; font-size: 17px; }
  .nc-info { display: flex; flex-direction: column; min-width: 0; }
  .nc-name { font-weight: 700; font-size: 14px; color: var(--ink); }
  .nc-handle { font-size: 12.5px; color: var(--ink-3); }
  .profile-bio { font-size: 14px; color: var(--ink-2); white-space: pre-line; margin: 4px 0 14px; }
  /* ------------------------------------------------------------------
     Link do perfil — só a palavra "Link" com um ícone. SEM balão.
     Antes era uma pílula com fundo e contorno, que pesava ao lado da bio
     e competia com os botões de ação. Agora é um link limpo, alinhado à
     esquerda com o @usuário e a bio, com sublinhado só ao passar o mouse.
     O endereço continua escondido (o clique passa por /link-externo).
     ------------------------------------------------------------------ */
  .profile-link {
    display: inline-flex; align-items: center; gap: 7px;
    /* Azul um pouco mais fechado que o --brand-blue: o tom da marca não
       alcança o contraste mínimo de leitura (4,5:1) em texto pequeno. */
    color: #1671C5; font-weight: 600; font-size: 13.5px; line-height: 1;
    text-decoration: none; margin: 0 0 12px;
    padding: 5px 0; max-width: 100%;
    position: relative;
  }
  /* Alvo de toque de ~44px de altura SEM mexer no desenho: a área
     clicável cresce por fora, com um pseudo-elemento invisível. */
  .profile-link::after {
    content: ''; position: absolute;
    left: -8px; right: -8px; top: -9px; bottom: -9px;
  }
  /* Com bio: encosta o link logo abaixo dela (a bio já reserva 14px). */
  .profile-bio + .profile-link { margin-top: -5px; }
  .profile-link .ico {
    width: 15px; height: 15px; flex: 0 0 15px;
    display: block; opacity: .92;
  }
  .profile-link .txt {
    border-bottom: 1.5px solid transparent;
    padding-bottom: 1px;
    transition: border-color .14s ease, color .14s ease;
  }
  .profile-link:hover .txt,
  .profile-link:focus-visible .txt { border-bottom-color: currentColor; }
  .profile-link:active { opacity: .7; }
  .profile-link:focus-visible {
    outline: 2px solid #1671C5; outline-offset: 4px; border-radius: 4px;
  }
  /* Quem não tem bio: o link encosta nos números logo acima. Um respiro. */
  .profile-stats + .profile-link { margin-top: 2px; }
  .post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
  .post-grid a { display: block; position: relative; aspect-ratio: 1 / 1; background: var(--bg-soft); overflow: hidden; border-radius: 6px; }
  .post-grid img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .private-notice { text-align: center; padding: 60px 20px; }

  /* Estatísticas (stats.php) */
  .stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
  @media (max-width: 560px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
  }
  .stat-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 12px; text-align: center; }
  .stat-ico { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; margin: 0 auto 10px; }
  .stat-ico svg { width: 21px; height: 21px; }
  .stat-card b { display: block; font-family: 'Bricolage Grotesque', sans-serif; font-size: 22px; color: var(--ink); line-height: 1.1; }
  .stat-card span { font-size: 11.5px; color: var(--ink-3); }
  .stats-row { display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
  .stats-mini { flex: 1; min-width: 150px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
  .stats-mini .label { display: block; font-size: 12px; color: var(--ink-3); margin-bottom: 4px; }
  .stats-mini .value { font-family: 'Bricolage Grotesque', sans-serif; font-size: 20px; font-weight: 700; color: var(--ink); }
  .top-post-card { display: flex; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; align-items: center; }
  .top-post-card img { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; flex-shrink: 0; }
  .top-post-info { flex: 1; min-width: 0; }
  .top-post-info .cap { margin: 0 0 6px; font-size: 14px; color: var(--ink); }
  .top-post-stats { display: flex; gap: 14px; font-size: 13px; color: var(--ink-2); font-weight: 600; }
  .icon-btn { width: 34px; height: 34px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--bg-soft); color: var(--ink-2); display: inline-flex; align-items: center; justify-content: center; }
  .icon-btn:hover { background: var(--hover); color: var(--ink); }
  .icon-btn svg { width: 18px; height: 18px; }

  .status-deactivated { background: var(--bg-soft); color: var(--ink-3); }
  .role-pill { font-size: 10.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--brand-gradient); color: #fff; }
  .reason-pill { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--red-bg); color: #9c1538; text-transform: capitalize; }

  /* Registro de atividade (aba Atividade & IPs) */
  .activity-table { display: flex; flex-direction: column; }
  .activity-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
  .activity-row:hover { background: var(--hover); }
  .activity-main { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; min-width: 0; }
  .activity-user a { font-weight: 700; color: var(--ink); }
  .activity-action { color: var(--ink-2); }
  .activity-target { color: var(--ink-3); font-size: 12px; background: var(--bg-soft); padding: 1px 7px; border-radius: 6px; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .activity-meta { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
  .activity-ip { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 12px; color: var(--ink); background: var(--bg-soft); padding: 2px 8px; border-radius: 6px; }
  .activity-time { font-size: 11.5px; color: var(--ink-3); white-space: nowrap; }
  @media (max-width: 560px) {
    .activity-row { flex-direction: column; align-items: flex-start; gap: 5px; }
    .activity-meta { gap: 10px; }
  }

  @media (max-width: 480px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .row-2 { grid-template-columns: 1fr; gap: 0; }
  }

  /* Rodapé da área logada — MESMO estilo do rodapé das telas de entrada:
     uma linha discreta com o essencial (Sobre · Termos · Privacidade · ©). */
  .site-footer.mini-footer {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    flex-wrap: nowrap; white-space: nowrap;
    margin: 40px auto 24px; font-size: 11px; color: var(--ink-3);
  }
  .site-footer.mini-footer a { color: var(--ink-3); font-weight: 600; text-decoration: none; }
  .site-footer.mini-footer a:hover { color: var(--ink-2); text-decoration: underline; }
  @media (max-width: 340px) { .site-footer.mini-footer { font-size: 10px; gap: 6px; } }

  .trending-strip { margin: 0 0 14px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
  .trending-label { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; font-size: 12px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em; }
  .trending-tags { display: flex; gap: 8px; overflow-x: auto; margin-top: 8px; padding-bottom: 2px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .trending-tags::-webkit-scrollbar { display: none; }
  .trending-tags a { flex-shrink: 0; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 999px; padding: 6px 13px; font-size: 13px; font-weight: 600; color: var(--brand-blue); white-space: nowrap; }
  .trending-tags a:hover { background: var(--hover); }

  /* Busca (search.php) */
  .search-field {
    display: flex; align-items: center; gap: 10px; background: var(--bg-soft);
    border: 1.5px solid var(--line-strong); border-radius: 999px; padding: 11px 16px;
  }
  .search-field svg { width: 18px; height: 18px; color: var(--ink-3); flex-shrink: 0; }
  .search-field input { flex: 1; border: none; outline: none; background: none; font: inherit; font-size: 14.5px; color: var(--ink); }
  .search-row { display: flex; align-items: center; gap: 12px; padding: 11px 10px; border-radius: 10px; }
  .search-row:hover { background: var(--hover); }
  .search-row-rank { width: 26px; flex-shrink: 0; font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; color: var(--ink-3); font-size: 13px; }
  .search-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 0 4px; }
  .search-tabs a { flex: 1; text-align: center; padding: 11px 0; font-size: 14px; font-weight: 700; color: var(--ink-3); border-bottom: 2px solid transparent; margin-bottom: -1px; }
  .search-tabs a.active { color: var(--ink); border-bottom-color: var(--brand-orange); }

  /* Upload de fotos (create-post.php) */
  .dropzone {
    border: 2px dashed var(--line-strong); border-radius: var(--radius); padding: 30px 20px;
    text-align: center; cursor: pointer; transition: all .15s; background: var(--bg-soft);
  }
  .dropzone.dragover { border-color: var(--brand-orange); background: rgba(255,107,53,.08); }
  .dropzone .ico { font-size: 28px; margin-bottom: 8px; }
  .dropzone p { margin: 0; font-size: 13.5px; color: var(--ink-2); }
  .dropzone .browse { color: var(--brand-orange); font-weight: 700; text-decoration: underline; }
  .photo-previews { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
  .photo-previews .thumb { position: relative; width: 84px; height: 84px; border-radius: 10px; overflow: hidden; background: var(--bg-soft); cursor: pointer; box-shadow: 0 0 0 2px transparent; transition: box-shadow .12s; }
  .photo-previews .thumb.is-cover { box-shadow: 0 0 0 3px var(--brand-orange); }
  .photo-previews .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .photo-previews .thumb .cover-badge {
    position: absolute; bottom: 0; left: 0; right: 0; background: var(--brand-orange); color: #fff;
    font-size: 10px; font-weight: 700; text-align: center; padding: 2px 0; letter-spacing: .03em;
  }
  .photo-previews .thumb .thumb-remove {
    position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border-radius: 50%;
    background: rgba(20,20,27,.7); color: #fff; border: none; cursor: pointer; font-size: 13px;
    display: flex; align-items: center; justify-content: center; line-height: 1; padding: 0;
  }
  .photo-previews .thumb.done img { opacity: 1; }
  .photo-previews .thumb:not(.done):not(.failed) img { opacity: .55; }
  .photo-previews .thumb.failed { box-shadow: 0 0 0 2px var(--red); }
  .photo-previews .thumb.failed img { opacity: .4; }
  .thumb-spin {
    position: absolute; top: 50%; left: 50%; width: 20px; height: 20px; margin: -10px 0 0 -10px;
    border: 2.5px solid rgba(255,255,255,.5); border-top-color: #fff; border-radius: 50%;
    animation: brand-spin .7s linear infinite;
  }
  @keyframes brand-spin { to { transform: rotate(360deg); } }
  .dup-badge {
    position: absolute; top: 3px; left: 3px; background: var(--amber); color: #fff;
    font-size: 9.5px; font-weight: 700; padding: 2px 5px; border-radius: 5px;
  }
  .upload-progress { margin-top: 12px; }
  .upload-bar { height: 6px; background: var(--bg-soft); border-radius: 999px; overflow: hidden; }
  .upload-bar-fill { height: 100%; width: 0; background: var(--brand-gradient); transition: width .25s ease; }
  .upload-status { display: block; margin-top: 6px; font-size: 12.5px; color: var(--ink-3); font-weight: 600; }
  .loc-row { display: flex; align-items: center; gap: 8px; background: var(--bg-soft); border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm); padding: 9px 11px; }
  .loc-row .loc-pin { width: 18px; height: 18px; color: var(--ink-3); flex-shrink: 0; }
  .loc-row input { flex: 1; border: none; outline: none; background: none; font: inherit; font-size: 14.5px; color: var(--ink); min-width: 0; }
  .loc-gps { flex-shrink: 0; width: 34px; height: 34px; border: none; background: var(--surface); border-radius: 8px; color: var(--brand-blue); cursor: pointer; display: flex; align-items: center; justify-content: center; }
  .loc-gps svg { width: 18px; height: 18px; }
  .loc-gps:hover { background: var(--hover); }
  .loc-gps.loading { opacity: .5; pointer-events: none; }
  .loc-gps.loading svg { animation: brand-spin 1s linear infinite; }
  .avatar-upload { position: relative; width: 84px; height: 84px; flex-shrink: 0; cursor: pointer; }
  .avatar-upload .edit-badge {
    position: absolute; bottom: -2px; right: -2px; width: 26px; height: 26px; border-radius: 50%;
    background: var(--brand-gradient); color: #fff; display: flex; align-items: center; justify-content: center;
    border: 2px solid var(--surface);
  }
  .avatar-upload .edit-badge svg { width: 13px; height: 13px; }

  @media (max-width: 480px) {
    .topbar-inner { padding: 10px 10px; gap: 0; }
    .page { padding: 66px 12px 70px; }
    /* Encolhe a barra para caber TODOS os ícones + o botão Sair no celular. */
    .topbar-nav { gap: 0; }
    .tn-item { width: 34px; height: 34px; border-radius: 9px; }
    .tn-item svg { width: 19px; height: 19px; }
    .avatar-btn { width: 30px; height: 30px; margin-left: 2px; }
    .signout-link { width: 30px; height: 30px; margin-left: 2px; }
    .signout-link svg { width: 17px; height: 17px; }
    .wordmark { height: 26px; margin-right: 2px; }
  }
  /* Telas muito estreitas (ex.: iPhone SE 320px): aperta ainda mais. */
  @media (max-width: 360px) {
    .tn-item { width: 30px; height: 30px; }
    .tn-item svg { width: 18px; height: 18px; }
    .wordmark { height: 24px; }
  }

  /* ================================================================
     ENGAJAMENTO & RETENÇÃO DO FEED
     Selos de origem, sequência diária, pílula de novidades, coração
     de toque duplo, pull-to-refresh e entrada suave dos cards.
     ================================================================ */

  /* Pílula flutuante "novidades no feed" (recompensa variável ao voltar) */
  .new-pill {
    position: fixed; top: 70px; left: 50%; transform: translateX(-50%) translateY(-30px);
    z-index: 90; background: var(--ink); color: #fff; border: none; cursor: pointer;
    font-family: inherit; font-weight: 800; font-size: 13px; padding: 10px 18px;
    border-radius: 999px; box-shadow: 0 10px 30px rgba(20,20,27,.35);
    display: flex; align-items: center; gap: 7px; opacity: 0; pointer-events: none;
    transition: transform .35s cubic-bezier(.2,1.4,.4,1), opacity .3s;
  }
  .new-pill.show { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }
  .new-pill .np-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand-amber); animation: np-blink 1.1s ease infinite; }
  @keyframes np-blink { 50% { opacity: .35; } }

  /* Coração do toque duplo na foto (estilo grandes redes) */
  .post-media .dbl-heart {
    position: absolute; top: 50%; left: 50%; width: 96px; height: 96px;
    margin: -48px 0 0 -48px; pointer-events: none; z-index: 4;
    color: #fff; filter: drop-shadow(0 6px 22px rgba(230,30,77,.55));
    opacity: 0; transform: scale(.3);
  }
  .post-media .dbl-heart.burst { animation: heart-burst .9s cubic-bezier(.2,1.5,.4,1) forwards; }
  @keyframes heart-burst {
    0% { opacity: 0; transform: scale(.3); }
    18% { opacity: 1; transform: scale(1.12) rotate(-4deg); }
    38% { transform: scale(.96) rotate(2deg); }
    58% { opacity: 1; transform: scale(1); }
    100% { opacity: 0; transform: scale(1.25) translateY(-14px); }
  }
  button.action-stat.like-pop svg { animation: like-pop .45s cubic-bezier(.2,1.6,.4,1); }
  @keyframes like-pop { 0% { transform: scale(1); } 40% { transform: scale(1.45); } 100% { transform: scale(1); } }

  /* Puxar para atualizar (celular) */
  .ptr-indicator {
    position: fixed; top: 62px; left: 50%; z-index: 95;
    width: 40px; height: 40px; margin-left: -20px; border-radius: 50%;
    background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-md);
    display: flex; align-items: center; justify-content: center;
    transform: translateY(-64px); transition: transform .2s ease; will-change: transform;
  }
  .ptr-indicator svg { width: 20px; height: 20px; color: var(--brand-orange); transition: transform .15s; }
  .ptr-indicator.spin svg { animation: brand-spin .7s linear infinite; }

  /* Entrada suave dos cards do feed (novos e anexados pelo scroll) */
  #feed-list .post { animation: post-in .38s ease both; }
  @keyframes post-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
  @media (prefers-reduced-motion: reduce) {
    #feed-list .post, .post-media .dbl-heart.burst,
    button.action-stat.like-pop svg { animation: none !important; }
  }

/* ========================= SEÇÃO 2 — AUDITORIA 2026-09 ========================= */
/* ---------------------------------------------------------------------------
   2.1  Barra horizontal: fontes que faltavam
   --------------------------------------------------------------------------- */
/* Textos longos sem espaço (URLs, "kkkkk…", hashtags gigantes) quebram em vez
   de vazar do card (o .post{overflow:hidden} só escondia o fim da frase). */
.caption, .profile-bio, .comment-row .body, .chat-bubble, .notif-body,
.convo-snippet, .person-name, .nc-name { overflow-wrap: anywhere; }
/* Ícone de repost na grade do perfil: a classe .grid-repost era usada no HTML
   (profile.php) mas NÃO tinha CSS — o SVG nascia com 300×150px por cima da
   miniatura. Agora é um selo pequeno no canto. */
.post-grid .grid-repost {
  position: absolute; top: 6px; right: 6px; width: 22px; height: 22px;
  border-radius: 50%; background: rgba(20,20,27,.55); color: #fff;
  display: flex; align-items: center; justify-content: center; pointer-events: none;
}
.post-grid .grid-repost svg { width: 12px; height: 12px; }
/* Rodapé mini: em telas estreitas pode quebrar linha em vez de vazar. */
@media (max-width: 380px) { .site-footer.mini-footer { flex-wrap: wrap; white-space: normal; } }
/* Barra fixa: nunca ultrapassa a tela nem "rola" junto no iOS. */
.topbar { max-width: 100vw; }
/* Inputs com 16px no celular: abaixo disso o iOS dá zoom automático ao focar
   (e é esse zoom que muitas vezes deixa a página "deslocada" com barra
   horizontal até a pessoa dar pinch de volta). */
@media (max-width: 640px) {
  .input, .field input, .field select, .field textarea, .search-field input,
  .comment-form input[type=text], .chat-compose textarea, .loc-row input { font-size: 16px; }
}

/* ---------------------------------------------------------------------------
   2.2  Fotos sem "pulo" de layout (CLS) — o espaço é reservado antes de a
        imagem chegar, com a proporção real vinda do banco (post_images.width/
        height). O JS de carrossel só recalcula quando a proporção muda.
   --------------------------------------------------------------------------- */
.post-media { aspect-ratio: var(--ar, auto); }
.post-media[style*="--ar"] .carousel-track img { height: 100%; object-fit: contain; }
.post-grid img, .pub-grid img { aspect-ratio: 1 / 1; }

/* ---------------------------------------------------------------------------
   2.3  Prova social ("Curtido por @fulano") e menu do card (não tenho interesse)
   --------------------------------------------------------------------------- */
.social-banner { display: flex; align-items: center; gap: 7px; padding: 10px 16px 0; font-size: 12.5px; color: var(--ink-3); font-weight: 600; }
.social-banner svg { width: 14px; height: 14px; color: var(--red); flex-shrink: 0; }
.social-banner a { color: var(--ink-2); font-weight: 700; }
.card-menu { position: relative; margin-left: 4px; flex-shrink: 0; }
.card-menu-btn { width: 34px; height: 34px; border: none; background: none; border-radius: 50%; color: var(--ink-3); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.card-menu-btn:hover { background: var(--hover); color: var(--ink); }
.card-menu-btn svg { width: 20px; height: 20px; }
.card-menu-drop { position: absolute; top: 40px; right: 0; z-index: 30; min-width: 220px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-md); padding: 6px; display: none; }
.card-menu-drop.open { display: block; }
.card-menu-item { display: flex; align-items: center; gap: 10px; width: 100%; border: none; background: none; padding: 10px 12px; border-radius: 8px; font-family: inherit; font-size: 14px; font-weight: 600; color: var(--ink-2); cursor: pointer; text-align: left; text-decoration: none; }
.card-menu-item:hover { background: var(--hover); }
.card-menu-item svg { width: 18px; height: 18px; flex-shrink: 0; }
.post.hidden-by-feedback { padding: 14px 16px; }
.post.hidden-by-feedback .fb-undo { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13.5px; color: var(--ink-2); }
.post.hidden-by-feedback .fb-undo button { background: none; border: 1px solid var(--line-strong); border-radius: 999px; padding: 7px 14px; font-family: inherit; font-weight: 700; font-size: 13px; cursor: pointer; color: var(--ink); }

/* ---------------------------------------------------------------------------
   2.4  CELULAR: barra de abas INFERIOR (polegar alcança), topo enxuto e cards
        de borda a borda (fotos ~20% maiores em telas de 360px).
        Para voltar ao layout anterior, apague deste bloco até o fim da 2.4.
   --------------------------------------------------------------------------- */
.tabbar { display: none; }
@media (max-width: 640px) {
  /* Conteúdo ocupa a largura toda; o respiro fica DENTRO dos blocos. */
  .page { width: 100%; max-width: 100%; padding: 62px 0 calc(74px + env(safe-area-inset-bottom)); margin: 0; }
  .page > *:not(.post):not(#feed-list):not(.feed-sentinel):not(.feed-end):not(.trending-strip):not(.chat-screen):not(.guest-bar) { margin-left: 12px; margin-right: 12px; }
  .page > .flash { margin-left: 12px; margin-right: 12px; }
  .page .post, .page .empty-state { border-radius: 0; border-left: none; border-right: none; margin-bottom: 8px; }
  .page .trending-strip { border-radius: 0; border-left: none; border-right: none; }
  .profile-cover { border-radius: 0; margin-left: 0; margin-right: 0; }
  /* Topo: só logo + mensagens + sair. Os outros destinos vão para a barra inferior. */
  .topbar-inner { width: 100%; max-width: 100%; padding: 8px 12px; gap: 6px; }
  .topbar-nav .tn-item:not(.tn-messages), .topbar-nav .avatar-btn { display: none; }
  .tn-item.active::after { display: none; }
  /* Barra inferior */
  .tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 100;
    display: flex; align-items: stretch; justify-content: space-around;
    height: calc(56px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    background: rgba(250,247,240,.96); backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-top: 1px solid var(--line);
  }
  .tabbar a { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--ink-3); position: relative; }
  .tabbar a svg { width: 24px; height: 24px; }
  .tabbar a.active { color: var(--ink); }
  .tabbar a.active::after { content: ""; position: absolute; top: 0; width: 22px; height: 3px; border-radius: 0 0 3px 3px; background: var(--brand-gradient); }
  .tabbar .tab-create span { width: 40px; height: 40px; border-radius: 14px; background: var(--brand-gradient); color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 16px rgba(255,107,53,.3); }
  .tabbar .tab-create svg { width: 22px; height: 22px; }
  /* Perfil: o <a> é uma aba normal (estica); o círculo de 28 px é o span interno.
     [2026-09b] Antes o próprio .avatar-btn era a aba e o flex esticava o círculo
     numa "pílula" larga colada no topo da barra. */
  .tabbar .tab-profile .tab-avatar { display: block; width: 28px; height: 28px; flex: none; border-radius: 50%; padding: 2px; background: var(--brand-gradient); }
  .tabbar .tab-profile .tab-avatar img, .tabbar .tab-profile .tab-avatar .avatar-fallback { width: 100%; height: 100%; border-radius: 50%; border: 1.5px solid var(--bg); object-fit: cover; display: block; }
  .tabbar .tab-profile .tab-avatar .avatar-fallback { display: flex; align-items: center; justify-content: center; font-size: 11px; }
  .tabbar .tab-profile.active .tab-avatar { box-shadow: 0 0 0 2px var(--ink); }
  /* Compatibilidade: se o header.php antigo (a.avatar-btn direto na barra) ainda estiver no ar. */
  .tabbar > a.avatar-btn { width: auto; height: auto; padding: 0; margin: 0; background: none; border-radius: 0; }
  .tabbar > a.avatar-btn > img, .tabbar > a.avatar-btn > .avatar-fallback { width: 28px; height: 28px; flex: none; border-radius: 50%; border: 2px solid var(--bg); box-shadow: 0 0 0 2px #FF6B35; object-fit: cover; display: block; }
  .tabbar > a.avatar-btn > .avatar-fallback { display: flex; align-items: center; justify-content: center; font-size: 11px; }
  .tabbar .nav-dot { top: 8px; right: calc(50% - 14px); }
  /* Chat em tela cheia: fica acima da barra inferior. */
  .chat-screen { bottom: 0; height: auto; }
  body.chat-page .tabbar { display: none; }
  /* Pílula de novidades e indicador de "puxar" um pouco mais baixos (topo menor). */
  .new-pill { top: 58px; }
  .ptr-indicator { top: 50px; }
  .chat-header { top: 50px; }
}
@media (max-width: 640px) and (display-mode: standalone) {
  .tabbar { height: calc(60px + env(safe-area-inset-bottom)); }
}
/* Pessoas com "reduzir movimento": sem animações de entrada/gradiente. */
@media (prefers-reduced-motion: reduce) {
  .btn-primary { animation: none; }
  .carousel-track { transition: none; }
}
