/* Main navigation and Suggestions cards are shared; desktop export geometry stays intact. */
.profile-page :is(.profile-actions, .profile-tabs) { display: contents; }

@media (max-width: 1400px) {
  .profile-page {
    --profile-text: 18px;
    --profile-action-text: 16px;
  }
  .profile-page .profile-content {
    position: static;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    width: auto;
    height: auto;
    margin: 12px 12px 0;
    overflow: visible;
    order: 1;
  }
  .profile-page .profile-content > * { min-width: 0; }
  .profile-page .profile-content > .export-59 {
    position: static;
    width: 100%;
    gap: 12px;
  }
  .profile-page .export-224 {
    width: clamp(72px, 22vw, 104px);
    height: clamp(72px, 22vw, 104px);
  }
  .profile-page .export-224 > div { inset: 0; width: 100%; height: 100%; }
  .profile-page .export-87 { flex: 1; min-width: 0; width: auto; gap: 2px; }
  .profile-page .export-87 > div {
    width: 100% !important;
    font-size: calc(var(--profile-text) - 0.125rem) !important;
    line-height: 1.45;
    letter-spacing: 0.02em;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .profile-page .export-87 > [data-pencil-name="250 friends"] { letter-spacing: 1.7px; line-height: normal; }
  .profile-page .export-87 > .export-198 { font-size: clamp(1.25rem, 5.64vw, 1.75rem) !important; }
  .profile-page .profile-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-block: 4px;
    order: 1;
  }
  .profile-page .profile-actions > div {
    position: static;
    flex: 1 1 104px;
    min-width: 0;
    min-height: 44px;
    max-width: 100%;
    width: auto;
    justify-content: center;
    gap: 6px;
    padding: 0 8px;
    border-block: 2px solid transparent;
    border-radius: 6px / 8px;
    background-clip: padding-box;
  }
  .profile-page .profile-actions > :is([data-pencil-name="friends button"], [data-pencil-name="stalking button"]) { padding-left: 0; }
  .profile-page .profile-actions .export-20 { order: 1; }
  .profile-page .profile-actions .export-21 { order: 2; }
  .profile-page .profile-actions .export-236 { display: grid; place-items: center; width: max-content; height: 26px; }
  .profile-page .profile-actions svg { position: static; width: auto; height: 24px; }
  .profile-page .profile-actions .export-20 svg { height: 18px; }
  .profile-page .profile-actions .export-186 {
    min-width: 0;
    font-size: var(--profile-action-text);
    line-height: 1.45;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .profile-page .profile-content > svg { position: static; width: 100%; height: 1px; order: 2; }
  .profile-page .profile-content > .export-272 { order: 7; }
  .profile-page .profile-content > :is(.export-194, .export-204, .export-205, .export-69) {
    position: static;
    width: auto;
    font-size: var(--profile-text);
    line-height: 1.45;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .profile-page .export-194 { order: 3; }
  .profile-page .export-204 { order: 4; }
  .profile-page .export-205 { order: 5; }
  .profile-page .export-69 { order: 6; }
  .profile-page .export-233 { display: grid; place-items: center; width: 24px; height: 24px; }
  .profile-page .export-233 svg { position: static; width: 24px; height: auto; }
  .profile-page :is(.export-209, .export-203) { font-size: var(--profile-text); line-height: 1.45; overflow-wrap: anywhere; }
  .profile-page .profile-tabs { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 12px; margin-top: -4px; order: 8; }
  .profile-page .profile-tabs > div { position: static; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: 1fr 1px; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; max-width: 100%; width: auto; }
  .profile-page .profile-tabs .export-203 { text-align: left; }
  .profile-page .profile-tabs > div > svg { display: none; }
  .profile-page .profile-tabs > [aria-current="page"] > .export-203 { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 8px; }
  .profile-page .profile-content > [data-pencil-name="friend suggestions"] { margin: -2px 0 0; order: 9; }
}

@media (max-width: 600px) {
  [data-pencil-name="NSM profile example - friends - mobile"] > .main-nav,
  [data-pencil-name="NSM profile example - photos - mobile"] > .main-nav,
  [data-pencil-name="NSM profile example - posts - mobile"] > .main-nav {
    position: sticky;
    top: env(safe-area-inset-top);
    z-index: 20;
  }
  .profile-page {
    --profile-text: calc(clamp(0.875rem, 4.1vw, 1.125rem) + 0.0625rem);
    --profile-action-text: clamp(0.75rem, 3.59vw, 1rem);
  }
  .profile-page .profile-actions > div { border-block-width: 5px; border-radius: 6px / 11px; }
  .profile-page .profile-actions > :is([data-pencil-name="friends button"], [data-pencil-name="stalking button"]) { padding-right: 4px; }
  .profile-page .profile-actions svg { height: 22px; }
  .profile-page .profile-actions .export-20 svg { height: 16.5px; }
}

@media (min-width: 601px) and (max-width: 1400px) {
  .profile-page .profile-content { margin-inline: 24px; }
}
