/* Celulares: abaixo de 768px */
@media (width < 768px) {
  :root {
    --header-height: 116px;
  }

  /* Cabeçalho: logo e ações na primeira linha; busca na segunda. */
  .topbar {
    height: var(--header-height);
  }

  .topbar-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: 40px 44px;
    align-content: center;
    gap: 8px 10px;
    padding: 10px 12px;
  }

  .logo {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
    gap: 6px;
  }

  .logo-text {
    display: inline;
    font-size: 16px;
    letter-spacing: 1px;
  }

  .logo-icon {
    width: 30px;
    height: 30px;
  }

  .main-nav {
    display: none;
  }

  .header-actions {
    grid-column: 2;
    grid-row: 1;
    gap: 6px;
  }

  .header-icon-button {
    display: flex;
    width: 40px;
    height: 40px;
    margin-right: 0;
  }

  .create-button {
    width: 40px;
    min-width: 40px;
    height: 40px;
    padding: 0;
    justify-content: center;
    font-size: 0;
    gap: 0;
  }

  .create-button svg {
    width: 16px;
    height: 16px;
  }

  .header-avatar {
    display: flex;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    margin-left: 0;
  }

  .header-search {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    min-width: 0;
    height: 44px;
    margin-left: 0;
  }

  .header-search input {
    width: 100%;
    font-size: 16px;
  }

  .search-shortcut {
    display: none;
  }

  .header-search[data-google-search] .google-search-panel {
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    max-height: min(60dvh, calc(100dvh - var(--header-height) - 12px));
    overflow-x: hidden;
  }

  .header-search[data-google-search] .google-search-filters {
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px;
  }

  .header-search[data-google-search] .google-search-filter {
    min-height: 40px;
    padding: 8px 10px;
    font-size: 12px;
  }

  .header-search[data-google-search] .google-search-item {
    gap: 8px;
    padding: 12px;
  }

  /* Uma coluna: perfil/menu e feed. */
  .app-layout {
    width: 100%;
    max-width: 720px;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    padding: 16px 10px 40px;
  }

  .left-column {
    display: block;
    position: static;
    top: auto;
    min-width: 0;
    width: 100%;
    height: auto;
  }

  .feed {
    min-width: 0;
    width: 100%;
  }

  .mini-profile,
  .mini-profile-off {
    border-radius: 14px;
  }

  .mini-profile-cover {
    height: 48px;
  }

  .mini-profile-content {
    padding: 0 12px 12px;
    overflow-wrap: anywhere;
  }

  .mini-profile-content>strong {
    font-size: 18px;
  }

  .left-menu {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    min-width: 0;
    margin-top: 10px;
    padding: 4px 0 10px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
  }

  .left-menu-item {
    flex: 0 0 auto;
    min-height: 44px;
    margin-top: 0;
    padding: 0 12px;
    white-space: nowrap;
  }

  .left-menu-icon {
    flex-shrink: 0;
  }

  .topics {
    padding: 8px 0;
  }

  .editor-promo,
  .editor-promo-off {
    margin-top: 8px;
  }

  .feed-top {
    min-height: auto;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
  }

  .feed-top h1 {
    font-size: 21px;
  }

  .feed-tabs {
    max-width: 100%;
    flex-wrap: wrap;
  }

  .feed-tabs button {
    min-height: 40px;
    height: auto;
  }

  .stories {
    max-width: 100%;
    padding: 12px 10px;
    gap: 12px;
  }

  .story {
    flex: 0 0 55px;
  }

  /* Publicação e seleção de vetores. */
  .quick-create,
  .social-post,
  .feed-discovery,
  .repost-compose {
    padding: 12px;
    border-radius: 14px;
    min-width: 0;
  }

  .quick-create-main {
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 10px;
  }

  .quick-placeholder {
    flex: 1 1 160px;
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .quick-create-main>.quick-actions-a {
    flex: 1 0 100%;
    min-height: 44px;
    margin-left: 0;
    justify-content: center;
  }

  .control-new-post,
  .control-new-post-comment {
    padding: 0;
    margin-top: 12px;
  }

  .textarea-new-post,
  .repost-textarea {
    min-height: 80px;
    font-size: 16px;
  }

  .quick-actions {
    flex-wrap: wrap;
    gap: 6px;
    padding-top: 10px;
  }

  .quick-actions-button,
  .quick-actions-button-active,
  .quick-actions button:nth-child(2) {
    display: flex;
    min-height: 44px;
    padding: 8px;
  }

  .post-vector-selector {
    padding: 10px 0;
  }

  .post-vector-selector-header {
    flex-wrap: wrap;
    gap: 8px;
  }

  .post-vector-card {
    width: 88px;
    height: 88px;
    flex-basis: 88px;
  }

  /* Autor, menu e conteúdo das publicações. */
  .post-header {
    flex-wrap: wrap;
    gap: 10px;
  }

  .post-author {
    flex: 1 1 180px;
    min-width: 0;
    align-items: flex-start;
  }

  .post-author>a,
  .avatar,
  .project-menu-container {
    flex-shrink: 0;
  }

  .post-author-info {
    flex: 1;
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .post-author-info>div {
    flex-wrap: wrap;
  }

  .post-author-info>div>a {
    min-width: 0;
  }

  .project-menu-container {
    max-width: 100%;
    margin-left: auto;
  }

  .project-menu {
    width: 44px;
    height: 44px;
    margin-right: 0;
  }

  .btn-seguir,
  .follow-button {
    min-height: 40px;
    padding: 8px 10px;
    font-size: 10px;
  }

  .post-options-menu {
    min-width: min(180px, calc(100vw - 48px));
    max-width: calc(100vw - 48px);
  }

  .post-options-menu button {
    min-height: 44px;
    overflow-wrap: anywhere;
  }

  .post-description,
  .comment-body,
  .challenge-post-details,
  .repost-compose-user,
  .repost-original-user-info {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .vector-content {
    width: 100%;
    aspect-ratio: 1.44 / 1;
    border-radius: 10px;
  }

  .post-vectors {
    grid-template-columns: minmax(0, 1fr);
  }

  .post-slider-prev {
    left: 6px;
  }

  .post-slider-next {
    right: 6px;
  }

  .post-slider-dots {
    bottom: 10px;
    max-width: calc(100% - 24px);
    flex-wrap: wrap;
    justify-content: center;
  }

  .vector-overlay {
    flex-wrap: wrap;
    gap: 8px;
    left: 8px;
    right: 8px;
    bottom: 8px;
  }

  .vector-overlay-left {
    display: none;
  }

  .vector-floating-actions {
    flex-wrap: wrap;
    opacity: 1;
    transform: none;
  }

  .vector-floating-actions button {
    min-height: 40px;
    padding: 0 8px;
    font-size: 11px;
  }

  .project-details {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 10px;
  }

  .project-details>div,
  .project-details>div:nth-child(3) {
    display: flex;
    min-width: 0;
  }

  .project-details strong {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .project-details>button {
    grid-column: 1 / -1;
    min-height: 44px;
    justify-content: center;
    white-space: normal;
  }

  .post-actions-row,
  .post-action-group {
    flex-wrap: wrap;
    gap: 4px;
  }

  .post-actions-row {
    padding: 8px 0;
  }

  .post-action-group button,
  .post-action-group button:nth-child(4),
  .save-button {
    display: flex;
    height: auto;
    min-height: 44px;
    padding: 8px 6px;
    font-size: 12px;
  }

  .liked-by {
    flex-wrap: wrap;
    gap: 6px;
  }

  /* Comentários e republicação: preservar os estados .open e .comment-hidden. */
  .new-comment div {
    padding: 4px 0;
  }

  .new-comment-div-avatar {
    flex-wrap: wrap;
    gap: 8px;
  }

  .new-comment .new-comment-div-nome {
    flex: 1 1 160px;
    min-width: 0;
    width: auto;
    overflow-wrap: anywhere;
  }

  .new-comment div a {
    min-height: 44px;
    justify-content: center;
  }

  .repost-compose-header {
    flex-wrap: wrap;
  }

  .repost-compose-user {
    flex-basis: 160px;
  }

  .repost-publish-button {
    flex: 1 0 100%;
    min-height: 44px;
    justify-content: center;
  }

  .feed-discovery>header {
    flex-wrap: wrap;
    gap: 10px;
  }

  .feed-discovery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .community-highlight {
    min-height: 0;
    padding: 20px;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }

  .community-highlight-text {
    width: 100%;
  }

  .community-highlight-text h2 {
    font-size: 29px;
    line-height: 1.1;
  }

  .remix-stack {
    position: relative;
    right: auto;
    bottom: auto;
    width: 250px;
    max-width: 100%;
    height: 210px;
    align-self: center;
    transform: none;
  }

  .remix-card {
    width: 170px;
    height: 125px;
  }

  /* Ocultar os cards laterais no celular. */
  .right-column {
    display: none;
  }

  .right-column>* {
    min-width: 0;
    margin-bottom: 0;
    overflow-wrap: anywhere;
  }

  .challenge-members,
  .right-card-header {
    flex-wrap: wrap;
    gap: 8px;
  }

  .challenge-card>a {
    height: auto;
    min-height: 44px;
    padding: 10px;
    text-align: center;
  }

  .right-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 16px;
  }

  .right-footer a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  /* Esconde a barra, mantendo a rolagem horizontal do menu. */
  .left-menu {
    overflow-x: auto;
    scrollbar-width: none;
  }

  .left-menu::-webkit-scrollbar {
    display: none;
  }


}