@media (max-width: 980px) {
  .fp-siteheadertop {
    gap: 10px;
  }

  .am-single-forum-hero__layout {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .am-single-forum-hero__actions {
    align-items: flex-start;
  }

  .am-single-topic-hero__panel,
  .am-single-forum-hero__panel,
  .am-topic-form__shell,
  .am-search-hero__panel {
    padding: 22px;
    border-radius: 24px;
  }
}

@media (max-width: 760px) {
  .fp-siteheadertop {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .fp-siteheadertop .fp-headerlogo {
    grid-column: 1 / 2;
    min-width: 0;
  }

  .fp-headernav {
    grid-column: 2 / 3;
    justify-self: end;
  }

  .fp-siteheadertop .fp-headersearch {
    grid-column: 1 / -1;
    order: 10 !important;
    width: 100%;
  }

  .fp-headeruser {
    grid-column: 1 / 2;
  }

  .fp-headeraction {
    grid-column: 2 / 3;
    justify-self: end;
  }

  .fp-siteheadertop .fp-headerlogo img {
    height: 36px;
  }

  .fp-siteheadertop .fp-headersearch__form form {
    min-height: 46px;
    padding: 4px 4px 4px 12px;
  }

  .fp-headeruser--loggedin {
    max-width: 100%;
    min-width: 0;
  }

  .fp-headeruser__name {
    max-width: 110px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .fp-headersearch__submit,
  .fp-headeraction .fp-btn.fp-new-discussion,
  .fp-headeruser--guest a,
  .fp-headeruser--loggedin {
    min-height: 42px;
  }

  .am-single-topic-header,
  .am-single-forum-header,
  .am-create-topic-main,
  .am-search-hero-wrap {
    padding-top: 22px;
  }

  .am-single-topic-hero__title,
  .am-search-hero__title {
    font-size: clamp(24px, 8vw, 34px);
  }

  .am-single-forum-hero__title,
  .am-topic-form__title {
    font-size: clamp(26px, 8vw, 36px);
  }

  .am-single-topic-hero__actions,
  .am-single-forum-hero__actions,
  .am-topic-form .fp-form__submit {
    gap: 10px;
  }

  .am-topic-lead__inner,
  .am-topic-reply-card__inner,
  .am-search-card {
    padding: 18px;
  }
}

@media (max-width: 640px) {
  .fp-siteheadertop {
    gap: 8px;
  }

  .fp-headeruser,
  .fp-headeraction {
    width: 100%;
    justify-self: stretch;
  }

  .fp-headeraction .fp-btn.fp-new-discussion,
  .fp-headeruser--guest a,
  .fp-headeruser--loggedin {
    width: 100%;
    justify-content: center;
  }

  .fp-headersearch__submit {
    width: auto;
    min-width: 112px;
  }

  .am-single-topic-hero__author,
  .am-search-card__head {
    gap: 12px;
  }

  .am-single-topic-hero__actions,
  .am-single-forum-hero__actions,
  .am-topic-form .fp-form__submit,
  .am-search-form__inner,
  .am-search-empty__actions,
  .am-search-card__footer {
    flex-direction: column;
    align-items: stretch;
  }

  .am-search-form__inner {
    padding: 10px;
  }

  .am-search-form__field {
    min-height: 44px;
    padding: 0 6px;
  }

  .am-search-form__submit,
  .am-search-empty__actions .fp-btn,
  .am-single-topic-hero__replycta,
  .am-single-topic-hero__tool,
  .am-single-topic-hero__tool a,
  .am-single-topic-hero__tool > span,
  .am-single-forum-hero__cta,
  .am-single-forum-hero__subscription,
  .am-single-forum-hero__subscription a,
  .am-topic-form .fp-form__submit .button,
  .am-topic-form .fp-form__submit button.button {
    width: 100%;
  }

  .am-single-topic-hero__authorname,
  .am-search-card__author {
    font-size: 17px;
  }

  .am-search-card__title {
    font-size: clamp(22px, 7vw, 30px);
  }

  .am-search-card__excerpt,
  .am-search-empty__copy,
  .am-search-results-head__copy {
    font-size: 14px;
  }

  .am-search-empty,
  .am-search-hero__panel,
  .am-single-topic-hero__panel,
  .am-single-forum-hero__panel,
  .am-topic-form__shell {
    padding: 18px;
    border-radius: 22px;
  }
}

@media (max-width: 480px) {
  .fp-siteheadertop .fp-headerlogo img {
    height: 32px;
  }

  .fp-headeruser__name {
    max-width: 84px;
  }

  .fp-headersearch__submit,
  .fp-headeraction .fp-btn.fp-new-discussion,
  .fp-headeruser--guest a,
  .fp-headeruser--loggedin {
    font-size: 14px;
    padding-inline: 14px;
  }

  .am-single-topic-hero__title,
  .am-single-forum-hero__title,
  .am-topic-form__title,
  .am-search-hero__title,
  .am-search-results-head__title,
  .am-search-empty__title {
    letter-spacing: -0.03em;
  }
}


@media (max-width: 760px) {
  .fp-headernav__menu {
    right: 0;
    left: auto;
    width: min(280px, calc(100vw - 24px));
  }

  .fp-headernav__menutop {
    margin: 0 0 12px !important;
    padding: 0 0 12px !important;
    border-bottom: 1px solid var(--am-border);
  }

  .fp-headernav__menutop .fp-btn.fp-new-discussion {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .am-single-topic-hero__actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    align-items: stretch;
  }

  .am-single-topic-hero__replycta,
  .am-single-topic-hero__tool,
  .am-single-topic-hero__tool a,
  .am-single-topic-hero__tool > span {
    width: 100% !important;
    min-width: 0;
  }

  .am-single-topic-hero__replycta,
  .am-single-topic-hero__tool a,
  .am-single-topic-hero__tool > span,
  .am-single-topic-hero__tool .subscription-toggle,
  .am-single-topic-hero__tool .favorite-toggle {
    min-height: 44px;
    padding: 0 10px !important;
    font-size: 14px;
  }
}

@media (max-width: 420px) {
  .am-single-topic-hero__actions {
    grid-template-columns: 1fr;
  }
}


/* ===== V10.5 mobile topic actions ===== */
@media (max-width: 640px) {
  .am-single-topic-hero__actions {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 8px;
    align-items: center;
    justify-content: flex-start;
  }

  .am-single-topic-hero__replycta {
    width: auto !important;
    min-width: 108px !important;
    max-width: 132px;
    min-height: 40px !important;
    padding: 0 14px !important;
    font-size: 14px !important;
    flex: 0 1 auto;
    border-radius: 12px !important;
  }

  .am-single-topic-hero__tool,
  .am-single-topic-hero__tool a,
  .am-single-topic-hero__tool > span {
    width: auto !important;
    min-width: 0 !important;
    flex: 0 0 auto;
    display: inline-flex !important;
    align-items: center;
  }

  .am-single-topic-hero__tool .subscription-toggle,
  .am-single-topic-hero__tool .favorite-toggle,
  .am-single-topic-hero__tool #subscription-toggle,
  .am-single-topic-hero__tool #favorite-toggle {
    width: 40px !important;
    min-width: 40px !important;
    height: 40px !important;
    min-height: 40px !important;
    padding: 0 !important;
    border-radius: 12px !important;
  }
}


/* ===== V10.6 mobile topic actions row fix ===== */
@media (max-width: 680px) {
  .am-single-topic-hero__actions {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 8px !important;
  }

  .am-single-topic-hero__actions > * {
    margin: 0 !important;
  }

  .am-single-topic-hero__replycta {
    width: auto !important;
    min-width: 108px !important;
    max-width: 132px !important;
    flex: 0 0 auto !important;
  }

  .am-single-topic-hero__tool,
  .am-single-topic-hero__tool a,
  .am-single-topic-hero__tool > span,
  .am-single-topic-hero__tool .subscription-toggle,
  .am-single-topic-hero__tool .favorite-toggle,
  .am-single-topic-hero__tool #subscription-toggle,
  .am-single-topic-hero__tool #favorite-toggle {
    flex: 0 0 auto !important;
  }
}


@media (max-width: 680px) {
  .am-engagement-toggle {
    width: 42px !important;
    min-width: 42px !important;
    height: 42px !important;
    min-height: 42px !important;
  }
}


/* ===== V10.22 mobile header actions override ===== */
@media (max-width: 760px) {
  .fp-siteheadertop {
    grid-template-columns: minmax(0, 1fr) auto !important;
  }

  .am-header-mobile-actions {
    grid-column: 2 / 3 !important;
    grid-row: 1 !important;
    align-self: center !important;
  }

  .fp-siteheadertop .fp-headersearch {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
  }
}


/* ===== V10.26 mobile force: descripción de pregunta más fuerte ===== */
@media (max-width: 760px) {
  .am-single-topic-hero .am-single-topic-hero__contentbody,
  .am-single-topic-hero .am-single-topic-hero__contentbody p,
  .am-single-topic-hero .am-single-topic-hero__contentbody li,
  .am-single-topic-hero .am-single-topic-hero__contentbody span {
    color: #1f2230 !important;
    font-weight: 600 !important;
    opacity: 1 !important;
  }
}


/* ===== V10.29 mobile force: respuestas compactas ===== */
@media (max-width: 760px) {
  .am-topic-reply-card__header {
    grid-template-columns: 36px minmax(0, 1fr) !important;
    gap: 8px !important;
  }

  .am-topic-reply-card__avatar img {
    width: 36px !important;
    height: 36px !important;
  }

  .am-topic-reply-card__authorname {
    font-size: 13px !important;
    line-height: 1.06 !important;
  }

  .am-topic-reply-card__authorline {
    font-size: 9.5px !important;
    line-height: 1.18 !important;
    gap: 4px !important;
  }

  .am-topic-reply-card__inner {
    padding: 12px 14px !important;
    border-radius: 16px !important;
  }

  .am-topic-reply-card__content {
    margin-top: 8px !important;
  }

  .am-topic-reply-card__contentbody,
  .am-topic-reply-card__contentbody p,
  .am-topic-reply-card__contentbody li,
  .am-topic-reply-card__contentbody span {
    color: #565d73 !important;
    font-size: 13.5px !important;
    line-height: 1.46 !important;
    font-weight: 500 !important;
  }

  .am-topic-reply-card .am-topic-readmore,
  .am-topic-reply-card .am-topic-readmore-toggle {
    display: none !important;
  }
}
