/*
 * feed.css — posts estilo Twitter/X no visual v3 (tokens.css).
 * Prefixo .fd- em tudo. Carregado sob demanda pelos módulos de /js/feed/.
 * Usa da casca (styles.css), com alternativas: --app-top, --app-bottom,
 * --tab-indicator, --dock-bg, --toast-bg.
 */

:root {
  --fd-link: var(--text);
  --fd-like: var(--danger);
  --fd-hover: rgba(15, 17, 21, .028);
  --fd-col: 600px;
  --fd-thread: var(--border-strong);
  --fd-menu-bg: var(--surface);
  --fd-glass: var(--surface-glass);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --fd-link: var(--primary);
    --fd-hover: rgba(255, 255, 255, .028);
    --fd-menu-bg: #2a2d36;
  }
}

:root[data-theme="dark"] {
  --fd-link: var(--primary);
  --fd-hover: rgba(255, 255, 255, .028);
  --fd-menu-bg: #2a2d36;
}

/* ============================================================ básicos */

.fd-visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.fd-ic {
  width: 22px;
  height: 22px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.fd-iconbtn {
  position: relative;
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}

.fd-iconbtn:hover:not(:disabled) {
  background: var(--surface-2);
}

.fd-iconbtn:active:not(:disabled) {
  transform: scale(.94);
}

.fd-iconbtn:disabled {
  opacity: .4;
  cursor: default;
}

.fd-iconbtn:focus-visible,
.fd-btn:focus-visible,
.fd-act:focus-visible,
.fd-tabs__tab:focus-visible,
.fd-newpill:focus-visible,
.fd-composer__prompt:focus-visible,
.fd-menu__item:focus-visible,
.fd-compose__cancel:focus-visible,
.fd-notif:focus-visible,
.fd-trend:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

/* ------------------------------------------------------------- botões */
.fd-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border: 0;
  border-radius: var(--r-full);
  font: 700 var(--fs-base)/1 var(--font-body);
  letter-spacing: -.005em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease), opacity var(--dur-fast) var(--ease);
}

.fd-btn .fd-ic {
  width: 18px;
  height: 18px;
  stroke-width: 2.2;
}

.fd-btn:active:not(:disabled) {
  transform: scale(.97);
}

.fd-btn:disabled {
  opacity: .45;
  cursor: default;
}

.fd-btn--primary {
  background: var(--primary);
  color: var(--on-primary);
}

.fd-btn--primary:hover:not(:disabled) {
  background: var(--primary-hover);
  color: var(--on-primary);
}

.fd-btn--secondary {
  background: var(--surface-2);
  color: var(--text);
}

.fd-btn--secondary:hover:not(:disabled) {
  background: var(--surface-3);
  color: var(--text);
}

.fd-btn--ink {
  background: var(--ink);
  color: var(--on-ink);
}

.fd-btn--sm {
  min-height: 36px;
  padding: 0 16px;
  font-size: var(--fs-sm);
}

/* área de toque de 44 px mesmo no botão pequeno */
.fd-btn--sm::before {
  content: "";
  position: absolute;
  inset: -4px 0;
}

.fd-follow {
  min-width: 88px;
}

.fd-follow.is-following:hover:not(:disabled) {
  background: var(--danger-soft);
  color: var(--danger);
}

.fd-spinner {
  display: inline-block;
  width: 22px;
  height: 22px;
  border: 2.5px solid var(--surface-3);
  border-top-color: var(--text);
  border-radius: 50%;
  animation: fd-spin .8s linear infinite;
}

.fd-spinner--xs {
  width: 13px;
  height: 13px;
  border-width: 2px;
}

/* --------------------------------------------------------------- avatar */
.fd-av {
  --fd-av: 44px;
  display: inline-grid;
  flex: none;
  place-items: center;
  width: var(--fd-av);
  height: var(--fd-av);
  overflow: hidden;
  border-radius: 50%;
  background: var(--surface-2);
  user-select: none;
}

.fd-av__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fd-av--ini {
  background: var(--fd-tone, #56718c);
}

.fd-av__ini {
  color: #ffffff;
  font-size: calc(var(--fd-av) * .38);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.01em;
}

.fd-av-link {
  display: block;
  flex: none;
  border-radius: 50%;
  transition: opacity var(--dur-fast) var(--ease);
}

.fd-av-link:hover {
  opacity: .88;
}

/* ================================================================ página */

.fd-page {
  display: flex;
  justify-content: center;
  gap: 28px;
  width: 100%;
  min-width: 0;
}

.fd-col {
  position: relative;
  width: 100%;
  max-width: var(--fd-col);
  min-width: 0;
  min-height: calc(100dvh - var(--app-top, 0px) - var(--app-bottom, 0px));
}

@media (min-width: 700px) {
  .fd-col {
    border-right: 1px solid var(--border);
    border-left: 1px solid var(--border);
  }
}

.fd-page__aside {
  display: none;
}

@media (min-width: 1200px) {
  .fd-page__aside {
    position: sticky;
    top: 0;
    display: block;
    flex: none;
    align-self: flex-start;
    width: 330px;
    max-height: 100dvh;
    padding: 12px 0 24px;
    overflow-y: auto;
    scrollbar-width: none;
  }
}

/* ----------------------------------------------- topo do feed + abas */
.fd-top {
  position: sticky;
  top: var(--app-top, 0px);
  z-index: 20;
  background: var(--fd-glass);
  -webkit-backdrop-filter: saturate(1.8) blur(18px);
  backdrop-filter: saturate(1.8) blur(18px);
  border-bottom: 1px solid var(--border);
}

.fd-top__title {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (min-width: 1024px) {
  .fd-top__title {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
    padding: 16px 16px 2px;
    font-size: var(--fs-xl);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: var(--tracking-tight);
  }
}

.fd-tabs {
  display: flex;
}

.fd-tabs__tab {
  position: relative;
  display: flex;
  flex: 1 1 0;
  align-items: stretch;
  justify-content: center;
  height: 50px;
  padding: 0 12px;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font: 600 var(--fs-base)/1 var(--font-body);
  cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}

.fd-tabs__tab:hover {
  background: var(--fd-hover);
  color: var(--text);
}

.fd-tabs__label {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.fd-tabs__tab.is-active {
  color: var(--text);
  font-weight: 700;
}

.fd-tabs__tab.is-active .fd-tabs__label::after {
  content: "";
  position: absolute;
  right: -2px;
  bottom: 0;
  left: -2px;
  height: 4px;
  border-radius: 4px 4px 0 0;
  background: var(--tab-indicator, var(--primary));
}

/* --------------------------------------- caixa "O que está rolando?" */
.fd-composer {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 12px 12px 16px;
  border-bottom: 1px solid var(--border);
}

.fd-composer__prompt {
  flex: 1;
  min-width: 0;
  height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: var(--r-full);
  background: var(--surface-2);
  color: var(--text-muted);
  font: 400 var(--fs-md)/1 var(--font-body);
  text-align: left;
  cursor: text;
  transition: background-color var(--dur-fast) var(--ease);
}

.fd-composer__prompt:hover {
  background: var(--surface-3);
}

.fd-composer__tool {
  color: var(--text-muted);
}

/* ------------------------------------------------ boas-vindas visitante */
.fd-welcome {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 12px 4px;
  padding: 10px 8px 10px 12px;
  border-radius: var(--r-lg);
  background: var(--surface-2);
}

.fd-welcome__mascot {
  width: 44px;
  height: 44px;
  flex: none;
}

.fd-welcome__text {
  flex: 1;
  min-width: 0;
}

.fd-welcome__title {
  font-size: var(--fs-base);
  font-weight: 700;
  line-height: 1.25;
}

.fd-welcome__sub {
  color: var(--text-muted);
  font-size: var(--fs-sm);
  line-height: 1.3;
}

.fd-welcome__close {
  width: 32px;
  height: 32px;
  margin-left: -4px;
  color: var(--text-muted);
}

.fd-welcome__close .fd-ic {
  width: 18px;
  height: 18px;
}

@media (max-width: 380px) {
  .fd-welcome__mascot {
    display: none;
  }
}

/* ---------------------------------------------------- "Novos posts" */
.fd-newpill-wrap {
  position: sticky;
  top: calc(var(--app-top, 0px) + 51px);
  z-index: 25;
  display: flex;
  justify-content: center;
  height: 0;
  pointer-events: none;
}

@media (min-width: 1024px) {
  .fd-newpill-wrap {
    top: 100px;
  }
}

.fd-newpill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  margin-top: 10px;
  padding: 0 16px 0 12px;
  border: 0;
  border-radius: var(--r-full);
  background: var(--primary);
  color: var(--on-primary);
  font: 700 var(--fs-sm)/1 var(--font-body);
  box-shadow: 0 8px 22px rgba(16, 18, 24, .18);
  cursor: pointer;
  pointer-events: auto;
}

.fd-newpill .fd-ic {
  width: 17px;
  height: 17px;
  stroke-width: 2.4;
}

.fd-newpill__avatars {
  display: flex;
}

.fd-newpill__avatars .fd-av {
  box-shadow: 0 0 0 2px var(--primary);
}

.fd-newpill__avatars .fd-av + .fd-av {
  margin-left: -7px;
}

.fd-newpill.is-in {
  animation: fd-pill-in .32s var(--ease);
}

/* ================================================================ lista */
.fd-list__items:empty {
  min-height: 40vh;
}

.fd-list__foot {
  display: flex;
  justify-content: center;
  padding: 20px 16px calc(28px + var(--fd-foot-extra, 0px));
}

.fd-list__end {
  color: var(--text-subtle);
  font-size: var(--fs-sm);
}

.fd-list__error {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 12px;
  color: var(--text-muted);
  font-size: var(--fs-sm);
}

.fd-list__sentinel {
  height: 1px;
}

/* ================================================================ post */
.fd-post {
  position: relative;
  display: flex;
  gap: 12px;
  padding: 12px 16px 4px;
  border-bottom: 1px solid var(--border);
  transition: background-color var(--dur-fast) var(--ease);
}

.fd-post.is-clickable {
  cursor: pointer;
}

@media (hover: hover) {
  .fd-post.is-clickable:hover {
    background: var(--fd-hover);
  }
}

.fd-post.is-pending {
  opacity: .7;
}

.fd-post.is-entering {
  animation: fd-enter .32s var(--ease);
}

.fd-post__aside {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 44px;
  flex: none;
}

.fd-post__thread {
  display: none;
  flex: 1;
  width: 2px;
  min-height: 12px;
  margin-top: 4px;
  border-radius: 2px;
  background: var(--fd-thread);
}

.fd-post.has-thread .fd-post__thread {
  display: block;
}

.fd-post__main {
  flex: 1;
  min-width: 0;
}

.fd-post__head {
  display: flex;
  align-items: flex-start;
  gap: 4px;
}

.fd-post__meta {
  display: flex;
  flex: 1;
  align-items: baseline;
  gap: 4px;
  min-width: 0;
  overflow: hidden;
  font-size: var(--fs-base);
  line-height: 20px;
  white-space: nowrap;
}

.fd-post__name {
  flex: 0 0 auto;
  max-width: 72%;
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
  text-overflow: ellipsis;
}

.fd-post__name:hover {
  text-decoration: underline;
}

.fd-post__handle {
  flex: 0 10 auto;
  min-width: 0;
  overflow: hidden;
  color: var(--text-muted);
  text-overflow: ellipsis;
}

.fd-post__dot {
  flex: none;
  color: var(--text-muted);
}

.fd-post__time {
  flex: none;
  color: var(--text-muted);
  text-decoration: none;
}

.fd-post__time:hover {
  text-decoration: underline;
}

.fd-post__time.is-pending {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.fd-post__time.is-pending .fd-spinner {
  border-top-color: var(--text-muted);
}

.fd-post__more {
  width: 34px;
  height: 34px;
  margin: -7px -8px -7px 0;
  color: var(--text-muted);
}

.fd-post__more .fd-ic {
  width: 19px;
  height: 19px;
}

.fd-post__replyto {
  margin-top: 1px;
  color: var(--text-muted);
  font-size: var(--fs-sm);
  line-height: 1.35;
}

.fd-post__replyto .fd-link {
  font-weight: 500;
}

.fd-post__body {
  margin-top: 2px;
  font-size: var(--fs-base);
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: normal;
}

.fd-link {
  color: var(--fd-link);
  font-weight: 600;
  text-decoration: none;
}

.fd-link:hover {
  text-decoration: underline;
}

.fd-post__body a[target="_blank"] {
  text-decoration: underline;
  text-decoration-color: var(--border-strong);
  text-underline-offset: .2em;
}

.fd-post__body a[target="_blank"]:hover {
  text-decoration-color: currentColor;
}

/* ----------------------------------------------------------- imagem */
.fd-media {
  position: relative;
  width: 100%;
  max-height: 520px;
  margin-top: 10px;
  overflow: hidden;
  aspect-ratio: var(--fd-ratio, 1.5);
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface-2);
  cursor: pointer;
}

.fd-media__lqip,
.fd-media__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fd-media__lqip {
  filter: blur(14px);
  transform: scale(1.12);
}

.fd-media__img {
  opacity: 0;
  transition: opacity .28s var(--ease);
}

.fd-media.is-loaded .fd-media__img {
  opacity: 1;
}

.fd-media.is-broken .fd-media__img {
  display: none;
}

.fd-media__open {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.fd-media__open:focus-visible {
  outline: 3px solid var(--text);
  outline-offset: -3px;
  border-radius: 16px;
}

/* ----------------------------------------------------------- ações */
.fd-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 400px;
  margin: 2px 0 0 -9px;
}

.fd-act {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  min-width: 44px;
  min-height: 40px;
  padding: 0 6px 0 0;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font: 500 var(--fs-sm)/1 var(--font-body);
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: color var(--dur-fast) var(--ease);
}

.fd-act:disabled {
  cursor: default;
  opacity: .6;
}

.fd-act__icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  transition: background-color var(--dur-fast) var(--ease);
}

.fd-act .fd-ic {
  width: 19px;
  height: 19px;
  stroke-width: 1.9;
}

.fd-act__count {
  min-width: 1ch;
}

.fd-act--reply:hover:not(:disabled),
.fd-act--share:hover:not(:disabled) {
  color: var(--text);
}

.fd-act--reply:hover:not(:disabled) .fd-act__icon,
.fd-act--share:hover:not(:disabled) .fd-act__icon {
  background: var(--surface-2);
}

.fd-act--like:hover:not(:disabled) {
  color: var(--fd-like);
}

.fd-act--like:hover:not(:disabled) .fd-act__icon {
  background: var(--danger-soft);
}

.fd-act--like.is-on {
  color: var(--fd-like);
}

.fd-act--like.is-on .fd-ic {
  fill: currentColor;
}

.fd-act__burst {
  position: absolute;
  inset: 5px;
  border: 2px solid var(--fd-like);
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
}

.fd-act--like.is-popping .fd-ic {
  animation: fd-pop .45s var(--ease);
}

.fd-act--like.is-popping .fd-act__burst {
  animation: fd-burst .5s ease-out;
}

/* ------------------------------------------------- post principal */
.fd-post--main {
  display: block;
  padding: 14px 16px 0;
  cursor: default;
}

.fd-post--main:hover {
  background: none;
}

.fd-post__head--main {
  display: flex;
  align-items: center;
  gap: 12px;
}

.fd-post__who {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  line-height: 1.25;
}

.fd-post__who .fd-post__name {
  font-size: var(--fs-md);
}

.fd-post__who .fd-post__handle {
  font-size: var(--fs-sm);
}

.fd-post__head--main .fd-post__more {
  margin: 0 -8px 0 0;
  align-self: flex-start;
}

.fd-post__main--full {
  flex: none;
}

.fd-post--main .fd-post__replyto {
  margin-top: 10px;
}

.fd-post--main .fd-post__body {
  margin-top: 12px;
  font-size: 1.0625rem;
  line-height: 1.5;
}

.fd-post--main .fd-media {
  max-height: min(72vh, 680px);
  margin-top: 12px;
}

.fd-post__stamp {
  margin-top: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-size: var(--fs-sm);
}

.fd-post__stamp-link {
  color: inherit;
  text-decoration: none;
}

.fd-post__stamp-link:hover {
  text-decoration: underline;
}

.fd-post__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-size: var(--fs-sm);
}

.fd-post__stats strong {
  color: var(--text);
  font-weight: 700;
}

.fd-post--main .fd-actions {
  justify-content: space-around;
  max-width: none;
  margin: 0;
  padding: 2px 0;
}

.fd-post--main .fd-act .fd-ic {
  width: 22px;
  height: 22px;
}

.fd-post--main .fd-act__icon {
  width: 40px;
  height: 40px;
}

/* ------------------------------------------ pai (acima do principal) */
.fd-post--parent {
  padding-bottom: 0;
  border-bottom: 0;
}

.fd-post--parent .fd-post__thread {
  display: block;
  margin-bottom: -6px;
}

.fd-post--parent .fd-actions {
  margin-bottom: 4px;
}

/* ------------------------------------------------------- apagado */
.fd-gone {
  margin: 4px 0 10px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: var(--fs-sm);
}

.fd-post.is-deleted.is-clickable {
  cursor: default;
}

.fd-post.is-deleted .fd-post__head {
  display: none;
}

.fd-post--main.is-deleted .fd-post__head--main {
  display: flex;
}

/* ============================================================ esqueleto */
.fd-skel {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.fd-skel__av {
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 50%;
  background: var(--surface-2);
}

.fd-skel__lines {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  padding-top: 4px;
}

.fd-skel__line {
  height: 11px;
  border-radius: 6px;
  background: var(--surface-2);
}

.fd-skel__line--w40 { width: 40%; }
.fd-skel__line--w70 { width: 70%; }
.fd-skel__line--w90 { width: 90%; }

.fd-skel__media {
  height: 168px;
  margin-top: 4px;
  border-radius: 16px;
  background: var(--surface-2);
}

.fd-skel__av,
.fd-skel__line,
.fd-skel__media {
  animation: fd-breathe 1.4s ease-in-out infinite alternate;
}

/* ================================================================ estados */
.fd-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 56px 28px;
  text-align: center;
}

.fd-state--compact {
  padding: 32px 24px 16px;
}

.fd-state__art {
  margin-bottom: 6px;
}

.fd-state__mascot {
  width: 96px;
  height: 96px;
}

.fd-state__icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--text);
}

.fd-state__icon .fd-ic {
  width: 28px;
  height: 28px;
  stroke-width: 1.8;
}

.fd-state__title {
  max-width: 360px;
  font-size: var(--fs-xl);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: var(--tracking-tight);
}

.fd-state--compact .fd-state__title {
  font-size: var(--fs-lg);
}

.fd-state__text {
  max-width: 340px;
  color: var(--text-muted);
  font-size: var(--fs-base);
}

.fd-state__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
}

/* ================================================ pessoas / em alta */
.fd-card {
  margin: 0 0 14px;
  padding: 14px 0 6px;
  border-radius: var(--r-lg);
  background: var(--surface-2);
}

.fd-card__title {
  padding: 0 16px 6px;
  font-size: var(--fs-lg);
  font-weight: 800;
  letter-spacing: var(--tracking-tight);
}

.fd-card--people:not(:has(.fd-card__title)) {
  padding-top: 6px;
}

.fd-person {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease);
}

@media (hover: hover) {
  .fd-person:hover {
    background: var(--fd-hover);
  }
}

.fd-person__text {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  line-height: 1.3;
}

.fd-person__name {
  overflow: hidden;
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fd-person__name:hover {
  text-decoration: underline;
}

.fd-person__handle {
  overflow: hidden;
  color: var(--text-muted);
  font-size: var(--fs-sm);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fd-person__bio {
  display: -webkit-box;
  margin-top: 2px;
  overflow: hidden;
  font-size: var(--fs-sm);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.fd-trends {
  margin: 0;
  padding: 0;
  list-style: none;
}

.fd-trend {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 9px 16px;
  color: var(--text);
  text-decoration: none;
  transition: background-color var(--dur-fast) var(--ease);
}

.fd-trend:hover {
  background: var(--fd-hover);
}

.fd-trend__rank,
.fd-trend__count {
  color: var(--text-muted);
  font-size: var(--fs-xs);
}

.fd-trend__tag {
  font-size: var(--fs-base);
  font-weight: 700;
}

.fd-aside__foot {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  padding: 4px 16px;
  font-size: var(--fs-xs);
}

.fd-aside__foot a {
  color: var(--text-muted);
  text-decoration: none;
}

.fd-aside__foot a:hover {
  color: var(--text);
  text-decoration: underline;
}

/* "Seguindo" vazio: sugestões sem cartão (no fluxo da lista) */
.fd-follow-empty {
  padding-bottom: 24px;
}

.fd-follow-empty .fd-card {
  margin: 4px 0 0;
  padding: 0;
  border-top: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
}

.fd-follow-empty .fd-person {
  border-bottom: 1px solid var(--border);
}

.fd-follow-empty__go {
  display: flex;
  margin: 20px auto 0;
}

/* ======================================================= cabeçalho de tela */
.fd-head {
  position: sticky;
  top: var(--app-top, 0px);
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 54px;
  padding: 4px 12px 4px 6px;
  background: var(--fd-glass);
  -webkit-backdrop-filter: saturate(1.8) blur(18px);
  backdrop-filter: saturate(1.8) blur(18px);
  border-bottom: 1px solid var(--border);
}

.fd-head--plain {
  padding-left: 16px;
}

.fd-head__back .fd-ic {
  width: 22px;
  height: 22px;
  stroke-width: 2.1;
}

.fd-head__titles {
  flex: 1;
  min-width: 0;
}

.fd-head__title {
  overflow: hidden;
  font-size: 1.1875rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: var(--tracking-tight);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fd-head--big .fd-head__title {
  font-size: var(--fs-2xl);
}

.fd-head__sub {
  overflow: hidden;
  color: var(--text-muted);
  font-size: var(--fs-sm);
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fd-head__actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.fd-head__title:focus {
  outline: none;
}

/* ================================================================== menu */
.fd-menu {
  position: fixed;
  z-index: 400;
  min-width: 232px;
  max-width: calc(100vw - 16px);
  padding: 6px;
  border-radius: 16px;
  background: var(--fd-menu-bg);
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--border);
  opacity: 0;
  transform: scale(.96) translateY(-4px);
  transform-origin: top right;
  transition: opacity 140ms var(--ease), transform 140ms var(--ease);
}

.fd-menu.is-open {
  opacity: 1;
  transform: none;
}

.fd-menu__item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  font: 600 var(--fs-base)/1.2 var(--font-body);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.fd-menu__item:hover,
.fd-menu__item:focus-visible {
  background: var(--surface-2);
}

.fd-menu__item .fd-ic {
  width: 20px;
  height: 20px;
}

.fd-menu__item.is-danger {
  color: var(--danger);
}

/* =============================================================== editor */
.fd-compose {
  position: fixed;
  inset: auto 0 var(--fd-kb, 0px) 0;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: none;
  margin: 0;
  padding: 0;
  overflow: visible;
  border: 0;
  background: transparent;
  color: var(--text);
}

.fd-compose::backdrop {
  background: var(--backdrop);
  animation: fd-fade-in .2s var(--ease);
}

.fd-compose.is-closing::backdrop {
  animation: fd-fade-out .2s var(--ease) forwards;
}

.fd-compose__panel {
  display: flex;
  flex-direction: column;
  height: min(92dvh, calc(var(--fd-vvh, 100dvh) - 12px));
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  animation: fd-sheet-in .3s var(--ease);
}

.fd-compose.is-closing .fd-compose__panel {
  animation: fd-sheet-out .22s var(--ease) forwards;
}

.fd-compose__panel.is-dragging {
  box-shadow: var(--shadow-lg), inset 0 0 0 2px var(--primary);
}

.fd-compose__grab {
  width: 36px;
  height: 5px;
  margin: 8px auto 0;
  border-radius: 3px;
  background: var(--border-strong);
}

.fd-compose__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 52px;
  padding: 4px 12px 4px 6px;
}

.fd-compose__cancel {
  min-height: 40px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--r-full);
  background: transparent;
  color: var(--text);
  font: 500 var(--fs-base)/1 var(--font-body);
  cursor: pointer;
}

.fd-compose__cancel:hover {
  background: var(--surface-2);
}

.fd-compose__submit {
  min-height: 36px;
  padding: 0 20px;
}

.fd-compose__scroll {
  flex: 1 1 auto;
  min-height: 0;
  padding: 4px 16px 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.fd-compose__row {
  display: flex;
  gap: 12px;
}

.fd-compose__field {
  flex: 1;
  min-width: 0;
}

.fd-compose__input {
  display: block;
  width: 100%;
  min-height: 72px;
  margin: 0;
  padding: 8px 0 4px;
  border: 0;
  outline: none;
  resize: none;
  background: transparent;
  color: var(--text);
  font: 400 1.1875rem/1.4 var(--font-body);
  caret-color: var(--text);
}

.fd-compose__input::placeholder {
  color: var(--text-subtle);
}

.fd-compose__replying {
  margin-top: 2px;
  color: var(--text-muted);
  font-size: var(--fs-sm);
}

.fd-compose__replying-to {
  color: var(--text);
  font-weight: 600;
}

.fd-compose__media {
  position: relative;
  display: grid;
  place-items: center;
  max-height: 340px;
  margin-top: 10px;
  overflow: hidden;
  aspect-ratio: var(--fd-ratio, 1.6);
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface-2);
}

.fd-compose__media.is-busy {
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: center;
}

.fd-compose__media-note {
  color: var(--text-muted);
  font-size: var(--fs-sm);
}

.fd-compose__media-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fd-compose__media-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(15, 17, 21, .72);
  color: #ffffff;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  cursor: pointer;
}

.fd-compose__media-remove:hover {
  background: rgba(15, 17, 21, .86);
}

.fd-compose__media-remove .fd-ic {
  width: 18px;
  height: 18px;
  stroke-width: 2.4;
}

.fd-compose__error,
.fd-form-alert {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: var(--fs-sm);
  line-height: 1.35;
}

.fd-compose__error .fd-ic,
.fd-form-alert .fd-ic {
  width: 18px;
  height: 18px;
  margin-top: -1px;
}

.fd-compose__tools {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px calc(6px + env(safe-area-inset-bottom, 0px)) 10px;
  border-top: 1px solid var(--border);
}

.fd-compose__tool {
  color: var(--text);
}

.fd-compose__spacer {
  flex: 1;
}

/* contexto da resposta */
.fd-compose__ctx {
  display: flex;
  gap: 12px;
  padding-top: 6px;
}

.fd-compose__ctx-aside {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 40px;
  flex: none;
}

.fd-compose__thread {
  flex: 1;
  width: 2px;
  min-height: 14px;
  margin: 4px 0;
  border-radius: 2px;
  background: var(--fd-thread);
}

.fd-compose__ctx-main {
  flex: 1;
  min-width: 0;
  padding-bottom: 14px;
}

.fd-compose__ctx-head {
  overflow: hidden;
  font-size: var(--fs-base);
  line-height: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fd-compose__ctx-meta {
  color: var(--text-muted);
}

.fd-compose__ctx-body {
  display: -webkit-box;
  margin-top: 2px;
  overflow: hidden;
  color: var(--text);
  font-size: var(--fs-base);
  line-height: 1.4;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
}

/* contador em anel */
.fd-ring {
  position: relative;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-right: 2px;
}

.fd-ring__svg {
  width: 26px;
  height: 26px;
  transform: rotate(-90deg);
  transition: transform var(--dur) var(--ease);
}

.fd-ring__track,
.fd-ring__fill {
  fill: none;
  stroke-width: 2.4;
}

.fd-ring__track {
  stroke: var(--surface-3);
}

.fd-ring__fill {
  stroke: var(--text);
  stroke-linecap: round;
  transition: stroke-dashoffset .12s linear, stroke var(--dur) var(--ease);
}

.fd-ring.is-warn .fd-ring__svg,
.fd-ring.is-over .fd-ring__svg {
  transform: rotate(-90deg) scale(1.18);
}

.fd-ring.is-warn .fd-ring__fill {
  stroke: #e2a400;
}

.fd-ring.is-over .fd-ring__fill {
  stroke: var(--danger);
}

.fd-ring__num {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.fd-ring.is-over .fd-ring__num {
  color: var(--danger);
}

@media (min-width: 640px) {
  .fd-compose {
    inset: 0;
    width: min(600px, calc(100% - 32px));
    margin: 7vh auto auto;
  }

  .fd-compose__panel {
    height: auto;
    max-height: 82vh;
    border-radius: var(--r-lg);
    animation: fd-pop-in .2s var(--ease);
  }

  .fd-compose.is-closing .fd-compose__panel {
    animation: fd-pop-out .16s var(--ease) forwards;
  }

  .fd-compose__grab {
    display: none;
  }

  .fd-compose__scroll {
    min-height: 140px;
  }
}

/* ============================================================== lightbox */
.fd-lightbox {
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(8, 9, 12, .94);
  color: #ffffff;
}

.fd-lightbox::backdrop {
  background: transparent;
}

.fd-lightbox[open] {
  animation: fd-fade-in .18s var(--ease);
}

.fd-lightbox.is-closing {
  animation: fd-fade-out .18s var(--ease) forwards;
}

.fd-lightbox__stage {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: 56px 12px calc(24px + env(safe-area-inset-bottom, 0px));
}

.fd-lightbox__lqip,
.fd-lightbox__img {
  grid-area: 1 / 1;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 6px;
}

.fd-lightbox__lqip {
  width: min(100%, 900px);
  filter: blur(18px);
  opacity: .6;
}

.fd-lightbox__stage.is-loaded .fd-lightbox__lqip {
  display: none;
}

.fd-lightbox__close {
  position: fixed;
  top: calc(12px + env(safe-area-inset-top, 0px));
  left: 12px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .14);
  color: #ffffff;
  cursor: pointer;
}

.fd-lightbox__close:hover {
  background: rgba(255, 255, 255, .24);
}

.fd-lightbox__close:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

/* ============================================================ post (tela) */
.fd-page--post .fd-col {
  display: flex;
  flex-direction: column;
}

.fd-replybar-slot {
  position: sticky;
  bottom: var(--app-bottom, 0px);
  z-index: 15;
  margin-top: auto;
}

.fd-replybar-slot:empty {
  display: none;
}

.fd-replybar {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 10px 12px 10px 16px;
  border-top: 1px solid var(--border);
  background: var(--fd-glass);
  -webkit-backdrop-filter: saturate(1.8) blur(18px);
  backdrop-filter: saturate(1.8) blur(18px);
}

.fd-replybar .fd-av {
  margin-bottom: 4px;
}

.fd-replybar__box {
  display: flex;
  flex: 1;
  align-items: flex-end;
  gap: 2px;
  min-width: 0;
  padding: 0 4px 0 16px;
  border-radius: 22px;
  background: var(--surface-2);
  transition: box-shadow var(--dur-fast) var(--ease);
}

.fd-replybar__box:focus-within {
  box-shadow: 0 0 0 2px var(--text);
}

.fd-replybar__input {
  flex: 1;
  min-width: 0;
  max-height: 160px;
  min-height: 44px;
  padding: 11px 0;
  border: 0;
  outline: none;
  resize: none;
  background: transparent;
  color: var(--text);
  font: 400 var(--fs-base)/1.45 var(--font-body);
}

.fd-replybar__input::placeholder {
  color: var(--text-subtle);
}

.fd-replybar__tool {
  width: 38px;
  height: 38px;
  margin-bottom: 3px;
  color: var(--text-muted);
}

.fd-replybar__send {
  margin-bottom: 4px;
}

.fd-replybar__error {
  flex-basis: 100%;
}

.fd-replybar--guest {
  align-items: center;
  justify-content: space-between;
}

.fd-replybar--guest p {
  color: var(--text-muted);
  font-size: var(--fs-sm);
  line-height: 1.3;
}

.fd-replybar--guest strong {
  display: block;
  color: var(--text);
  font-size: var(--fs-base);
}

.fd-replies-head {
  padding: 14px 16px 6px;
  color: var(--text-muted);
  font-size: var(--fs-sm);
  font-weight: 600;
}

/* ============================================================ hashtag */
.fd-tagbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--border);
}

.fd-tagbar__icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  flex: none;
  border-radius: 16px;
  background: var(--surface-2);
}

.fd-tagbar__icon .fd-ic {
  width: 26px;
  height: 26px;
  stroke-width: 2.1;
}

.fd-tagbar__text {
  flex: 1;
  min-width: 0;
}

.fd-tagbar__tag {
  overflow: hidden;
  font-size: var(--fs-xl);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: var(--tracking-tight);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fd-tagbar__note {
  color: var(--text-muted);
  font-size: var(--fs-sm);
}

.fd-chips {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  overflow-x: auto;
  border-bottom: 1px solid var(--border);
  scrollbar-width: none;
}

.fd-chips::-webkit-scrollbar {
  display: none;
}

.fd-chip {
  display: inline-flex;
  flex: none;
  align-items: center;
  height: 34px;
  padding: 0 14px;
  border-radius: var(--r-full);
  background: var(--surface-2);
  color: var(--text);
  font-size: var(--fs-sm);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.fd-chip:hover {
  background: var(--surface-3);
}

.fd-chip[aria-current="page"] {
  background: var(--ink);
  color: var(--on-ink);
}

/* ======================================================== notificações */
.fd-notifs {
  margin: 0;
  padding: 0;
  list-style: none;
}

.fd-notif {
  position: relative;
  display: flex;
  gap: 12px;
  padding: 14px 16px 14px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  transition: background-color var(--dur-fast) var(--ease);
}

@media (hover: hover) {
  .fd-notif:hover {
    background: var(--fd-hover);
  }
}

.fd-notif.is-unread {
  background: rgba(255, 210, 51, .1);
}

@media (hover: hover) {
  .fd-notif.is-unread:hover {
    background: rgba(255, 210, 51, .16);
  }
}

.fd-notif__type {
  display: grid;
  place-items: start center;
  width: 36px;
  flex: none;
  padding-top: 2px;
}

.fd-notif__type .fd-ic {
  width: 26px;
  height: 26px;
}

.fd-notif--like .fd-notif__type {
  color: var(--fd-like);
}

.fd-notif--like .fd-notif__type .fd-ic {
  fill: currentColor;
}

.fd-notif--reply .fd-notif__type,
.fd-notif--mention .fd-notif__type {
  color: var(--text);
}

.fd-notif--follow .fd-notif__type {
  color: var(--text);
}

.fd-notif__main {
  flex: 1;
  min-width: 0;
}

.fd-notif__avatars {
  display: flex;
  gap: 4px;
  margin-bottom: 8px;
}

.fd-notif__text {
  font-size: var(--fs-base);
  line-height: 1.4;
}

.fd-notif__text strong {
  font-weight: 700;
}

.fd-notif__time {
  color: var(--text-muted);
  white-space: nowrap;
}

.fd-notif__snippet {
  display: -webkit-box;
  margin-top: 4px;
  overflow: hidden;
  color: var(--text-muted);
  font-size: var(--fs-base);
  line-height: 1.4;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.fd-notif--reply .fd-notif__snippet,
.fd-notif--mention .fd-notif__snippet {
  color: var(--text);
}

.fd-notif__dot {
  position: absolute;
  top: 20px;
  right: 16px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 2px var(--bg);
}

/* ============================================================ animações */
@keyframes fd-spin {
  to { transform: rotate(360deg); }
}

@keyframes fd-breathe {
  from { opacity: 1; }
  to { opacity: .5; }
}

@keyframes fd-enter {
  from { opacity: 0; transform: translateY(-6px); }
}

@keyframes fd-pop {
  0% { transform: scale(1); }
  25% { transform: scale(.78); }
  60% { transform: scale(1.28); }
  100% { transform: scale(1); }
}

@keyframes fd-burst {
  0% { opacity: .75; transform: scale(.35); }
  100% { opacity: 0; transform: scale(1.35); }
}

@keyframes fd-pill-in {
  from { opacity: 0; transform: translateY(-10px) scale(.96); }
}

@keyframes fd-sheet-in {
  from { transform: translateY(100%); }
}

@keyframes fd-sheet-out {
  to { transform: translateY(100%); }
}

@keyframes fd-pop-in {
  from { opacity: 0; transform: translateY(8px) scale(.98); }
}

@keyframes fd-pop-out {
  to { opacity: 0; transform: translateY(8px) scale(.98); }
}

@keyframes fd-fade-in {
  from { opacity: 0; }
}

@keyframes fd-fade-out {
  to { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .fd-post.is-entering,
  .fd-newpill.is-in,
  .fd-act--like.is-popping .fd-ic,
  .fd-act--like.is-popping .fd-act__burst,
  .fd-compose__panel,
  .fd-compose::backdrop,
  .fd-lightbox[open],
  .fd-skel__av,
  .fd-skel__line,
  .fd-skel__media {
    animation: none !important;
  }

  .fd-media__img,
  .fd-menu {
    transition: none;
  }
}

/* O editor não mostra o anel de foco da casca: o cursor já indica o foco. */
.fd-compose__input:focus,
.fd-compose__input:focus-visible,
.fd-replybar__input:focus,
.fd-replybar__input:focus-visible {
  outline: none;
  box-shadow: none;
}

.fd-thread-replies .fd-post {
  scroll-margin-bottom: calc(var(--app-bottom, 0px) + 76px);
}
