/* Me page two-column layout (COLE-036). Desktop from 901px is two equal
   columns at about 1080px. Phones keep document order: left column, then
   right column, then Posts, then Saved. */

@media (min-width: 901px) {
  body[data-profile-page][data-me-preview="1"] .app-main {
    max-width: 1080px;
  }

  body[data-profile-page][data-me-preview="1"] .me-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1.25rem;
    align-items: start;
  }

  body[data-profile-page][data-me-preview="1"] .me-layout__col > .panel:first-child,
  body[data-profile-page][data-me-preview="1"] .me-layout__col > [data-profile-sections]:first-child {
    margin-top: 0;
  }

  body[data-profile-page][data-me-preview="1"] .me-layout__left .profile-sections-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body[data-profile-page][data-me-preview="1"] .me-below .feed-list[data-feed-list] {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 0.75rem;
  }
}

@media (max-width: 900px) {
  body[data-profile-page][data-me-preview="1"] .me-layout,
  body[data-profile-page][data-me-preview="1"] .me-layout__col {
    display: block;
  }

  body[data-profile-page][data-me-preview="1"] .me-layout__left .profile-sections-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Classic single column is the first paint. The shells stay ordinary blocks
   so the page is not blank before profile.js, and scrollIntoView still works.
   Once that script moves the sections out, an empty shell takes no space. */
body[data-profile-page]:not([data-me-preview="1"]) .me-layout,
body[data-profile-page]:not([data-me-preview="1"]) .me-layout__col,
body[data-profile-page]:not([data-me-preview="1"]) .me-below {
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
  min-height: 0;
}

.me-below {
  margin-top: 1.25rem;
}

.me-below > .panel:first-child {
  margin-top: 0;
}

.panel-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.panel-title-row .panel-title {
  margin: 0;
}

.panel-title-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.friend-tag {
  font-size: 0.6rem;
  font-family: var(--font-heading, Onest, sans-serif);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1;
  padding: 0.15rem 0.35rem;
  margin-top: 0.15rem;
  border-radius: 999px;
  background: rgba(57, 255, 20, 0.12);
  color: var(--lime, #39ff14);
  border: 1px solid rgba(57, 255, 20, 0.35);
}

.friend-tag--picked {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
}

.about-default-note {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
}

.profile-about-text.is-default {
  font-style: italic;
}

.count-label {
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text, inherit);
  font-size: 0.85rem;
  margin-left: 0.35rem;
}

.show-more-btn {
  display: block;
  margin: 0.85rem auto 0;
  min-width: 12rem;
}

.show-more-btn[hidden] {
  display: none !important;
}

.left-theme-panel .theme-settings-row {
  margin-top: 0;
}

/* Holds theme.js's Me placement check so it does not add a second toggle. */
[data-owner-actions] > [data-compact-theme-hold] {
  display: none !important;
}
